This is the mail archive of the
mailing list for the binutils project.
Re: Is '$ORIGIN' supposed to work within DT_NEEDED sections?
- From: Nick Clifton <nickc at redhat dot com>
- To: Sasha Unknown <sasha2048 at gmail dot com>, binutils at sourceware dot org
- Date: Thu, 24 Nov 2016 11:10:49 +0000
- Subject: Re: Is '$ORIGIN' supposed to work within DT_NEEDED sections?
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
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.