[PATCH] D13104: Mips - Mark the section .eh_frame as writeable for pic

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 22:05:13 PDT 2015


On Fri, Sep 25, 2015 at 10:30 PM, Rafael EspĂ­ndola
<llvm-commits at lists.llvm.org> wrote:
> On 25 September 2015 at 15:06, Joerg Sonnenberger <joerg at netbsd.org> wrote:
>> joerg added a subscriber: joerg.
>> joerg added a comment.
>>
>> MIPS doesn't have relative relocations that can cross sections. This is the reason why the normal relative encoding is not usable.
>
> Wait, how does "f()" gets compiled when using -fPIC -ffunction-sections?

It uses GOT. This is a call of a local function:

Disassembly of section .text.foo:
...
20:   8f820000        lw      v0,0(gp)
                      20: R_MIPS_GOT16 .text.bar
24:   24420000        addiu   v0,v0,0
                      24: R_MIPS_LO16  .text.bar

-- 
Simon Atanasyan


More information about the llvm-commits mailing list