diff options
author | Tejas Belagod <tejas.belagod@arm.com> | 2014-11-25 14:51:24 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-12-02 08:29:41 +0800 |
commit | 5387e7a81fcd3e033a29eccece64e02f96e7f960 (patch) | |
tree | c0d69c3b5b2175172278bad40b1a644dda3a1d2a /binutils-2.25/bfd/coffswap.h | |
parent | e2b060be9823f53d2acd7bc7b5fe06cc4d940063 (diff) | |
download | toolchain_binutils-5387e7a81fcd3e033a29eccece64e02f96e7f960.zip toolchain_binutils-5387e7a81fcd3e033a29eccece64e02f96e7f960.tar.gz toolchain_binutils-5387e7a81fcd3e033a29eccece64e02f96e7f960.tar.bz2 |
Fixed Cortex-A53 Erratum 835769 -- LD segfaults with unordered maps.
The BFD/LD patch for Cortex-A53 erratum 835769
(https://sourceware.org/ml/binutils/2014-10/msg00199.html)
does not handle a particular case of the AArch64 ELF ABI where mapping
symbols are allowed to be unordered in the symbol table (not in address order).
The unordering causes section maps to be traversed with incorrect span boundaries
(in the erratum scanning function) which causes memory faults. The attached
patch fixes this issue by ordering the section maps by their 'vma' before
starting to traverse them.
While this is not an issue with a the GNU toolchain, it is a potential issue
with Clang/LLVM. We have observed at least one case where LLVM generates an
ELF object with mapping symbols unordered in the symbol table and causes a fault.
We have been unable to construct a test case with the GNU toolchain. We have verified
by manual inspection the correctness of the traversal with this patch for an
LLVM-generated ELF object which triggered this issue. This patch has been bootstrapped
on aarch64-linux and regressed.
Change-Id: I75622055b01eeb3038d5600c9eea395585e54aca
Diffstat (limited to 'binutils-2.25/bfd/coffswap.h')
0 files changed, 0 insertions, 0 deletions