aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lld/ELF/Relocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lld/ELF/Relocations.cpp')
-rw-r--r--contrib/llvm-project/lld/ELF/Relocations.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/lld/ELF/Relocations.cpp b/contrib/llvm-project/lld/ELF/Relocations.cpp
index 210b4d1eb1a7..20eb02b87984 100644
--- a/contrib/llvm-project/lld/ELF/Relocations.cpp
+++ b/contrib/llvm-project/lld/ELF/Relocations.cpp
@@ -988,8 +988,8 @@ bool RelocationScanner::isStaticLinkTimeConstant(RelExpr e, RelType type,
if (!config->isPic)
return true;
- // The size of a non preemptible symbol is a constant.
- if (e == R_SIZE)
+ // Constant when referencing a non-preemptible symbol.
+ if (e == R_SIZE || e == R_RISCV_LEB128)
return true;
// For the target and the relocation, we want to know if they are
@@ -1669,7 +1669,7 @@ void elf::postScanRelocations() {
return;
if (sym.isTagged() && sym.isDefined())
- mainPart->memtagDescriptors->addSymbol(sym);
+ mainPart->memtagGlobalDescriptors->addSymbol(sym);
if (!sym.needsDynReloc())
return;