diff options
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index f5a24986819..f156c8e43e1 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1948,7 +1948,8 @@ static uint32_t getSymSectionIndex(Symbol *Sym) { if (!isa<Defined>(Sym) || Sym->NeedsPltAddr) return SHN_UNDEF; if (const OutputSection *OS = Sym->getOutputSection()) - return OS->SectionIndex >= SHN_LORESERVE ? SHN_XINDEX : OS->SectionIndex; + return OS->SectionIndex >= SHN_LORESERVE ? (uint32_t)SHN_XINDEX + : OS->SectionIndex; return SHN_ABS; } |