diff options
author | Alan Modra <amodra@gmail.com> | 2011-08-05 03:17:12 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-08-05 03:17:12 +0000 |
commit | 43e1669b2d187f4b2e4ecdf98a5aac8e9fb10bfd (patch) | |
tree | 68647f2f6ce1d2294bd05d4e4ca671d5943b6eee /bfd/linker.c | |
parent | 6177242a84b9139f50d23a2b86ac68da6183e10c (diff) | |
download | gdb-43e1669b2d187f4b2e4ecdf98a5aac8e9fb10bfd.zip gdb-43e1669b2d187f4b2e4ecdf98a5aac8e9fb10bfd.tar.gz gdb-43e1669b2d187f4b2e4ecdf98a5aac8e9fb10bfd.tar.bz2 |
PR ld/12762
bfd/
* elflink.c (_bfd_elf_section_already_linked): Return matched
status. Remove COFF comdat section handling.
* linker.c (_bfd_generic_section_already_linked): Return matched
status. Don't set SEC_GROUP in l_flags for plugin entries.
(bfd_section_already_linked): Update prototype.
* targets.c (_section_already_linked): Likewise.
* elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
* libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
(_bfd_nolink_section_already_linked): Update.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
ld/
* plugin.c (add_symbols): Exclude comdat_key symbols from symbol
table if already seen.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 8700c05..b3ccefd 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2888,13 +2888,13 @@ FUNCTION bfd_section_already_linked SYNOPSIS - void bfd_section_already_linked (bfd *abfd, - struct already_linked *data, - struct bfd_link_info *info); + bfd_boolean bfd_section_already_linked (bfd *abfd, + struct already_linked *data, + struct bfd_link_info *info); DESCRIPTION Check if @var{data} has been already linked during a reloceatable - or final link. + or final link. Return TRUE if it has. .#define bfd_section_already_linked(abfd, data, info) \ . BFD_SEND (abfd, _section_already_linked, (abfd, data, info)) @@ -2990,7 +2990,7 @@ bfd_section_already_linked_table_free (void) /* This is used on non-ELF inputs. */ -void +bfd_boolean _bfd_generic_section_already_linked (bfd *abfd, struct already_linked *linked, struct bfd_link_info *info) @@ -3006,7 +3006,7 @@ _bfd_generic_section_already_linked (bfd *abfd, if (name) { sec = NULL; - flags = SEC_GROUP | SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + flags = SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; s_comdat = NULL; } else @@ -3014,7 +3014,7 @@ _bfd_generic_section_already_linked (bfd *abfd, sec = linked->u.sec; flags = sec->flags; if ((flags & SEC_LINK_ONCE) == 0) - return; + return FALSE; s_comdat = bfd_coff_get_comdat_section (abfd, sec); @@ -3049,9 +3049,7 @@ _bfd_generic_section_already_linked (bfd *abfd, l_sec = NULL; l_owner = l->linked.u.abfd; l_comdat = NULL; - l_flags = (SEC_GROUP - | SEC_LINK_ONCE - | SEC_LINK_DUPLICATES_DISCARD); + l_flags = SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; } else { @@ -3100,7 +3098,7 @@ _bfd_generic_section_already_linked (bfd *abfd, && (l_owner->flags & BFD_PLUGIN) != 0) { l->linked = *linked; - return; + return FALSE; } break; @@ -3136,7 +3134,7 @@ _bfd_generic_section_already_linked (bfd *abfd, sec->kept_section = l_sec; } - return; + return TRUE; } } @@ -3144,6 +3142,7 @@ _bfd_generic_section_already_linked (bfd *abfd, if (! bfd_section_already_linked_table_insert (already_linked_list, linked)) info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); + return FALSE; } /* Convert symbols in excluded output sections to use a kept section. */ |