[llvm-branch-commits] [ARM, MC] Support FDPIC relocations (PR #82187)
Peter Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 20 09:15:31 PST 2024
================
@@ -84,6 +84,11 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
if (Kind >= FirstLiteralRelocationKind)
return Kind - FirstLiteralRelocationKind;
MCSymbolRefExpr::VariantKind Modifier = Target.getAccessVariant();
+ auto CheckFDPIC = [&]() {
+ if (getOSABI() != ELF::ELFOSABI_ARM_FDPIC)
+ Ctx.reportError(Fixup.getLoc(),
----------------
smithp35 wrote:
I think the error message could be improved by giving out the string representation of the relocation code. For example:
```relocation R_ARM_FUNCDESC only supported in FDPIC mode```. I think this should be relatively easy to add.
https://github.com/llvm/llvm-project/pull/82187
More information about the llvm-branch-commits
mailing list