[PATCH] D17601: [ELF] - Define special symbols _etext and _edata
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 05:17:16 PST 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/Writer.cpp:1453
@@ +1452,3 @@
+ for (OutputSectionBase<ELFT> *Sec : OutputSections) {
+ bool Alloc = Sec->getFlags() & SHF_ALLOC;
+ // _etext points to location after the last read-only loadable segment.
----------------
if (Sec->getFlags() & SHF_ALLOC)
continue;
================
Comment at: ELF/Writer.cpp:1454-1455
@@ +1453,4 @@
+ bool Alloc = Sec->getFlags() & SHF_ALLOC;
+ // _etext points to location after the last read-only loadable segment.
+ // _edata points to the end of the last non SHT_NOBITS section.
+ if (Alloc && !(Sec->getFlags() & SHF_WRITE))
----------------
Move this comment before this for loop.
http://reviews.llvm.org/D17601
More information about the llvm-commits
mailing list