From: H.J. Lu Date: Fri, 9 Feb 2001 06:58:59 +0000 (+0000) Subject: 2001-02-08 H.J. Lu X-Git-Tag: x86_64versiong3~130 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4aa724e36a91291ddd07cb7342f0fd43bbd9b900;p=pf3gnuchains%2Fpf3gnuchains4x.git 2001-02-08 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32 relocation entries for weak definitions when building DSO with -Bsymbolic. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f64124e854..d18a16e33b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2001-02-08 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32 + relocation entries for weak definitions when building DSO with + -Bsymbolic. + 2001-02-08 Richard Henderson * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index b433c25d63..4ad2c2be6a 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -643,16 +643,19 @@ elf_i386_check_relocs (abfd, info, sec, relocs) including in the link (i.e., DEF_REGULAR is set). At this point we have not seen all the input files, so it is possible that DEF_REGULAR is not set now but will be set - later (it is never cleared). We account for that - possibility below by storing information in the - pcrel_relocs_copied field of the hash table entry. - A similar situation occurs when creating shared libraries - and symbol visibility changes render the symbol local. */ + later (it is never cleared). In case of a weak definition, + DEF_REGULAR may be cleared later by a strong definition in + a shared library. We account for that possibility below by + storing information in the relocs_copied field of the hash + table entry. A similar situation occurs when creating + shared libraries and symbol visibility changes render the + symbol local. */ if (info->shared && (sec->flags & SEC_ALLOC) != 0 && (ELF32_R_TYPE (rel->r_info) != R_386_PC32 || (h != NULL && (! info->symbolic + || h->root.type == bfd_link_hash_defweak || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) {