diff options
author | Matt Thomas <matt@3am-software.com> | 2007-04-06 16:29:32 +0000 |
---|---|---|
committer | Matt Thomas <matt@3am-software.com> | 2007-04-06 16:29:32 +0000 |
commit | 3a5a1d9d7d842e69ffbc71f3736f725cdb718795 (patch) | |
tree | 5667737a18c31aad84211577505df41f643f6f53 | |
parent | 7a0eba832681377b30ec4da14a3e919629cf5df4 (diff) | |
download | gdb-3a5a1d9d7d842e69ffbc71f3736f725cdb718795.tar.gz |
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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-vax.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 813c13dcaae..cfaa72ffb62 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +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. + 2007-04-05 H.J. Lu <hongjiu.lu@intel.com> PR ld/4304 diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index fce01e21579..7df71655b7b 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -1625,8 +1625,9 @@ elf_vax_relocate_section (bfd *output_bfd, && ((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; |