aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-28 06:34:52 +0000
committerFangrui Song <maskray@google.com>2019-05-28 06:34:52 +0000
commitcfca5095df0209c60109696d6cc368d49e2c5939 (patch)
tree806d70704e7f0bb96b734d9d0762e955a3a808bf /llvm/lib/Object/MachOObjectFile.cpp
parentd8f8abbd4a2823f223bd7bc56445541fb221b512 (diff)
downloadllvm-cfca5095df0209c60109696d6cc368d49e2c5939.zip
llvm-cfca5095df0209c60109696d6cc368d49e2c5939.tar.gz
llvm-cfca5095df0209c60109696d6cc368d49e2c5939.tar.bz2
[ELF] Error on relocations to STT_SECTION symbols if the sections were discarded
This is implemented by creating Undefined (instead of Defined) for such local STT_SECTION symbols. It allows us to catch errors when there are relocations to such discarded sections (e.g. in PR41693, ld.bfd and gold error but we don't). Updated comdat-discarded-error.s checks we emit friendly error message. For relocatable-eh-frame.s, ld.lld -r a.o a.o will now error "STT_SECTION symbol should be defined" because the section .eh_frame refers to is now an Undefined instead of a Defined. So I have to change `error()` to `warn()` to retain the output. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D61583 llvm-svn: 361792
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions