aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-08-23 18:44:34 +0000
committerPetr Hosek <phosek@chromium.org>2017-08-23 18:44:34 +0000
commitb93c5b9f7e6d098b813af3a580e9efee0fcaaa41 (patch)
treedfa0567beac2d8792a9ddc4b9bce5e029ba4ef08 /llvm/lib/Object/WasmObjectFile.cpp
parent5b7cc3600a2f12bfe54163d81c38c26491d4c0ef (diff)
downloadllvm-b93c5b9f7e6d098b813af3a580e9efee0fcaaa41.zip
llvm-b93c5b9f7e6d098b813af3a580e9efee0fcaaa41.tar.gz
llvm-b93c5b9f7e6d098b813af3a580e9efee0fcaaa41.tar.bz2
[ELF] Don't output headers into a segment if there's no space for them
Currently, LLD checks whether there's enough space for headers by checking if headers fit below the address of the first allocated section. However, that's always thue if the binary doesn't start at zero which means that LLD always emits a segment for headers, even if no other sections belong to that segment. This is a problem in cases when linker script is being used with a non-zero start address when we don't want to make the headers visible by not leaving enough space for them. This pattern is common in embedded programming but doesn't work in LLD. This patch changes the behavior of LLD in case when linker script is being to match the behavior of BFD ld and gold, which is to only place headers into a segment when they're covered by some output section. Differential Revision: https://reviews.llvm.org/D36256 llvm-svn: 311586
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions