This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Alternate character for dollar sign in $ORIGIN?


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]