mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
Remove some dead code from elf64_aarch64_check_relocs.
bfd/ChangeLog: 2013-04-25 Will Newton <will.newton@linaro.org> * elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2013-04-26 Will Newton <will.newton@linaro.org>
|
||||||
|
|
||||||
|
* elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
|
||||||
|
|
||||||
2013-04-25 Alan Modra <amodra@gmail.com>
|
2013-04-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* config.bfd: Add powerpc64le-linux.
|
* config.bfd: Add powerpc64le-linux.
|
||||||
|
@ -5141,8 +5141,6 @@ elf64_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|||||||
|
|
||||||
struct elf64_aarch64_link_hash_table *htab;
|
struct elf64_aarch64_link_hash_table *htab;
|
||||||
|
|
||||||
unsigned long nsyms;
|
|
||||||
|
|
||||||
if (info->relocatable)
|
if (info->relocatable)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -5153,7 +5151,6 @@ elf64_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|||||||
|
|
||||||
symtab_hdr = &elf_symtab_hdr (abfd);
|
symtab_hdr = &elf_symtab_hdr (abfd);
|
||||||
sym_hashes = elf_sym_hashes (abfd);
|
sym_hashes = elf_sym_hashes (abfd);
|
||||||
nsyms = NUM_SHDR_ENTRIES (symtab_hdr);
|
|
||||||
|
|
||||||
rel_end = relocs + sec->reloc_count;
|
rel_end = relocs + sec->reloc_count;
|
||||||
for (rel = relocs; rel < rel_end; rel++)
|
for (rel = relocs; rel < rel_end; rel++)
|
||||||
@ -5172,18 +5169,7 @@ elf64_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_symndx >= nsyms
|
if (r_symndx < symtab_hdr->sh_info)
|
||||||
/* PR 9934: It is possible to have relocations that do not
|
|
||||||
refer to symbols, thus it is also possible to have an
|
|
||||||
object file containing relocations but no symbol table. */
|
|
||||||
&& (r_symndx > 0 || nsyms > 0))
|
|
||||||
{
|
|
||||||
(*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd,
|
|
||||||
r_symndx);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nsyms == 0 || r_symndx < symtab_hdr->sh_info)
|
|
||||||
h = NULL;
|
h = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user