Prelinking apps
Scott James Remnant
scott at netsplit.com
Wed Oct 20 07:10:33 CDT 2004
On Wed, 2004-10-20 at 12:57 +0100, Colin Watson wrote:
> On Wed, Oct 20, 2004 at 12:34:28PM +0100, Scott James Remnant wrote:
> > On Wed, 2004-10-20 at 01:35 +0200, Tollef Fog Heen wrote:
> > > * Scott James Remnant
> > > | descent scott% LD_DEBUG=statistics /lib/tls/i686/cmov/ld-linux.so.2 /usr/bin/gedit
> > >
> > > After a bit of discussion with Daniel Jacobowitz, it seems your method
> > > of checking is a bit flawed. You need to run just LD_DEBUG=statistics
> > > /usr/bin/gedit, else you will get relocations nonetheless (as you can
> > > see -- the prelinking should have reduced the number of relocations to
> > > 0).
> >
> > How curious ... Why doesn't prelinking work when you use the TLS-enabled
> > link loader?
>
> Daniel said that if you run the loader by hand as above, the kernel
> moves it to a different address from the one prelink expects, which
> breaks prelinking.
>
Just the link-loader? You can't move the binary itself, as those aren't
PIC and have fixed load addresses. I'm surprised that does break
pre-linking, but oh well.
I'm still a bit amused that I missed the fact the relocations weren't 0
in the second run; though in the first run only 121 relocations were
performed (the rest came from the cache).
So the benefit is the loss of 121 load-time relocations, and about 5500
runtime relocations (which are even harder to measure benefit-wise).
I'm still going to stand by my assertion that this isn't won't give a
noticeable speed improvement, but without the broken statistics this
time <g>
> > Does this mean that any TLS-enabled application, even when prelinked,
> > isn't going to benefit anyway?
> >
> > The reason you need to use that link loader is because the default i386
> > one doesn't know about the hyper-accurate timer in the i686, so you
> > can't use it for any useful stats.
>
> Is there no way to use the TLS loader other than by running it manually?
>
Only by linking with it in the first place.
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20041020/edeadadb/attachment.pgp
More information about the ubuntu-devel
mailing list