aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-06-11 04:01:48 +0000
committerIan Lance Taylor <ian@airs.com>1997-06-11 04:01:48 +0000
commit6a1878c9973c6c63ca72a63b2fb198ee64dfc3a1 (patch)
tree79d7e1ec10595d6f5f50bfebdb358214ff59ee7b /bfd/elf32-i386.c
parent43ee18a06d4133a8f2aac6b7af932a8c6a292560 (diff)
downloadgdb-6a1878c9973c6c63ca72a63b2fb198ee64dfc3a1.zip
gdb-6a1878c9973c6c63ca72a63b2fb198ee64dfc3a1.tar.gz
gdb-6a1878c9973c6c63ca72a63b2fb198ee64dfc3a1.tar.bz2
* elf32-i386.c (elf_i386_relocate_section): Get the relocation
value if the symbol is turning into a local symbol. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 9914ea6..a871a7f 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -643,7 +643,8 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
is only called if we are using an elf_i386 linker
hash table, which means that h is really a pointer to
an elf_i386_link_hash_entry. */
- if (h != NULL && info->symbolic)
+ if (h != NULL && info->symbolic
+ && ELF32_R_TYPE (rel->r_info) == R_386_PC32)
{
struct elf_i386_link_hash_entry *eh;
struct elf_i386_pcrel_relocs_copied *p;
@@ -1182,7 +1183,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| (info->shared
- && (! info->symbolic
+ && ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& (r_type == R_386_32