Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lld/ELF
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-10-02 01:37:07 +0300
committerFangrui Song <i@maskray.me>2022-10-02 01:37:07 +0300
commit1837333dac94ed78ffe093faa565ec6221f98c46 (patch)
tree93d78534a5af5ce344953c5c1f67987a789f3d8e /lld/ELF
parentdd6aea9582c1031717a778e711900d6723c795fb (diff)
[ELF] --check-sections: allow address 0xffffffff for ELFCLASS32
Fix https://github.com/llvm/llvm-project/issues/58101
Diffstat (limited to 'lld/ELF')
-rw-r--r--lld/ELF/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 26c6239563dc..ef80082f4048 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -2686,7 +2686,7 @@ template <class ELFT> void Writer<ELFT>::checkSections() {
// First, check that section's VAs fit in available address space for target.
for (OutputSection *os : outputSections)
if ((os->addr + os->size < os->addr) ||
- (!ELFT::Is64Bits && os->addr + os->size > UINT32_MAX))
+ (!ELFT::Is64Bits && os->addr + os->size > uint64_t(UINT32_MAX) + 1))
errorOrWarn("section " + os->name + " at 0x" + utohexstr(os->addr) +
" of size 0x" + utohexstr(os->size) +
" exceeds available address space");