Re: What is the meaning/purpose of the “=” that sometimes appears in the SEARCH_DIR command in binutils' ldscripts?
Cary Coutant
ccoutant@gmail.com
Tue Jul 7 18:14:00 GMT 2015
>> The '=' causes ld to add the sysroot to the path. I suspect this is
>> undocumented because it's an internal implementation detail intended
>> only for the linker-provided script templates.
>
> the latest manual does document it. the one referenced is from binutils-2.12
> which long predates this functionality.
>
> -L searchdir
> --library-path=searchdir
> ...
> If searchdir begins with =, then the = will be replaced by the sysroot prefix,
> controlled by the `--sysroot' option, or specified when the linker is
> configured.
> ...
> The paths can also be specified in a link script with the SEARCH_DIR command.
> Directories specified this way are searched at the point in which the linker
> script appears in the command line.
>
> https://sourceware.org/binutils/docs/ld/Options.html
Oops, sorry, I didn't even think to look at the version number of the
link provided.
If it can be found outside the built-in script templates, I guess I
should implement this feature in gold.
-cary
More information about the Binutils
mailing list