diff options
author | Fangrui Song <maskray@google.com> | 2019-05-20 11:25:55 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-20 11:25:55 +0000 |
commit | 7c7425483ae621c5f197e999c0b49a8cdd5c5ace (patch) | |
tree | e09f7310314e007bb84e33611496e3ee77dd95b9 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 95805bc425b264805a472232a75ed2ffe58aceda (diff) | |
download | llvm-7c7425483ae621c5f197e999c0b49a8cdd5c5ace.zip llvm-7c7425483ae621c5f197e999c0b49a8cdd5c5ace.tar.gz llvm-7c7425483ae621c5f197e999c0b49a8cdd5c5ace.tar.bz2 |
[ELF] Error on relocations to local undefined symbols
For a reference to a local symbol, ld.bfd and gold error if the symbol
is defined in a discarded section but accept it if the symbol is
undefined. This inconsistent behavior seems unnecessary for us (it
probably makes sense for them as they differentiate local/global
symbols, the error would mean more code).
Weaken the condition to getSymbol(Config->IsMips64EL) == 0 to catch such
errors. The symbol index can be 0 (e.g. R_*_NONE R_ARM_V4BX) and we shouldn't error on them.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D61563
llvm-svn: 361144
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions