aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2006-04-07 07:03:51 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2006-04-07 07:03:51 +0000
commitf2e349f91a7063d6a09630bce740696a7bd38fea (patch)
treec80c0800da501675d401811491e6e8d607ea2f35 /ld/ldlang.c
parent45aa61fe2eaaa8c5ce5a56f159a9d70ea282616b (diff)
downloadgdb-f2e349f91a7063d6a09630bce740696a7bd38fea.zip
gdb-f2e349f91a7063d6a09630bce740696a7bd38fea.tar.gz
gdb-f2e349f91a7063d6a09630bce740696a7bd38fea.tar.bz2
* ldlang.c (load_symbols): Set as_needed and add_needed according
to the corresponding script's fields while processing it.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 8d4d9e9..c07a5921 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2323,6 +2323,7 @@ load_symbols (lang_input_statement_type *entry,
lang_statement_list_type *hold;
bfd_boolean bad_load = TRUE;
bfd_boolean save_ldlang_sysrooted_script;
+ bfd_boolean save_as_needed, save_add_needed;
err = bfd_get_error ();
@@ -2356,6 +2357,10 @@ load_symbols (lang_input_statement_type *entry,
stat_ptr = place;
save_ldlang_sysrooted_script = ldlang_sysrooted_script;
ldlang_sysrooted_script = entry->sysrooted;
+ save_as_needed = as_needed;
+ as_needed = entry->as_needed;
+ save_add_needed = add_needed;
+ add_needed = entry->add_needed;
ldfile_assumed_script = TRUE;
parser_input = input_script;
@@ -2366,6 +2371,8 @@ load_symbols (lang_input_statement_type *entry,
ldfile_assumed_script = FALSE;
ldlang_sysrooted_script = save_ldlang_sysrooted_script;
+ as_needed = save_as_needed;
+ add_needed = save_add_needed;
stat_ptr = hold;
return ! bad_load;