forked from OSchip/llvm-project
[ELF] - Add classof() member for ARMExidxSentinelSection.
Or code uses constructions like isa<ARMExidxSentinelSection>: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L1428 https://github.com/llvm-mirror/lld/blob/master/ELF/SyntheticSections.cpp#L2944 That is confusing, because without ARMExidxSentinelSection::classof() these lines are equal to isa<SyntheticSection> and the code does not really do the same what it expected to. I found no good way to break it though, but it is not nice. Patch adds ARMExidxSentinelSection::classof(). llvm-svn: 336813
This commit is contained in:
parent
876e99bf2c
commit
cb17fdbe3c
|
@ -2946,6 +2946,10 @@ bool ARMExidxSentinelSection::empty() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ARMExidxSentinelSection::classof(const SectionBase *D) {
|
||||
return D->kind() == InputSectionBase::Synthetic && D->Type == SHT_ARM_EXIDX;
|
||||
}
|
||||
|
||||
ThunkSection::ThunkSection(OutputSection *OS, uint64_t Off)
|
||||
: SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS,
|
||||
Config->Wordsize, ".text.thunk") {
|
||||
|
|
|
@ -924,6 +924,8 @@ public:
|
|||
void writeTo(uint8_t *Buf) override;
|
||||
bool empty() const override;
|
||||
|
||||
static bool classof(const SectionBase *D);
|
||||
|
||||
// The last section referenced by a regular .ARM.exidx section.
|
||||
// It is found and filled in Writer<ELFT>::resolveShfLinkOrder().
|
||||
// The sentinel points at the end of that section.
|
||||
|
|
Loading…
Reference in New Issue