[PATCH] D80511: [llvm-objcopy][ELF] Fix removing ".group" sections.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 01:35:10 PDT 2020


jhenderson added a comment.

Sounds reasonable to me. I don't think this behaviour (removing .group sections) has been considered before. Some testing related to that behaviour that we should probably have, but which is outside the scope of this change is to show that you can remove a signature symbol, if the .group section has been removed (assuming that it works of course). Something else that I'm wondering perhaps DOES belong with this change - should we test that if you remove a group section in the same run as removing a member of that group no problems occur? I could imagine an issue with dangling pointers if we didn't do things properly.



================
Comment at: llvm/test/tools/llvm-objcopy/ELF/remove-section-group.test:6-7
+
+# This checks that when the header section of a group is removed, the tool drops
+# the flag SHF_GROUP for preserved members of that group.
+
----------------
Nit: use '##' for comments for easy distinction from test commands.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/remove-section-group.test:29
+
+# CHECK:        Section {
+# CHECK:          Name: .foo
----------------
Up to you, but you can probably also delete this line too, as you are only dumping sections.


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

https://reviews.llvm.org/D80511





More information about the llvm-commits mailing list