[PATCH] D90897: [llvm-objcopy] --only-keep-debug: place zero-size segment according to its parent segment

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 00:26:27 PST 2020


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM - I realised last night whilst thinking about this that we can always enhance this further if the need arises - this change doesn't degrade the experience for any user, whilst improving it for the majority of use-cases.



================
Comment at: llvm/tools/llvm-objcopy/ELF/Object.cpp:2313
   for (Segment *Seg : Segments) {
+    // An empty segment has no containing section (see sectionWithinSegment).
+    // If it has a parent segment, copy the parent segment's offset field. This
----------------
"no containing section" implies to me that there is no section that is a parent of the segment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90897



More information about the llvm-commits mailing list