2007-04-03 Matt Thomas <matt@netbsd.org>
[binutils-gdb.git] / bfd / elf32-vax.c
index fce01e21579a0120061d685e00729104104ae844..7df71655b7b2dec8795ff400ddcc19ff2db98645 100644 (file)
@@ -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;