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

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 08:39:01 PDT 2020


ikudrin added a comment.

In D80511#2054128 <https://reviews.llvm.org/D80511#2054128>, @jhenderson wrote:

> 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).


As far as I can see, the symbol is removed.

> 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.

The objects which represent the sections are not actually deleted, just moved to `Object::RemovedSections` to be used later in `ELFWriter<ELFT>::writeSegmentData()`. Thus, there are no dangling pointers.


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

https://reviews.llvm.org/D80511





More information about the llvm-commits mailing list