This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ambiguity of ld manual regarding to -L option!!
- From: ali hagigat <hagigatali at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sat, 20 Nov 2010 14:26:35 +0330
- Subject: ambiguity of ld manual regarding to -L option!!
-L searchdir
--library-path=searchdir
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.
-----------------------------------------------------------------------------------------------
I have copied part of ld manual...
Can anyone give an example of how to specify a path for -L by a link script?
When we use -L , we add some paths for search of ld command to find
libraries and link scripts. But what does 'search at the point' mean?
When 'searchdir' is specified by a link script, those paths should be
considered for the whole session of ld, so why the position of link
script is important? and if it is important how those paths are
considered?