Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 2000 10:10:52 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        jazepeda@pacbell.net
Subject:   Re: ELF rtld and environment variables...
Message-ID:  <200007251710.KAA07319@vashon.polstra.com>
In-Reply-To: <Pine.BSF.4.21.0007242337420.213-100000@zippy.pacbell.net>
References:  <Pine.BSF.4.21.0007242337420.213-100000@zippy.pacbell.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0007242337420.213-100000@zippy.pacbell.net>,
Alex Zepeda  <jazepeda@pacbell.net> wrote:
> On Mon, 24 Jul 2000, John Polstra wrote:
> 
> >     FreeBSD ELF:  It's required by the ELF specification.
> > 
> >     FreeBSD a.out: Backward compatibility.
> > 
> >     Linux ELF: Because it's part of Linux and that's just what it does.
> 
> I can understand the logic for using said variables for FreeBSD ELF stuff,
> but for the rest of them, I figure we're not actually the native
> environment.  Hmm.

That's why we can't change the current behavior.  The Linux RTLD is a
3rd party program.  We didn't write it, and we don't maintain it.  And
I'm not about to break backward compatibility in the a.out RTLD.

> Anywho the topic of caching shlib symbols came up in discussion as
> a possible way speed up loading of programs.  Makes me wonder if it
> would be worth it..

The only way to find out would be to take some measurements.  But
where were you thinking of caching these symbols?  You can't do it in
the RTLD's address space because the RTLD isn't persistent.  You get a
new instance of it every time you run a program.  And if you want to
cache the symbols in a file, well, we already have that -- it's called
the shared library's symbol table.  I really don't see any potential
for gains from this.

Besides, have you even established that dynamically linked programs
load too slowly?  I've certainly never heard any complaints along
those lines.  Furthermore I would bet that the bulk of the dynamic
linking time comes from opening the shared libraries and mmapping
them, and there's nothing the RTLD can do about that.

John, who spent weeks instrumenting and measuring the a.out RTLD years ago.

-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007251710.KAA07319>