aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-03-03 20:00:35 +0000
committerAlexandre Oliva <aoliva@redhat.com>2003-03-03 20:00:35 +0000
commite3f2db7fa69d2c1f4c7dbee442da6b262c706700 (patch)
treec1c9691a2ba1728c3b9dcaac761845c83524bd57 /ld/ld.texinfo
parent832a94844fffdf222dd6726c26d2678daf440202 (diff)
downloadbinutils-e3f2db7fa69d2c1f4c7dbee442da6b262c706700.zip
binutils-e3f2db7fa69d2c1f4c7dbee442da6b262c706700.tar.gz
binutils-e3f2db7fa69d2c1f4c7dbee442da6b262c706700.tar.bz2
* ldfile.h (struct search_dirs): Added sysrooted field.
* ldlang.h (struct lang_input_statement_struct): Likewise. * ldfile.c (ldfile_add_library_path): Mark sysrooted paths. (ldfile_open_file_search): Look for sysrooted filename starting with / in ld_sysroot instead of in the current directory. Clear sysrooted flag if it's found in the current directory. Set it from the search directory's sysrooted flag where it is found otherwise. * ldlang.c (ldlang_sysrooted_script): New static variable. (new_afile): Mark search_file_enums as sysrooted if ldlang_sysrooted_script. (load_symbols): Set ldlang_sysrooted_script according to the script's sysrooted field while processing it. * ld.texinfo: Document INPUT behavior in sysroot.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo11
1 files changed, 7 insertions, 4 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index d49c4f1..a23deef 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2305,10 +2305,13 @@ then you can put @samp{INPUT (subr.o)} in your linker script.
In fact, if you like, you can list all of your input files in the linker
script, and then invoke the linker with nothing but a @samp{-T} option.
-The linker will first try to open the file in the current directory. If
-it is not found, the linker will search through the archive library
-search path. See the description of @samp{-L} in @ref{Options,,Command
-Line Options}.
+In case a @dfn{sysroot prefix} is configured, and the filename starts
+with the @samp{/} character, and the script being processed was
+located inside the @dfn{sysroot prefix}, the filename will be looked
+for in the @dfn{sysroot prefix}. Otherwise, the linker will try to
+open the file in the current directory. If it is not found, the
+linker will search through the archive library search path. See the
+description of @samp{-L} in @ref{Options,,Command Line Options}.
If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
name to @code{lib@var{file}.a}, as with the command line argument