diff options
author | Nick Clifton <nickc@redhat.com> | 2001-02-07 23:42:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-02-07 23:42:15 +0000 |
commit | 240b56f2d37518734f9b8d0c9c42a9a305560d32 (patch) | |
tree | b5b17f12df5d99f5dd8ebf9d40db95e28dfc4d69 /bfd | |
parent | 9fb6e61a8448ddc34e3086c5eba318c13958ae09 (diff) | |
download | gdb-240b56f2d37518734f9b8d0c9c42a9a305560d32.tar.gz |
ignore common definitions of function symbols in unlinked archives
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elflink.h | 12 |
2 files changed, 15 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ab54002f8b0..3b5442b4eb5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2001-02-07 Jakub Jelinek <jakub@redhat.com> + + * elflink.h (is_global_symbol_definition): Rename to + is_global_data_symbol_definition and have it reject function + symbols. + (elf_link_is_defined_archive_symbol): Use renamed function. + 2001-02-07 Todd Vierling <tv@wasabisystems.com> * libbfd-in.h (bfd_target_vector): Change extern array to pointer. diff --git a/bfd/elflink.h b/bfd/elflink.h index d3b44e8831a..9464ff2e106 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -80,9 +80,9 @@ elf_bfd_link_add_symbols (abfd, info) } } -/* Return true iff this is a non-common definition of a symbol. */ +/* Return true iff this is a non-common, definition of a non-function symbol. */ static boolean -is_global_symbol_definition (abfd, sym) +is_global_data_symbol_definition (abfd, sym) bfd * abfd ATTRIBUTE_UNUSED; Elf_Internal_Sym * sym; { @@ -91,6 +91,10 @@ is_global_symbol_definition (abfd, sym) && ELF_ST_BIND (sym->st_info) < STB_LOOS) return false; + /* Function symbols do not count. */ + if (ELF_ST_TYPE (sym->st_info) == STT_FUNC) + return false; + /* If the section is undefined, then so is the symbol. */ if (sym->st_shndx == SHN_UNDEF) return false; @@ -116,7 +120,7 @@ is_global_symbol_definition (abfd, sym) } /* Search the symbol table of the archive element of the archive ABFD - whoes archove map contains a mention of SYMDEF, and determine if + whoes archive map contains a mention of SYMDEF, and determine if the symbol is defined in this element. */ static boolean elf_link_is_defined_archive_symbol (abfd, symdef) @@ -201,7 +205,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef) if (strcmp (name, symdef->name) == 0) { - result = is_global_symbol_definition (abfd, & sym); + result = is_global_data_symbol_definition (abfd, & sym); break; } } |