[PATCH] D13104: Mips - Mark the section .eh_frame as writeable for pic
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 05:56:45 PDT 2015
On Sat, Sep 26, 2015 at 3:41 PM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> Even if the functions are hidden?
Yes.
If you give me example of the code, I will show how it is exactly
translated to an object file.
> 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
--
Simon Atanasyan
More information about the llvm-commits
mailing list