diff options
author | Alan Modra <amodra@gmail.com> | 2001-10-04 05:50:29 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-10-04 05:50:29 +0000 |
commit | 3a6b85972003a5a77d9dd3a53a5832066a8de9d1 (patch) | |
tree | a4c5ce272187f777ca7699d82ae14f92dd01a57e | |
parent | b13c7b49d61258f2d3ae2224d55896e80e251942 (diff) | |
download | gdb-3a6b85972003a5a77d9dd3a53a5832066a8de9d1.zip gdb-3a6b85972003a5a77d9dd3a53a5832066a8de9d1.tar.gz gdb-3a6b85972003a5a77d9dd3a53a5832066a8de9d1.tar.bz2 |
* elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
to 1 rather than 0 to avoid confusing copy_indirect_symbol.
(mips_elf_sort_hash_table_f): Compare got.offset against 1.
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf32-mips.c | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 90d3bac..1108a5e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2001-10-04 Alan Modra <amodra@bigpond.net.au> + * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset + to 1 rather than 0 to avoid confusing copy_indirect_symbol. + (mips_elf_sort_hash_table_f): Compare got.offset against 1. + * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those backends we configure. Run "make dep-am". diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index bba115f..fd79bba 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -5502,14 +5502,15 @@ mips_elf_record_global_got_symbol (h, info, g) && !bfd_elf32_link_record_dynamic_symbol (info, h)) return false; - /* If we've already marked this entry as need GOT space, we don't + /* If we've already marked this entry as needing GOT space, we don't need to do it again. */ - if (h->got.offset != (bfd_vma) - 1) + if (h->got.offset != (bfd_vma) -1) return true; /* By setting this to a value other than -1, we are indicating that - there needs to be a GOT entry for H. */ - h->got.offset = 0; + there needs to be a GOT entry for H. Avoid using zero, as the + generic ELF copy_indirect_symbol tests for <= 0. */ + h->got.offset = 1; return true; } @@ -5547,7 +5548,7 @@ mips_elf_sort_hash_table_f (h, data) if (h->root.dynindx == -1) return true; - if (h->root.got.offset != 0) + if (h->root.got.offset != 1) h->root.dynindx = hsd->max_non_got_dynindx++; else { |