From e3f2db7fa69d2c1f4c7dbee442da6b262c706700 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 3 Mar 2003 20:00:35 +0000 Subject: * 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. --- ld/ldlang.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ld/ldlang.h') diff --git a/ld/ldlang.h b/ld/ldlang.h index 7dd4efd39e6..3c4936b7fa9 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -230,6 +230,12 @@ typedef struct lang_input_statement_struct { /* 1 means search a set of directories for this file. */ bfd_boolean search_dirs_flag; + /* 1 means this was found in a search directory marked as sysrooted, + if search_dirs_flag is false, otherwise, that it should be + searched in ld_sysroot before any other location, as long as it + starts with a slash. */ + bfd_boolean sysrooted; + /* 1 means this is base file of incremental load. Do not load this file's text or data. Also default text_start to after this file's bss. */ -- cgit v1.2.1