[PATCH] D15480: [ELF][MIPS] Handle R_MIPS_HI16/LO16 relocations against _gp_disp symbol

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 24 04:18:22 PST 2015


On Thu, Dec 24, 2015 at 2:22 PM, George Rimar <grimar at accesssoftek.com> wrote:
>>>I thinking about that place last time.
>>>May be we should add A argument to Target->relocateOne()  ?
>>>That can help to move that calculation to mips target, since it looks like absence of A inside relocateOne() is the only stoppable for doing that.
>>>
>>Currently S+A is a single parameter SA. Are you suggesting split that as two parameters, S and A?
>>
>>I don't know if that makes code simpler, but it may worth trying.
>
> Not sure about splitting. That seems to be more complicated. Just adding A can save from complicating logic outside allowing relocateOne to use it if it is needed for concrete relocation`s code like here for mips.

What part of the `getMipsGpAddr<ELFT>() - AddrLoc` expression do you
suggest to pass a a separate A argument? And do you suggest to pass
the `Body` to the `relocateOne` as well to be able to recognize a
special _gp_disp case of R_MIPS_HI16 / LO16 relocations?

-- 
Simon Atanasyan


More information about the llvm-commits mailing list