diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 10 | ||||
-rw-r--r-- | bfd/coff-aux.c | 4 | ||||
-rw-r--r-- | bfd/elflink.c | 5 | ||||
-rw-r--r-- | bfd/linker.c | 9 |
4 files changed, 19 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cc10c52..ad71e25 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2011-04-24 Alan Modra <amodra@gmail.com> + + PR ld/12365 + PR ld/12696 + * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call. + * linker.c (_bfd_link_hash_newfunc): Clear bitfields. + (_bfd_generic_link_add_one_symbol): Update "notice" call. + * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when + it is a redef of an IR symbol in a real BFD. + 2011-04-22 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation diff --git a/bfd/coff-aux.c b/bfd/coff-aux.c index af1db03..20a680c 100644 --- a/bfd/coff-aux.c +++ b/bfd/coff-aux.c @@ -1,5 +1,5 @@ /* BFD back-end for Apple M68K COFF A/UX 3.x files. - Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008 + Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008, 2011 Free Software Foundation, Inc. Written by Richard Henderson <rth@tamu.edu>. @@ -105,7 +105,7 @@ coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value, && (bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != (struct bfd_hash_entry *) NULL)) { - if (! (*info->callbacks->notice) (info, name, abfd, section, value)) + if (! (*info->callbacks->notice) (info, h, abfd, section, value)) return FALSE; } diff --git a/bfd/elflink.c b/bfd/elflink.c index 3a4d22c..082355d 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1427,7 +1427,10 @@ _bfd_elf_merge_symbol (bfd *abfd, /* Skip weak definitions of symbols that are already defined. */ if (newdef && olddef && newweak) { - *skip = TRUE; + /* Don't skip new non-IR weak syms. */ + if (!((oldbfd->flags & BFD_PLUGIN) != 0 + && (abfd->flags & BFD_PLUGIN) == 0)) + *skip = TRUE; /* Merge st_other. If the symbol already has a dynamic index, but visibility says it should not be visible, turn it into a diff --git a/bfd/linker.c b/bfd/linker.c index 9f2bac3..d7ac067 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -465,10 +465,8 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_link_hash_entry *h = (struct bfd_link_hash_entry *) entry; /* Initialize the local fields. */ - h->type = bfd_link_hash_new; - memset (&h->u.undef.next, 0, - (sizeof (struct bfd_link_hash_entry) - - offsetof (struct bfd_link_hash_entry, u.undef.next))); + memset ((char *) &h->root + sizeof (h->root), 0, + sizeof (*h) - sizeof (h->root)); } return entry; @@ -1609,8 +1607,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, || (info->notice_hash != NULL && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL)) { - if (! (*info->callbacks->notice) (info, h->root.string, abfd, section, - value)) + if (! (*info->callbacks->notice) (info, h, abfd, section, value)) return FALSE; } |