OSDN Git Service

[llvm-objcopy][ELF] Fix removing SHT_GROUP sections.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 29 May 2020 12:27:28 +0000 (19:27 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 29 May 2020 13:24:53 +0000 (20:24 +0700)
commita9313282cd5413ed498dceb763ebba12ea5bdecd
tree834c56de6e190a2839a3fc1bf0172c811d7b16c5
parent99a3b20452b16aa92e18e4f5d2c8c6f025aafbae
[llvm-objcopy][ELF] Fix removing SHT_GROUP sections.

When a SHT_GROUP section is removed, but other sections of the group are
kept, the SHF_GROUP flag of these sections should be dropped, otherwise
the resulting ELF file will be malformed.

Differential Revision: https://reviews.llvm.org/D80511
llvm/test/tools/llvm-objcopy/ELF/remove-section-group.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/ELF/Object.cpp
llvm/tools/llvm-objcopy/ELF/Object.h