ELF: Correctly set edata if there are no .bss sections.
authorPeter Collingbourne <peter@pcc.me.uk>
Sun, 29 Oct 2017 22:31:48 +0000 (22:31 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Sun, 29 Oct 2017 22:31:48 +0000 (22:31 +0000)
commite662436114879dec3617387ac99bb4d357f38930
treef9855c94db1ba3ab2f7c40b7e39c343b2cebdf8b
parentda4d26dfa313deea81f87c3cb005a272c5411fca
ELF: Correctly set edata if there are no .bss sections.

edata needs to be set to the end of the last mapped initialized
section. We were previously mishandling the case where there were no
non-mapped sections by setting it to the end of the last section in
the output file.

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

llvm-svn: 316877
lld/ELF/Writer.cpp
lld/test/ELF/edata-no-bss.s [new file with mode: 0644]