[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 13:27:06 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/lib/MC/MCObjectStreamer.cpp:671
+ MCDataFragment *&DF) {
+ if (Symbol.isVariable()) {
+ const MCExpr *SymbolExpr = Symbol.getVariableValue();
----------------
The verification part does not have a close relation with the rest of PPC specific handling. I think we should move this part to a separate patch.
IIUC, without the verification part, the functionality still exists. It is just that we can miss some erroneous cases.
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp:390
+ case PPC::fixup_ppc_linker_opt:
+ Type = ELF::R_PPC64_PCREL_OPT;
+ break;
----------------
Can we just use FirstLiteralRelocationKind+R_PPC64_PCREL_OPT and not define `fixup_ppc_linker_opt`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79625/new/
https://reviews.llvm.org/D79625
More information about the llvm-commits
mailing list