Same as D99572 but for ARM.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
100 ms | x64 windows > LLVM.tools/dsymutil/X86::label2.test |
Event Timeline
llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp | ||
---|---|---|
63 | I'm not sure I understand entirely how this works. If this is used in a data only table, the data is now PC-relative. Is that really the same thing? Everything on COFF is PC-relative if it is base relocated, but that requires generation in the frontend to account for that, which understands the semantics for the data better than we do at this point. |
llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp | ||
---|---|---|
63 | If it's a table of plain addresses, not address differences, I think IsCrossSection isn't set. The coff-relocations.s testcase has a check for it, see around the addr32 label. As for who makes sure the offset is adjusted to be PC relative (when the subtracted bit in the asm expression isn't the PC but some other address), not entirely sure, but apparently it's done by some other MC layer. This corresponds pretty much 1:1 to the same in the X86 target, see https://github.com/llvm/llvm-project/blob/llvmorg-11.1.0/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp#L46-L52. |
I'm not sure I understand entirely how this works. If this is used in a data only table, the data is now PC-relative. Is that really the same thing? Everything on COFF is PC-relative if it is base relocated, but that requires generation in the frontend to account for that, which understands the semantics for the data better than we do at this point.