This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS stubs in Gold


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]