diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index cad46db38ab2..a55315e096c5 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -305,7 +305,7 @@ template void RelocationSection::writeTo(uint8_t *Buf) { else if (CanBePreempted || IsDynRelative) Addend = OrigAddend; else if (Body) - Addend = getSymVA(cast>(*Body)) + OrigAddend; + Addend = getSymVA(*Body) + OrigAddend; else if (IsRela) Addend = getLocalRelTarget(File, static_cast(RI),