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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 05:41:42 PDT 2015


Even if the functions are hidden?
On Sep 26, 2015 1:05 AM, "Simon Atanasyan" <simon at atanasyan.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150926/8865dcc1/attachment.html>


More information about the llvm-commits mailing list