summaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c5
1 files changed, 3 insertions, 2 deletions
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;