Is '$ORIGIN' supposed to work within DT_NEEDED sections?

Nick Clifton nickc@redhat.com
Thu Nov 24 11:10:00 GMT 2016


Hi Sasha,

 Yes, $ORIGIN is supposed to work, although you will need to use the latest
 development sources in order to get full support for this feature.

> De-facto current state is (at least, in Ubuntu 16.04):
>   - it works when *.so files don't use versions;
>   - it causes assertion failure in ld (line 224) when *.so files use versions.

I do not get an assertion failure.  The linker appears to work OK.  (This is
using the binutils 2.26 release and/or the current development sources).

> ./main3 && echo '  It works' || echo '  It does not work'

This command generates a seg-fault. (In _dl_check_map_versions in the loader).
I do not have enough knowledge to know what this seg-fault means however.

Cheers
  Nick



More information about the Binutils mailing list