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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 02:07:54 PDT 2020


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

In D80511#2054966 <https://reviews.llvm.org/D80511#2054966>, @ikudrin wrote:

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


Indeed, that's the current state of the code, so it should work, but it won't necessarily apply in the event of a future refactor. Anyway, LGTM, since this is not really part of this change.


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

https://reviews.llvm.org/D80511





More information about the llvm-commits mailing list