Alternate character for dollar sign in $ORIGIN?

Nick Clifton nickc@redhat.com
Tue Jun 4 13:20:00 GMT 2019


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



More information about the Binutils mailing list