mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
ppc64_elf_edit_opd revamp, take 2
Now that ld -r relocs are sorted by the pr17666 fix, there isn't so much need to sort incoming relocs. * elf64-ppc.c (sort_r_offset): Delete. (ppc64_elf_edit_opd): Don't sort input relocs.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-12-09 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* elf64-ppc.c (sort_r_offset): Delete.
|
||||||
|
(ppc64_elf_edit_opd): Don't sort input relocs.
|
||||||
|
|
||||||
2014-12-06 Eric Botcazou <ebotcazou@adacore.com>
|
2014-12-06 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* config.bfd: Add Visium support.
|
* config.bfd: Add Visium support.
|
||||||
|
@ -7589,21 +7589,6 @@ dec_dynrel_count (bfd_vma r_info,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* qsort comparison function sorting relocs by r_offset. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
sort_r_offset (const void *p, const void *q)
|
|
||||||
{
|
|
||||||
const Elf_Internal_Rela *a = (const Elf_Internal_Rela *) p;
|
|
||||||
const Elf_Internal_Rela *b = (const Elf_Internal_Rela *) q;
|
|
||||||
|
|
||||||
if (a->r_offset < b->r_offset)
|
|
||||||
return -1;
|
|
||||||
else if (a->r_offset > b->r_offset)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove unused Official Procedure Descriptor entries. Currently we
|
/* Remove unused Official Procedure Descriptor entries. Currently we
|
||||||
only remove those associated with functions in discarded link-once
|
only remove those associated with functions in discarded link-once
|
||||||
sections, or weakly defined functions that have been overridden. It
|
sections, or weakly defined functions that have been overridden. It
|
||||||
@ -7657,7 +7642,6 @@ ppc64_elf_edit_opd (struct bfd_link_info *info)
|
|||||||
info->keep_memory);
|
info->keep_memory);
|
||||||
if (relstart == NULL)
|
if (relstart == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
qsort (relstart, sec->reloc_count, sizeof (*relstart), sort_r_offset);
|
|
||||||
|
|
||||||
/* First run through the relocs to check they are sane, and to
|
/* First run through the relocs to check they are sane, and to
|
||||||
determine whether we need to edit this opd section. */
|
determine whether we need to edit this opd section. */
|
||||||
|
Reference in New Issue
Block a user