[ELF] Guard --fix-cortex-a53-843419 against --just-syms
authorPeter Smith <peter.smith@linaro.org>
Thu, 13 Sep 2018 15:49:13 +0000 (15:49 +0000)
committerPeter Smith <peter.smith@linaro.org>
Thu, 13 Sep 2018 15:49:13 +0000 (15:49 +0000)
commitf31f596152befc309a83f00f164b8145ca9485b3
treee016f6fa929626daf4a27d264ae54ccc9a01eff8
parent4dce517c474f97ba74ed07de05786680ad8233be
[ELF] Guard --fix-cortex-a53-843419 against --just-syms

If --just-syms is used the mapping symbols from the ELF file will be
absolute symbols with no section. The code to process mapping symbols in
--fix-cortex-a53-843419 assumes that these symbols have a defining section
so a crash will result when --just-syms is used. The simple fix is to not
process the symbol when it doesn't have a section.

Fixes PR37971

Differential Revision: https://reviews.llvm.org/D52038

llvm-svn: 342146
lld/ELF/AArch64ErrataFix.cpp
lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s [new file with mode: 0644]