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: relative GOT relocs in gold


From: "Cary Coutant" <ccoutant@google.com>
Date: Fri, 4 Apr 2008 13:44:21 -0700

> If I understand correctly, you just need to call got->add_constant()
> to create the GOT entry without an attached symbol (so that its slot
> is initialized to zero). Then, separately, you can attach the
> R_SPARC_RELATIVE relocation to it with rela_dyn->add_local_relative().
> Output_reloc::write() will put the symbol value into the addend field
> when the relocation is created with add_local_relative().

Thanks a lot!  I'll play around with that and see if I can get it to
do what I need for sparc.

The gold reloc engine is quite nice :-)


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