summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Writer.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index b168e83cde2..ceeca1641cb 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -372,12 +372,9 @@ template <class ELFT> static bool isRelroSection(OutputSectionBase<ELFT> *Sec) {
return Config->ZNow;
if (Sec == Out<ELFT>::Dynamic || Sec == Out<ELFT>::Got)
return true;
-
- StringRef Name = Sec->getName();
- StringRef WhiteList[] = {".data.rel.ro", ".ctors", ".dtors", ".jcr",
- ".eh_frame"};
- return (std::find(std::begin(WhiteList), std::end(WhiteList), Name) !=
- std::end(WhiteList));
+ StringRef S = Sec->getName();
+ return S == ".data.rel.ro" || S == ".ctors" || S == ".dtors" || S == ".jcr" ||
+ S == ".eh_frame";
}
// Output section ordering is determined by this function.
OpenPOWER on IntegriCloud