diff options
author | Nick Clifton <nickc@redhat.com> | 2013-04-03 14:21:18 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-04-03 14:21:18 +0000 |
commit | cb8af559c12b9a85acb429fed4d59e858574a43c (patch) | |
tree | a16f6f77f0ca2c24cb5dbed5492bc9d1be678f3b /bfd | |
parent | 203f0950a35c87f17016045f1cd5a0460b445532 (diff) | |
download | gdb-cb8af559c12b9a85acb429fed4d59e858574a43c.zip gdb-cb8af559c12b9a85acb429fed4d59e858574a43c.tar.gz gdb-cb8af559c12b9a85acb429fed4d59e858574a43c.tar.bz2 |
* elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
elf64_aarch64_locals to get local GOT reference counts.
* ld-aarch64/gc-relocs-tlsle.s: New gc section test.
* ld-aarch64/gc-relocs-tlsle.s: Likewise
* ld-aarch64/gc-relocs-tlsgd.s: Likewise
* ld-aarch64/gc-relocs-tlsdesc.s: Likewise
* ld-aarch64/gc-relocs-312.s: Likewise
* ld-aarch64/gc-relocs-311.s: Likewise
* ld-aarch64/gc-relocs-309.s: Likewise
* ld-aarch64/gc-start.s: Likewise
* ld-aarch64/gc-got-relocs.d: Update expected objdump
* ld-aarch64/gc-tls-relocs.d: Likewise
* ld-aarch64/aarch64-elf.exp: add test
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-aarch64.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d854fd0..bbcb8b5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-04-03 Venkataramanan Kumar <venkataramanan.kumar@linaro.org> + + * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use + elf64_aarch64_locals to get local GOT reference counts. + 2013-04-02 DJ Delorie <dj@redhat.com> * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get. diff --git a/bfd/elf64-aarch64.c b/bfd/elf64-aarch64.c index c3b9fc8..540b275 100644 --- a/bfd/elf64-aarch64.c +++ b/bfd/elf64-aarch64.c @@ -4869,16 +4869,15 @@ elf64_aarch64_print_private_bfd_data (bfd *abfd, void *ptr) /* Update the got entry reference counts for the section being removed. */ static bfd_boolean -elf64_aarch64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info ATTRIBUTE_UNUSED, - asection *sec ATTRIBUTE_UNUSED, - const Elf_Internal_Rela * - relocs ATTRIBUTE_UNUSED) +elf64_aarch64_gc_sweep_hook (bfd *abfd, + struct bfd_link_info *info, + asection *sec, + const Elf_Internal_Rela * relocs) { struct elf64_aarch64_link_hash_table *htab; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; - bfd_signed_vma *local_got_refcounts; + struct elf_aarch64_local_symbol *locals; const Elf_Internal_Rela *rel, *relend; if (info->relocatable) @@ -4894,7 +4893,7 @@ elf64_aarch64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED, symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); - local_got_refcounts = elf_local_got_refcounts (abfd); + locals = elf64_aarch64_locals (abfd); relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; rel++) @@ -4965,10 +4964,10 @@ elf64_aarch64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED, if (h->got.refcount > 0) h->got.refcount -= 1; } - else if (local_got_refcounts != NULL) + else if (locals != NULL) { - if (local_got_refcounts[r_symndx] > 0) - local_got_refcounts[r_symndx] -= 1; + if (locals[r_symndx].got_refcount > 0) + locals[r_symndx].got_refcount -= 1; } break; |