diff options
author | Alan Modra <amodra@gmail.com> | 2008-08-17 03:12:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-08-17 03:12:50 +0000 |
commit | 5c1d2f5f4c7747c36eae8be3abd4ef4e9669690c (patch) | |
tree | 3be4145ee7086fe0315ad0ce506626b5ca560759 /bfd | |
parent | 1f5064de53c27d99fb92efd65a6785e2f1ec0835 (diff) | |
download | fsf-binutils-gdb-5c1d2f5f4c7747c36eae8be3abd4ef4e9669690c.zip fsf-binutils-gdb-5c1d2f5f4c7747c36eae8be3abd4ef4e9669690c.tar.gz fsf-binutils-gdb-5c1d2f5f4c7747c36eae8be3abd4ef4e9669690c.tar.bz2 |
bfd/
* bfd.c (struct _bfd): Correct outsymbols comment.
* bfd-in2.h: Regenerate.
* linker.c (bfd_generic_link_read_symbols): Renamed from..
(generic_link_read_symbols): ..this, and made global.
include/
* bfdlink.h (bfd_generic_link_read_symbols): Declare.
ld/
PR 6478
* ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols.
Don't free symbol pointer array.
(check_refs): Likewise.
* ldmain.c (warning_callback): Likewise.
* ldmisc.c (vfinfo): Likewise.
* pe-dll.c (process_def_file): Likewise.
(pe_walk_relocs_of_symbol, generate_reloc): Likewise.
* emultempl/pe.em (pe_find_data_imports): Likewise.
(gld_${EMULATION_NAME}_after_open): Likewise.
* emultempl/pep.em (pep_find_data_imports): Likewise.
(gld_${EMULATION_NAME}_after_open): Likewise.
* ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count,
passive_position, closed.
* ldlang.c (new_afile): Don't set asymbols and symbol_count.
* ldmain.c (add_archive_element): xcalloc lang_input_statement_type.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 3 | ||||
-rw-r--r-- | bfd/bfd.c | 3 | ||||
-rw-r--r-- | bfd/linker.c | 12 |
4 files changed, 17 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a4d9667..a853525 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2008-08-17 Alan Modra <amodra@bigpond.net.au> + + * bfd.c (struct _bfd): Correct outsymbols comment. + * bfd-in2.h: Regenerate. + * linker.c (bfd_generic_link_read_symbols): Renamed from.. + (generic_link_read_symbols): ..this, and made global. + 2008-08-15 Alan Modra <amodra@bigpond.net.au> PR 6526 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 8868e7d..a39c461 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -4712,7 +4712,8 @@ struct bfd /* Used for input and output. */ unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). */ + /* Symbol table for output BFD (with symcount entries). + Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; /* Used for slurped dynamic symbol tables. */ @@ -176,7 +176,8 @@ CODE_FRAGMENT . {* Used for input and output. *} . unsigned int symcount; . -. {* Symbol table for output BFD (with symcount entries). *} +. {* Symbol table for output BFD (with symcount entries). +. Also used by the linker to cache input BFD symbols. *} . struct bfd_symbol **outsymbols; . . {* Used for slurped dynamic symbol tables. *} diff --git a/bfd/linker.c b/bfd/linker.c index 327426e..baf280c 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -737,8 +737,8 @@ _bfd_generic_link_hash_table_free (struct bfd_link_hash_table *hash) the hash table pointing to different instances of the symbol structure. */ -static bfd_boolean -generic_link_read_symbols (bfd *abfd) +bfd_boolean +bfd_generic_link_read_symbols (bfd *abfd) { if (bfd_get_outsymbols (abfd) == NULL) { @@ -834,7 +834,7 @@ generic_link_add_object_symbols (bfd *abfd, bfd_size_type symcount; struct bfd_symbol **outsyms; - if (! generic_link_read_symbols (abfd)) + if (!bfd_generic_link_read_symbols (abfd)) return FALSE; symcount = _bfd_generic_link_get_symcount (abfd); outsyms = _bfd_generic_link_get_symbols (abfd); @@ -1164,7 +1164,7 @@ generic_link_check_archive_element (bfd *abfd, *pneeded = FALSE; - if (! generic_link_read_symbols (abfd)) + if (!bfd_generic_link_read_symbols (abfd)) return FALSE; pp = _bfd_generic_link_get_symbols (abfd); @@ -2159,7 +2159,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, asymbol **sym_ptr; asymbol **sym_end; - if (! generic_link_read_symbols (input_bfd)) + if (!bfd_generic_link_read_symbols (input_bfd)) return FALSE; /* Create a filename symbol if we are supposed to. */ @@ -2752,7 +2752,7 @@ default_indirect_link_order (bfd *output_bfd, have retrieved them by this point, but we are being called by a specific linker, presumably because we are linking different types of object files together. */ - if (! generic_link_read_symbols (input_bfd)) + if (!bfd_generic_link_read_symbols (input_bfd)) return FALSE; /* Since we have been called by a specific linker, rather than |