[PATCH] D91993: [ELF] Don't relax R_X86_64_GOTPCRELX if addend != -4
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 26 00:04:49 PST 2020
grimar added a comment.
In D91993#2416496 <https://reviews.llvm.org/D91993#2416496>, @MaskRay wrote:
> Note, R_X86_64_GOTPCRELX already does not guarantee ensured relaxation, e.g. when the symbol is preemptible the linker cannot relax the instruction, when the instruction is not one of call,jmp,adc,add,and,cmp,or,sbb,sub,test,xor, etc.
Seems that, e.g., `R_X86_64_GOTPCREL` should give a guarantee that relaxation will not be performed though. As far I understand GNU linkers can relax `R_X86_64_GOTPCREL` too? It looks like a violation of ABI?
The suggested change (for ABI) about addend then seems only needed to support this behavior of GNU linkers. In LLVM we probably should just not emit a potentially relaxable relocation from the begining.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits