[PATCH] D85100: [ELF] Allow sections after a non-SHF_ALLOC section to be covered by PT_LOAD

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 08:19:06 PDT 2020


psmith added a comment.

FWIW this looks good to me too.



================
Comment at: lld/ELF/Writer.cpp:1237
               std::vector<BaseCommand *>::iterator e) {
+  // To make the addresses of orphan sections not affected by orphan
+  // non-SHF_ALLOC sections in the middle, place orphan non-SHF_ALLOC sections
----------------
I suggest rewording:
```
// To make the addresses of orphan sections not affected by orphan
// non-SHF_ALLOC sections in the middle, place orphan non-SHF_ALLOC sections
// at the end.
```
as
```
// OutputSections without the SHF_ALLOC flag are not part of the memory image and
// are given an address starting at 0. Place any orphan sections without the SHF_ALLOC
// flag at the end so that these do not affect the address assignment of OutputSections
// with the SHF_ALLOC flag.
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85100/new/

https://reviews.llvm.org/D85100



More information about the llvm-commits mailing list