[PATCH] D36558: [llvm-objcopy] Add support for nested and overlapping segments
Jake Ehrlich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 14:22:58 PDT 2017
jakehehrlich added inline comments.
================
Comment at: tools/llvm-objcopy/Object.cpp:432
+ for (auto &Segment : OrderedSegments) {
+ if (Segment->Type == PT_GNU_STACK)
+ continue;
----------------
jhenderson wrote:
> Why is PT_GNU_STACK special?
For the purposes of skipping it here it is special because it has no alignment and it's offset must be zero. In general segments should have non-zero alignment.. It's more generally special however. All of it's fields are zero (including address, offset, and size) except for the flags. It isn't nested in another loadable segment but it also doesn't cover any section.
I skip it here because it needs to maintain a zero offset and it causes align to fail (when I originally wrote this diff, the new layout algorithm wasn't a part of it so I didn't have this issue)
Repository:
rL LLVM
https://reviews.llvm.org/D36558
More information about the llvm-commits
mailing list