MIPS stubs in Gold
Ian Lance Taylor
iant@google.com
Fri Jul 1 15:22:00 GMT 2011
Aleksandar Simeonov <Aleksandar.Simeonov@RT-RK.com> writes:
> 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)
One approach is to remember the information you will need in your stub
class, and then pull in that information in the do_write method. E.g.,
look at how the PLT code picks the bytes to write out in
Output_data_plt_x86_64::do_write in x86_64.cc.
Ian
More information about the Binutils
mailing list