[PATCH] D38260: [llvm-objcopy] Add support for removing sections

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 01:41:13 PDT 2017


jhenderson added a comment.

In https://reviews.llvm.org/D38260#884729, @jakehehrlich wrote:

> I can add the test but it's worth pointing out that the reason the segments get placed together has nothing to do with Section 2 being removed or not removed.


I see your point. However, I think it is still worth adding a remove-section version of the test you added in https://reviews.llvm.org/D38436, as it will demonstrate that the section is removed properly, and that no space is allocated for it at the end. It means that even if the layout algorithm changes, the correct behaviour is still tested for this case. Ideally, I'd then like to see that the trailing sections (.symtab, .strtab etc) appear directly after the final segment, without any gap caused by the removed section.



================
Comment at: test/tools/llvm-objcopy/segment-test-remove-section.test:2
+# This test is checking to ensure that if a section is removed in the presence
+# of a segment that the segment maintains it's shape and properties and that any
+# section inside that segment maintains the relative positioning it had in the
----------------
There's another it's -> its here.


Repository:
  rL LLVM

https://reviews.llvm.org/D38260





More information about the llvm-commits mailing list