Idea for a sanity check on CVS

Jeremy Utley jeremy at jutley.org
Wed May 21 18:15:10 PDT 2003


On Wed, 2003-05-21 at 20:31, Greg Schafer wrote:
> On Wed, May 21, 2003 at 01:11:25PM -0600, Gerard Beekmans wrote:
> > On May 19, 2003 10:26 pm, Greg Schafer wrote:
> > > No! ldd can be misleading. Imagine you accidentally run the ldd from the
> > > host and not the one in /stage1. Strange results can happen. Trust me, I've
> > > been there and done it :-) The only foolproof method for this sort of thing
> > > is using the readelf utility.
> > 
> > What kind of strange things?
> 
> It will return wrong or misleading info.
> 
> ldd is an sh script.
> 
> It hardcodes a reference to the dynamic linker e.g.:-
> 
> RTLDLIST=/lib/ld-linux.so.2
> 
> A problem is most likely to happen when mixing different libc versions e.g.
> host has glibc-2.2.5, target has glibc-2.3.2
> 
> Running the ldd from host (with the hardcoded ref to /lib/ld-linux.so.2) on
> binaries linked against the /stage1 libc will do... who knows what? :-)

OK, given that running ldd is misleading, and the better tool is readelf
- exactly what are we looking for as output from readelf - I still think
a quick sanity check of the binaries is a good idea, to ensure that the
"GNU Magic" that's so integral to the PLFS/CVS build process is actually
happening.  I tried the readelf command once, and couldn't see how to
use it to test and make sure the binaries are linked properly, but then,
I don't pretend to know the internals like you guys do.  But, judging
from the number of times this has come up in #lfs-support, if we can
come up with something quick to run after each compile to ensure the
binaries are linked properly, it would save everyone a lot of heartache
:)

-J-

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list