aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2009-06-16 02:14:12 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2009-06-16 02:14:12 +0000
commit04981bc1fb2151ec0d6adf57793eea41779c2f34 (patch)
treee19f80d5fcaebcac50b9794a03035896b9675d15 /bfd/elf32-vax.c
parent886815b26678f1a166311140f5ab72cbf715beb4 (diff)
downloadgdb-04981bc1fb2151ec0d6adf57793eea41779c2f34.zip
gdb-04981bc1fb2151ec0d6adf57793eea41779c2f34.tar.gz
gdb-04981bc1fb2151ec0d6adf57793eea41779c2f34.tar.bz2
bfd/
* elf32-vax.c (elf_vax_relocate_section): For symbol references from an executable to a shared library treat R_VAX_PC32 relocations as R_VAX_PLT32 ones.
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 516734d..80c5046 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1544,6 +1544,14 @@ elf_vax_relocate_section (bfd *output_bfd,
}
break;
+ case R_VAX_PC32:
+ /* If we are creating an executable and the function this
+ reloc refers to is in a shared lib, then we made a PLT
+ entry for this symbol and need to handle the reloc like
+ a PLT reloc. */
+ if (info->shared)
+ goto r_vax_pc32_shared;
+ /* Fall through. */
case R_VAX_PLT32:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
@@ -1605,7 +1613,7 @@ elf_vax_relocate_section (bfd *output_bfd,
case R_VAX_PC8:
case R_VAX_PC16:
- case R_VAX_PC32:
+ r_vax_pc32_shared:
if (h == NULL
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
|| h->forced_local)