diff options
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r-- | bfd/elf32-vax.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index fa84e0b..b5c3d89 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -712,6 +712,11 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, h->plt.refcount++; } + /* Non-GOT reference may need a copy reloc in executable or + a dynamic reloc in shared library. */ + if (h != NULL) + h->non_got_ref = 1; + /* If we are creating a shared library, we need to copy the reloc into the shared library. */ if (bfd_link_pic (info) @@ -929,6 +934,11 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, if (bfd_link_pic (info)) return TRUE; + /* If there are no references to this symbol that do not use the + GOT relocation, we don't need to generate a copy reloc. */ + if (!h->non_got_ref) + return TRUE; + /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be an entry for this symbol in the .dynsym section. The dynamic |