This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Alternate character for dollar sign in $ORIGIN?
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, Binutils <binutils at sourceware dot org>
- Date: Wed, 5 Jun 2019 00:20:27 -0400 (EDT)
- Subject: Re: Alternate character for dollar sign in $ORIGIN?
- References: <CAH8yC8nMzTeAWUVa6c=Y504tXZUbdq0aMJmVXbv29+L9Sh_y=g@mail.gmail.com> <1461b09c-ea04-4b9b-9ca8-6c57446e0ffc@redhat.com> <CAH8yC8kkJq2GkuQOv0KTA9RZJQYH4_ehq6s+_pFHokpTV-70=Q@mail.gmail.com>
On Tue, 4 Jun 2019, Jeffrey Walton wrote:
> Here are some datapoints, if interested.
>
> Most of the time I can use $ORIGIN/../lib with the following. It
> passes through Autotools/Bash/Makefile chain as expected:
>
> RPATH="'""\$\$ORIGIN/../lib""'"
> LDFLAGS="... -Wl,-rpath,$RPATH"
>
> About 1 in 4 fail, however. Those that fail seem to do extra escaping
> in the Autotools/Bash/Makefile chain and it results in:
>
> $ objdump -p <some prog>
> ...
> NEEDED RIGIN/../lib
>
> One of the failures is OpenLDAP.
>
> Jeff
Perhaps a response-file be used for that case, with the
"-Wl,-rpath,$RPATH" option put in that file? An extra step, but
simpler than adding a linker char-replace feature.
For the curious, "response-file" is the funny name for that
@FILENAME feature, where FILENAME specifies a file
with...options. Implemented in gcc as well as ld, but old
enough now that people appears to have forgotten about it.
brgds, H-P