diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-03-03 20:00:35 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-03-03 20:00:35 +0000 |
commit | e3f2db7fa69d2c1f4c7dbee442da6b262c706700 (patch) | |
tree | c1c9691a2ba1728c3b9dcaac761845c83524bd57 /ld/ldlang.c | |
parent | 832a94844fffdf222dd6726c26d2678daf440202 (diff) | |
download | gdb-e3f2db7fa69d2c1f4c7dbee442da6b262c706700.zip gdb-e3f2db7fa69d2c1f4c7dbee442da6b262c706700.tar.gz gdb-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/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 283b970..703779f 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -240,6 +240,7 @@ bfd_boolean lang_float_flag = FALSE; bfd_boolean delete_output_file_on_failure = FALSE; struct lang_nocrossrefs *nocrossref_list; struct unique_sections *unique_section_list; +static bfd_boolean ldlang_sysrooted_script = FALSE; etree_type *base; /* Relocation base - or null */ @@ -547,6 +548,7 @@ new_afile (name, file_type, target, add_to_list) lang_has_input_file = TRUE; p->target = target; + p->sysrooted = FALSE; switch (file_type) { case lang_input_file_is_symbols_only_enum: @@ -582,6 +584,7 @@ new_afile (name, file_type, target, add_to_list) p->search_dirs_flag = TRUE; break; case lang_input_file_is_search_file_enum: + p->sysrooted = ldlang_sysrooted_script; p->filename = name; p->is_archive = FALSE; p->real = TRUE; @@ -1539,6 +1542,7 @@ load_symbols (entry, place) bfd_error_type err; lang_statement_list_type *hold; bfd_boolean bad_load = TRUE; + bfd_boolean save_ldlang_sysrooted_script; err = bfd_get_error (); @@ -1570,12 +1574,15 @@ load_symbols (entry, place) hold = stat_ptr; stat_ptr = place; + save_ldlang_sysrooted_script = ldlang_sysrooted_script; + ldlang_sysrooted_script = entry->sysrooted; ldfile_assumed_script = TRUE; parser_input = input_script; yyparse (); ldfile_assumed_script = FALSE; + ldlang_sysrooted_script = save_ldlang_sysrooted_script; stat_ptr = hold; return ! bad_load; |