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: Nick Clifton <nickc at redhat dot com>
- To: noloader at gmail dot com, Binutils <binutils at sourceware dot org>
- Date: Tue, 4 Jun 2019 14:20:31 +0100
- Subject: Re: Alternate character for dollar sign in $ORIGIN?
- References: <CAH8yC8nMzTeAWUVa6c=Y504tXZUbdq0aMJmVXbv29+L9Sh_y=g@mail.gmail.com>
Hi Jeffrey,
> Does GNU allow an alternate character?
No. :-(
The relevant code is in ..._search_needed() in ld/emultempl/elf32.em
where there is:
while ((var = strchr (filename + offset, '$')) != NULL)
So either you are going to have to get creative about escaping the dollar
sign, or else generate a patch for the linker...
If you do decide to go the patch route, then please remember to include
an update to the documentation (in the -rpath-link entry in the ld.texi
file) and an entry in the ld/NEWS file. It would also be nice if you
could think of a way to add an entry to the linker testsuite for this
feature, although that may prove to be rather difficult.
Cheers
Nick