diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-02-09 06:58:59 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-02-09 06:58:59 +0000 |
commit | 1f655a09860f731f88889a07dd819b0ba931847b (patch) | |
tree | 4c16d1fe15bf7cf4c26ceed964a13fbdd5da61a9 /bfd/elf32-i386.c | |
parent | c5bb12431c53787a1941c9a767b8703ccf9c8b12 (diff) | |
download | gdb-1f655a09860f731f88889a07dd819b0ba931847b.zip gdb-1f655a09860f731f88889a07dd819b0ba931847b.tar.gz gdb-1f655a09860f731f88889a07dd819b0ba931847b.tar.bz2 |
2001-02-08 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
relocation entries for weak definitions when building DSO with
-Bsymbolic.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index b433c25..4ad2c2b 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)))) { |