================ @@ -18,6 +18,6 @@ .globl _start _start: .data - .word foo@PLT - . - .word foo@PLT - . + 1 - .word foo@PLT - . - 1 + .word %plt(foo - .) ---------------- MaskRay wrote:
The core principle is that relocation specifiers must operate on the full expression, not just a part of it. This would avoid a lot of complexity/ambiguity in parsing and expression folding. `.word %plt(foo - .)` might look unusual. It describes a PC-relative relocatable expression. We evaluate it to a relocatable expression (`relocation_specifier(sym_a - sym_b + offset)`), and allows the referenced "addend" (sym_a) to be a PLT. `.word %plt(foo)` describes an absolute reference to foo's PLT, which we don't support. https://github.com/llvm/llvm-project/pull/132569 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits