diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2013-05-20 23:28:32 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2013-05-20 23:28:32 +0000 |
commit | 8be65dd3d973608a68e4cbd7958d58980c081824 (patch) | |
tree | ada3aeb67f7c93678afe639e176ff62de073b9ba /bfd/elf32-vax.c | |
parent | 6c9e2db469f1c0783213045c6d7680078575f641 (diff) | |
download | gdb-8be65dd3d973608a68e4cbd7958d58980c081824.zip gdb-8be65dd3d973608a68e4cbd7958d58980c081824.tar.gz gdb-8be65dd3d973608a68e4cbd7958d58980c081824.tar.bz2 |
* elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
refcount member of the gotplt_union when resetting the reference
count. Adjust comment.
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r-- | bfd/elf32-vax.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index e90ffa7..77b8e0d 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -1262,10 +1262,10 @@ elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, /* This function is called via elf_link_hash_traverse. It looks for entries that have GOT or PLT (.GOT) references. If creating a static object or a - shared object with -Bsymbolic, it resets the reference count back to 0 - and sets the offset to -1 so normal PC32 relocation will be done. If - creating a shared object or executable, space in the .got and .rela.got - will be reserved for the symbol. */ + shared object with -Bsymbolic, or the symbol has been forced local, then + it resets the reference count back to -1 so normal PC32 relocation will + be done. Otherwise space in the .got and .rela.got will be reserved for + the symbol. */ static bfd_boolean elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) @@ -1290,10 +1290,8 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) || (info->shared && info->symbolic) || h->forced_local) { - h->got.refcount = 0; - h->got.offset = (bfd_vma) -1; - h->plt.refcount = 0; - h->plt.offset = (bfd_vma) -1; + h->got.refcount = -1; + h->plt.refcount = -1; } else if (h->got.refcount > 0) { |