This is the mail archive of the 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]

What is the meaning/purpose of the “=” that sometimes appears in the SEARCH_DIR command in binutils' ldscripts?

Dear binutils-folks,

What is the meaning/purpose of the “=” that sometimes appears in the SEARCH_DIR command in binutils' ldscripts?  

I've searched the documentation, but cannot find an answer.  I've posted the same question on StackOverflow (, but have not received any feedback.  Hopefully, someone here can help me.  Below is the full question I am asking:

When I build binutils, the ldscripts folder contains several files that are used by ld to determine how to link objects for a particular platform. In the scripts I see lines like:

SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");

What is the meaning/purpose of the "=" that appears in the SEARCH_DIR command?

According to the documentation at,

The SEARCH_DIR command adds path to the list of paths where ld looks for archive libraries. Using SEARCH_DIR(path) is exactly like using -L path on the command line (see Command Line Options). If both are used, then the linker will search both paths. Paths specified using the command line option are searched first.

And, according to the Command Line Options:

Add path searchdir to the list of paths that ld will search for archive libraries and ld control scripts. You may use this option any number of times. The directories are searched in the order in which they are specified on the command line. Directories specified on the command line are searched before the default directories. All -L options apply to all -l options, regardless of the order in which the options appear. The default set of paths searched (without being specified with -L) depends on which emulation mode ld is using, and in some cases also on how it was configured. See Environment. 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.

But no where does it state what the meaning/purpose of the "=". None of the folders in my directory structure begin with an "=" sign, so it must have some undocumented significance.

Any help would be greatly appreciated.

Thanks, Kevin

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