[PATCH] D43996: [llvm-objcopy] Implement support for .group sections.

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 02:54:30 PST 2018


alexshap added a comment.

it's not about stripping the .group itself, it's about the validity of the binary (even if we strip smth else/unrelated). Let me try to explain what i mean:  the thing is that if we remove a section from a binary the indices of other sections (which go after the removed one) will change. The content of the section .group is essentially an array of indices of some set of sections, thus we need to recalculate them (because they could have changed). The same issue is with sh_link and sh_info (so without this diff llvm-objcopy creates invalid binaries and the linker either crashes or doesn't work properly).


Repository:
  rL LLVM

https://reviews.llvm.org/D43996





More information about the llvm-commits mailing list