[PATCH] D15635: AsmPrinter: Produce PC-relative cstexprs when possible.
Joe Groff via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 11:13:12 PST 2016
jckarter added a comment.
No worries, thanks for the feedback, Rafael. I was following the example of how we handle rewriting relative references to GOT-equivalent globals into GOTPCREL relocations, which also happens in the AsmPrinter. It'd be great if MC could be made smarter about choosing relocations. The issue also impacts Mach-O, though unlike ELF, Mach-O does support generalized subtractor relocations, so it isn't a showstopper there. These subtractor relocations have however been giving me heartache, exposing unused corners of Darwin's ld and MCJIT, so I think it's better to favor PCREL relocation if we can get them on Mach-O too, since those are much better exercised.
http://reviews.llvm.org/D15635
More information about the llvm-commits
mailing list