diff options
author | Fangrui Song <i@maskray.me> | 2025-03-20 20:28:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 20:28:49 -0700 |
commit | c177dbe484b8844874e096dc825fa9a9a1dc1e6b (patch) | |
tree | 3d47c6d10454fa882862d8ac4500a8618d3989ac /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 0ca10ef51bc977c1c0cacd2fce15eec37968b8a4 (diff) | |
download | llvm-c177dbe484b8844874e096dc825fa9a9a1dc1e6b.zip llvm-c177dbe484b8844874e096dc825fa9a9a1dc1e6b.tar.gz llvm-c177dbe484b8844874e096dc825fa9a9a1dc1e6b.tar.bz2 |
Move X86-specific MCSymbolRefExpr::VariantKind to X86MCExpr::Specifier
Move target-specific members outside of MCSymbolRefExpr::VariantKind
(a legacy interface I am eliminating). Most changes are mechanic,
except:
* ELFObjectWriter::shouldRelocateWithSymbol
* The legacy generic code uses `ELFObjectWriter::fixSymbolsInTLSFixups`
to set `STT_TLS` (and use an unnecessary expression walk). The better
way is to do this in `getRelocType`, which I have done for
AArch64, PowerPC, and RISC-V.
In the future, we should encode expressions with a relocation specifier
as X86MCExpr and use MCValue::RefKind to hold the specifier of the
relocatable expression.
https://maskray.me/blog/2025-03-16-relocation-generation-in-assemblers
While here, rename "Modifier' to "Specifier":
> "Relocation modifier", though concise, suggests adjustments happen during the linker's relocation step rather than the assembler's expression evaluation. I landed on "relocation specifier" as the winner. It's clear, aligns with Arm and IBM’s usage, and fits the assembler's role seamlessly.
Pull Request: https://github.com/llvm/llvm-project/pull/132149
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions