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: Default linker library search paths


Matt,

> I know that you can get ld to output the default linker
> script when
> using --verbose mode, or passing -Wl,--verbose to gcc,
> 
> you can also specify a linker script using -T or --script
> to use a ld
> script with a modified set of SEARCH_DIR deals.

Thanks.

When I run "ld --verbose" with this linker, and grep for SEARCH_DIR, I
get:

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

So, it looks like it will search the host in places that make sense for
a native linker, but not a cross linker.  Do you know if it checks the
architecture at all?

Do you then recommend I take the output from "verbose", delete the SEARCH_DIR line, and pass this in using -T and the only thing I will have
done is limit where -l looks for libraries (I only want it to search
directories explicitly specified using -L).

  Michael


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