* Steve Ellcey:

> I would like these used by default so I took some ideas from
> --with-advance-toolchain and used that to automatically add these options
> to LINK_SPEC (see attached patch).  I can compile and link a program with
> this setup, but when I run the program I get:
>
> % ./x
> Inconsistency detected by ld.so: get-dynamic-info.h: 147: 
> elf_get_dynamic_info: 
> Assertion `info[DT_RPATH] == NULL' failed!
>
> I am not sure why this doesn't work.  Can anyone help me understand
> why this doesn't work or help me figure out how else I might be able to
> get the functionality I want. That is: to use shared libraries and a dynamic
> linker (at run time) that are in a non-standard location without needing
> to compile or link with special flags.

An argument could be made that if ld.so has DT_RPATH set,
LD_LIBRARY_PATH would stop working, which would be a bug.  Hence the
assert.  It's probably less an issue for DT_RUNPATH.

The real fix would be to make sure that ld.so isn't built with those
dynamic tags.  If ld.so wants to use an alternative search path, that
should be baked into the loader itself, explicitly.

Do you know where those dynamic tags originate?  Is there some wrapper
script involved that sets them unconditionally?

Thanks,
Florian

Reply via email to