[PATCH] D71978: [RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 13:36:40 PST 2020
efriedma added a comment.
I don't understand what you're doing here.
You have a symbol pointing at the end (one past the last byte) of a fragment, so it's really pointing at the first byte of the next fragment. You want to handle that specially. That part seems okay... but I don't understand how simply zeroing out AUIPCOffset has the right effect.
Really, it's suspicious that this code is using `Fixup->getOffset()` at all: the offset isn't meaningful if you don't know what fragment is relative to. The "PC-relative" part of PC-relative relocations is supposed to be resolved by the caller, MCAssembler::evaluateFixup().
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71978/new/
https://reviews.llvm.org/D71978
More information about the llvm-commits
mailing list