diff --git a/gnu/dist/toolchain/bfd/elf32-vax.c b/gnu/dist/toolchain/bfd/elf32-vax.c index 22b7055d5572..7680a1f2752a 100644 --- a/gnu/dist/toolchain/bfd/elf32-vax.c +++ b/gnu/dist/toolchain/bfd/elf32-vax.c @@ -1682,20 +1682,21 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section, BFD_ASSERT (sgot != NULL); } + if (!elf_hash_table (info)->dynamic_sections_created + || (info->shared + && info->symbolic + && (h == NULL + || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))) + { + /* This is actually a static link, or it is a + -Bsymbolic link and the symbol is defined + locally. Change the GOT32 entry to a PC32 + entry. */ + break; + } + if (h != NULL) { - if (!elf_hash_table (info)->dynamic_sections_created - || (info->shared - && info->symbolic - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) - { - /* This is actually a static link, or it is a - -Bsymbolic link and the symbol is defined - locally. Change the GOT32 entry to a PC32 - entry. */ - break; - } - off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1);