[PATCH] D127581: [ELF] Relax R_RISCV_ALIGN
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 06:19:01 PDT 2022
luismarques added inline comments.
================
Comment at: lld/ELF/Arch/RISCV.cpp:554-562
+ // Restore original st_value for symbols relative to this section.
+ ArrayRef<SymbolAnchor> sa = makeArrayRef(aux.anchors);
+ int32_t delta = 0;
+ for (auto it : llvm::enumerate(sec->relocations)) {
+ for (; sa.size() && sa[0].offset <= it.value().offset; sa = sa.slice(1))
+ if (!sa[0].end)
+ sa[0].d->value += delta;
----------------
Can't we skip this for the first pass?
================
Comment at: lld/ELF/Arch/RISCV.cpp:563-565
+ for (const SymbolAnchor &sa : sa)
+ if (!sa.end)
+ sa.d->value += delta;
----------------
No test coverage for this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127581/new/
https://reviews.llvm.org/D127581
More information about the llvm-commits
mailing list