Alternate character for dollar sign in $ORIGIN?

Jeffrey Walton
Tue Jun 4 13:50:00 GMT 2019

On Tue, Jun 4, 2019 at 9:20 AM Nick Clifton <> wrote:
> 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.

Thanks Nick.

You don't want me writing patches for Binutils. Things would be broke
worse than they are now :)


More information about the Binutils mailing list