diff options
author | Alan Modra <amodra@gmail.com> | 2007-05-31 15:04:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-05-31 15:04:52 +0000 |
commit | a9a4c53eccf5a5e8ed2d6edb75054ad7ff7990fc (patch) | |
tree | bfdf255e2390aab1cfecbda9d7beb4f2ea053af9 /ld | |
parent | 91568d083aac1900ec23ac9432376ab5b704e8ac (diff) | |
download | gdb-a9a4c53eccf5a5e8ed2d6edb75054ad7ff7990fc.zip gdb-a9a4c53eccf5a5e8ed2d6edb75054ad7ff7990fc.tar.gz gdb-a9a4c53eccf5a5e8ed2d6edb75054ad7ff7990fc.tar.bz2 |
include/
* bfdlink.h (struct bfd_link_info): Add input_bfds_tail.
bfd/
* simple.c (bfd_simple_get_relocated_section_content): Init
input_bfds_tail.
ld/
* ldlang.c (ldlang_add_file): Use input_bfds_tail.
* ldmain.c (main): Init input_bfds_tail. Sort link_info
initialization.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/ldlang.c | 8 | ||||
-rw-r--r-- | ld/ldmain.c | 5 |
3 files changed, 13 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c2a1470..17cec65 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2007-06-01 Noah Misch <noah@cs.caltech.edu> + Alan Modra <amodra@bigpond.net.au> + + * ldlang.c (ldlang_add_file): Use input_bfds_tail. + * ldmain.c (main): Init input_bfds_tail. Sort link_info + initialization. + 2007-05-29 Alan Modra <amodra@bigpond.net.au> * emultempl/spuelf.em (base_name): New function, split out from.. diff --git a/ld/ldlang.c b/ld/ldlang.c index dfaf19b..a732525 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -5435,8 +5435,6 @@ lang_for_each_file (void (*func) (lang_input_statement_type *)) void ldlang_add_file (lang_input_statement_type *entry) { - bfd **pp; - lang_statement_append (&file_chain, (lang_statement_union_type *) entry, &entry->next); @@ -5445,9 +5443,9 @@ ldlang_add_file (lang_input_statement_type *entry) a link. */ ASSERT (entry->the_bfd->link_next == NULL); ASSERT (entry->the_bfd != output_bfd); - for (pp = &link_info.input_bfds; *pp != NULL; pp = &(*pp)->link_next) - ; - *pp = entry->the_bfd; + + *link_info.input_bfds_tail = entry->the_bfd; + link_info.input_bfds_tail = &entry->the_bfd->link_next; entry->the_bfd->usrdata = entry; bfd_set_gp_size (entry->the_bfd, g_switch_value); diff --git a/ld/ldmain.c b/ld/ldmain.c index bbd769f..354c41a 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -265,15 +265,16 @@ main (int argc, char **argv) link_info.keep_memory = TRUE; link_info.combreloc = TRUE; link_info.strip_discarded = TRUE; - link_info.callbacks = &link_callbacks; link_info.emit_hash = TRUE; + link_info.callbacks = &link_callbacks; + link_info.input_bfds_tail = &link_info.input_bfds; /* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init and _fini symbols. We are compatible. */ link_info.init_function = "_init"; link_info.fini_function = "_fini"; + link_info.relax_pass = 1; link_info.pei386_auto_import = -1; link_info.spare_dynamic_tags = 5; - link_info.relax_pass = 1; ldfile_add_arch (""); emulation = get_emulation (argc, argv); |