This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: MIPS stubs in Gold
- From: Aleksandar Simeonov <Aleksandar dot Simeonov at RT-RK dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils <binutils at sourceware dot org>, rich at mips dot com
- Date: Fri, 01 Jul 2011 17:03:00 +0200
- Subject: Re: MIPS stubs in Gold
- References: <4DE63AD1.4020708@RT-RK.com> <mcrpqmxk16e.fsf@coign.corp.google.com> <BANLkTi=YhQBY13_ZwLHv=ijUO9H=5cdUBC3KtH0he1wx0A-G-w@mail.gmail.com> <4E04A0A6.1070304@RT-RK.com> <mcrliwr6ith.fsf@coign.corp.google.com> <87boxhiutz.fsf@firetop.home> <4E0B34DC.5020000@RT-RK.com> <mcr4o38vh09.fsf@coign.corp.google.com>
That helps, thanks Ian.
Now I have another question: where would be the best place to do
relocation for stub code? I added code that looks something like in the
end of .text section, but I don't know how to add relocations:
lui $25,%hi(func)
j func
addiu $25,$25,%lo(func)
Any suggestion?
Thanks in advance,
Aleksandar
On 29/06/2011 16:39, Ian Lance Taylor wrote:
> Aleksandar Simeonov <Aleksandar.Simeonov@RT-RK.com> writes:
>
>> Now I have another question for you: how can I add symbols at the
>> beginning of every stub? Again I did similar as in .plt, but all symbols
>> are showing at the beginning of the first stub.
>
> I assume you are defining your symbols using
> Symbol_table::define_in_output_data. The fifth argument is the offset
> of the symbol within the Output_data. Don't pass 0, pass the offset you
> want.
>
> Ian
>