Skip to content

Commit

Permalink
[MC][ELF] Have an assert catching creating group sections without sig…
Browse files Browse the repository at this point in the history
…natures. (llvm#113553)
  • Loading branch information
kosarev authored Oct 25, 2024
1 parent 403e4a2 commit 183ddef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/include/llvm/MC/MCSectionELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class MCSectionELF final : public MCSection {
type == ELF::SHT_NOBITS, Begin),
Type(type), Flags(flags), UniqueID(UniqueID), EntrySize(entrySize),
Group(group, IsComdat), LinkedToSym(LinkedToSym) {
assert((!(Flags & ELF::SHF_GROUP) || Group.getPointer()) &&
"Group section without signature!");
if (Group.getPointer())
Group.getPointer()->setIsSignature();
}
Expand Down

0 comments on commit 183ddef

Please sign in to comment.