diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-08-07 20:01:38 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2008-08-07 20:01:38 +0000 |
commit | aff469fa8d827ab43af54944ad74865e918c979e (patch) | |
tree | e87635f0d6166a468faf114fff535f3c7ea22827 | |
parent | 23cc69b6636ef7c99fd9b1e076d683e1a96283df (diff) | |
download | gdb-aff469fa8d827ab43af54944ad74865e918c979e.zip gdb-aff469fa8d827ab43af54944ad74865e918c979e.tar.gz gdb-aff469fa8d827ab43af54944ad74865e918c979e.tar.bz2 |
bfd/
* elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
global GOT entry when deferring allocation of dynamic relocations.
(allocate_dynrelocs): When allocating deferred dynamic relocations,
also do the deferred allocation of a GOT entry.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 21 |
2 files changed, 13 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 581e89b..9b6d808 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com> + * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a + global GOT entry when deferring allocation of dynamic relocations. + (allocate_dynrelocs): When allocating deferred dynamic relocations, + also do the deferred allocation of a GOT entry. + +2008-08-07 Richard Sandiford <rdsandiford@googlemail.com> + * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field. (mips_elf_got_section): Delete. (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 36c94d5..4e1481b 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -7274,21 +7274,6 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, are relocations against the text segment. */ hmips->readonly_reloc = TRUE; } - - /* Even though we don't directly need a GOT entry for - this symbol, a symbol must have a dynamic symbol - table index greater that DT_MIPS_GOTSYM if there are - dynamic relocations against it. This does not apply - to VxWorks, which does not have the usual coupling - between global GOT entries and .dynsym entries. */ - if (h != NULL && !htab->is_vxworks) - { - struct mips_elf_link_hash_entry *hmips; - - hmips = (struct mips_elf_link_hash_entry *) h; - if (hmips->global_got_area > GGA_RELOC_ONLY) - hmips->global_got_area = GGA_RELOC_ONLY; - } } if (SGI_COMPAT (abfd)) @@ -7585,6 +7570,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (do_copy) { + /* Even though we don't directly need a GOT entry for this symbol, + a symbol must have a dynamic symbol table index greater that + DT_MIPS_GOTSYM if there are dynamic relocations against it. */ + if (hmips->global_got_area > GGA_RELOC_ONLY) + hmips->global_got_area = GGA_RELOC_ONLY; + mips_elf_allocate_dynamic_relocations (dynobj, info, hmips->possibly_dynamic_relocs); if (hmips->readonly_reloc) |