If .bss doesn't exist, set _end/end based on .data.

llvm-svn: 190753
This commit is contained in:
Joerg Sonnenberger 2013-09-14 13:59:49 +00:00
parent 4263d8b35d
commit 9e5676c5c8
1 changed files with 4 additions and 0 deletions

View File

@ -129,6 +129,10 @@ template <class ELFT> void ExecutableWriter<ELFT>::finalizeDefaultAtomValues() {
bssSection->virtualAddr() + bssSection->memSize();
(*underScoreEndAtomIter)->_virtualAddr = (*bssEndAtomIter)->_virtualAddr;
(*endAtomIter)->_virtualAddr = (*bssEndAtomIter)->_virtualAddr;
} else if (auto dataSection = this->_layout->findOutputSection(".data")) {
(*underScoreEndAtomIter)->_virtualAddr =
dataSection->virtualAddr() + dataSection->memSize();
(*endAtomIter)->_virtualAddr = (*underScoreEndAtomIter)->_virtualAddr;
}
// Give a chance for the target to finalize its atom values