diff options
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/OutputSections.h | 2 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 98a08d6e229..6b7f8ed2216 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -622,7 +622,7 @@ void LinkerScript::addOrphanSections() { if (OutputSection *OS = addInputSec(Map, S, Name)) V.push_back(OS); - assert(S->getOutputSection()->SectionIndex == INT_MAX); + assert(S->getOutputSection()->SectionIndex == UINT32_MAX); } // If no SECTIONS command was given, we should insert sections commands diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index d753e8f36a7..514b9dafa8b 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -51,7 +51,7 @@ public: uint64_t getLMA() const { return PtLoad ? Addr + PtLoad->LMAOffset : Addr; } template <typename ELFT> void writeHeaderTo(typename ELFT::Shdr *SHdr); - unsigned SectionIndex = INT_MAX; + uint32_t SectionIndex = UINT32_MAX; unsigned SortRank; uint32_t getPhdrFlags() const; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 5e0a34e755b..ccec4e45b14 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1187,7 +1187,7 @@ template <class ELFT> void Writer<ELFT>::sortSections() { auto E = Script->SectionCommands.end(); auto NonScriptI = std::find_if(I, E, [](BaseCommand *Base) { if (auto *Sec = dyn_cast<OutputSection>(Base)) - return Sec->SectionIndex == INT_MAX; + return Sec->SectionIndex == UINT32_MAX; return false; }); |