diff options
author | Alan Modra <amodra@gmail.com> | 2018-03-19 20:19:50 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-03-21 21:43:38 +1030 |
commit | 4bad6366a74c9cdf92e6aef3849c29771c77af36 (patch) | |
tree | bebee93abb33a6f74ae8d820d75abcf0ca9af88a /bfd | |
parent | bac3c8c5e7fb88ddb3615b895ad57847b9842171 (diff) | |
download | gdb-4bad6366a74c9cdf92e6aef3849c29771c77af36.zip gdb-4bad6366a74c9cdf92e6aef3849c29771c77af36.tar.gz gdb-4bad6366a74c9cdf92e6aef3849c29771c77af36.tar.bz2 |
Delete unused elf32-ppc.c code
Local symbols were being read but not used.
* elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 24 |
2 files changed, 4 insertions, 24 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 646bb4f..9885d2d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2018-03-21 Alan Modra <amodra@gmail.com> + * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms. + +2018-03-21 Alan Modra <amodra@gmail.com> + * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index e0456b8..c82e405 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5190,7 +5190,6 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, for (pass = 0; pass < 2; ++pass) for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) { - Elf_Internal_Sym *locsyms = NULL; Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd); asection *got2 = bfd_get_section_by_name (ibfd, ".got2"); @@ -5370,20 +5369,6 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct plt_entry **local_plt; unsigned char *lgot_masks; - if (locsyms == NULL) - { - locsyms = (Elf_Internal_Sym *) symtab_hdr->contents; - if (locsyms == NULL) - locsyms = bfd_elf_get_elf_syms (ibfd, symtab_hdr, - symtab_hdr->sh_info, - 0, NULL, NULL, NULL); - if (locsyms == NULL) - { - if (elf_section_data (sec)->relocs != relstart) - free (relstart); - return FALSE; - } - } lgot_refs = elf_local_got_refcounts (ibfd); if (lgot_refs == NULL) abort (); @@ -5409,15 +5394,6 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, if (elf_section_data (sec)->relocs != relstart) free (relstart); } - - if (locsyms != NULL - && (symtab_hdr->contents != (unsigned char *) locsyms)) - { - if (!info->keep_memory) - free (locsyms); - else - symtab_hdr->contents = (unsigned char *) locsyms; - } } htab->do_tls_opt = 1; return TRUE; |