[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#630695: LD_PRELOAD not working when running kfreebsd-9 (9.0~svn223109)



2011/6/16 Robert Millan <rmh@debian.org>:
> $ fakeroot id -u
> ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
> 1000

It seems that LD_* variables are selectively ignored by ld.so.  The
command above results in:

$ LD_LIBRARY_PATH=/usr/lib64/libfakeroot
LD_PRELOAD=libfakeroot-sysv.so /lib/ld-kfreebsd-x86-64.so.1 /bin/true
ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be
preloaded: ignored.
$

On a sane system you'd get the same message if LD_LIBRARY_PATH was not set.

Another example:

$ LD_SHOW_AUXV=yes /lib/ld-kfreebsd-x86-64.so.1 /bin/true
$

In this example, LD_PRELOAD has been ignored completely (ktrace confirms this):

$ LD_PRELOAD=/usr/lib64/libfakeroot/libfakeroot-sysv.so
/lib/ld-kfreebsd-x86-64.so.1 /usr/bin/id -u
1000
$

However, depending on its content it is processed.  Example with an
invalid file name:

$ LD_PRELOAD=foobar /lib/ld-kfreebsd-x86-64.so.1 /bin/true
ERROR: ld.so: object 'foobar' from LD_PRELOAD cannot be preloaded: ignored.
$

Another invalid file name.  This time it is ignored:

$ LD_PRELOAD=foo/bar /lib/ld-kfreebsd-x86-64.so.1 /bin/true
$

As for LD_SHOW_AUXV=yes, I tried different combinations and it is
always ignored, no matter what.

-- 
Robert Millan


Reply to: