This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] bfd: VAX PCREL relocs for DWARF2
- From: Matt Thomas <matt at 3am-software dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 6 Apr 2007 09:32:04 -0700
- Subject: [committed] bfd: VAX PCREL relocs for DWARF2
2007-04-03 Matt Thomas <matt@netbsd.org>
* elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
in a shared object if it is not in a CODE section or if it is against
a section symbol. This allows DWARF2 to use pcrel format.
Index: elf32-vax.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-vax.c,v
retrieving revision 1.41
diff -u -r1.41 elf32-vax.c
--- elf32-vax.c 26 Mar 2007 12:23:02 -0000 1.41
+++ elf32-vax.c 6 Apr 2007 16:27:11 -0000
@@ -1625,8 +1625,9 @@
&& ((r_type != R_VAX_PC8
&& r_type != R_VAX_PC16
&& r_type != R_VAX_PC32)
- || (!info->symbolic
- || !h->def_regular)))
+ || ((input_section->flags & SEC_CODE)
+ && (!info->symbolic
+ || (!h->def_regular && h->type != STT_SECTION)))))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;