summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-01-25 19:27:50 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-01-25 19:27:50 +0000
commit45ca88dbdffd1edbbe2c040ab8db13aa6f07dc87 (patch)
tree2a89b16a3f0e0f10606b56f8ceb4f72a41f46ee6
parent2531584daa4770d3b0ac822ea175ce0e05c6819b (diff)
downloadbcm5719-llvm-45ca88dbdffd1edbbe2c040ab8db13aa6f07dc87.tar.gz
bcm5719-llvm-45ca88dbdffd1edbbe2c040ab8db13aa6f07dc87.zip
Fix: added assert condition to EhFrameHeader<ELFT>::assignEhFrame().
Thanks to David Blaikie who found that issue. llvm-svn: 258707
-rw-r--r--lld/ELF/OutputSections.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index fd08dfbb0f5..53835cb9bd2 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -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;
}
OpenPOWER on IntegriCloud