[PATCH] support for directive .reloc
ahatanak at gmail.com
Wed Dec 11 22:14:23 PST 2013
The attached patch adds support for .reloc directives, which I believe hasn't been implemented yet.
The initial motivation for adding this support was to enable linker optimization for mips. .reloc serves as a hint to the linker to turn a function call using jalr (jump and link register) into a pc-relative bal (branch and link), if the callee is close enough to the jalr.
$L1: jalr $25
I also made a change in ELFObjectFile.h that was necessary for mips to print the symbol against which a relocation is applied (needed this for the test case).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14561 bytes
Desc: not available
More information about the llvm-commits