]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ppc64_elf_edit_opd revamp
authorAlan Modra <amodra@gmail.com>
Tue, 2 Dec 2014 04:39:16 +0000 (15:09 +1030)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 24 Aug 2017 12:46:38 +0000 (09:46 -0300)
commit1e878711c99afa1e0c9165e92bde0317be1dc53f
tree477669cd43fc52e99c64c7cd35223b1a7b6e6420
parent0c5f233a990f9157d0440a60025cda731ba06953
ppc64_elf_edit_opd revamp

This patch sorts .opd relocs (see pr17666) and allows .opd sections
with a mix of 16 and 24 byte entries to be edited.

* elf64-ppc.c (OPD_NDX): Define.  Use throughout for sizing/indexing
_opd_sec_data array, halving required memory.
(sort_r_offset): New function.
(ppc64_elf_edit_opd): Sort incoming relocs.  Accept .opd
sections with a mix of 16 and 24 byte OPD entries.  Don't
attempt to honour --non-overlapping-opd for .opd sections with
unexpected relocs.  Simplify opd entry size calculations by
first finding the reloc for the next entry.  Make edit loop
handle one opd entry per iteration, with an inner loop
handling relocs per entry.
bfd/ChangeLog
bfd/elf64-ppc.c