summaryrefslogtreecommitdiff
path: root/bfd
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
commit3683b7aa445d7877506a9d57f6496f3aa3c9c4e8 (patch)
tree2f94e119b05d03bdbcadf9397451a260dffba88d /bfd
parent23fa121b8244225b841493b59654cbbfe6bc3b91 (diff)
downloadbinutils-redhat-3683b7aa445d7877506a9d57f6496f3aa3c9c4e8.tar.gz
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')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-vax.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 15ee34eef3..211e0a56fa 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
+ * 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.
+
+2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
+
* elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
symbols in GOT space calculation.
(elf_vax_relocate_section): Adjust accordingly.
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 516734d30b..80c5046d28 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)