Fix: added assert condition to EhFrameHeader<ELFT>::assignEhFrame().

Thanks to David Blaikie who found that issue.

llvm-svn: 258707
This commit is contained in:
George Rimar 2016-01-25 19:27:50 +00:00
parent 2531584daa
commit 45ca88dbdf
1 changed files with 2 additions and 2 deletions

View File

@ -861,8 +861,8 @@ template <class ELFT> void EhFrameHeader<ELFT>::writeTo(uint8_t *Buf) {
template <class ELFT>
void EhFrameHeader<ELFT>::assignEhFrame(EHOutputSection<ELFT> *Sec) {
if (this->Sec && this->Sec != Sec)
assert("multiple .eh_frame sections not supported for .eh_frame_hdr");
assert((!this->Sec || this->Sec == Sec) &&
"multiple .eh_frame sections not supported for .eh_frame_hdr");
Live = Config->EhFrameHdr;
this->Sec = Sec;
}