This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: how does ld interpret ELF R_PPC_REL32?
On Tue, Oct 18, 2005 at 05:33:27PM -0700, ddunkle (sent by Nabble.com) wrote:
>
> Thanks, but I am not sure that I clearly understand the statement about "vma of the .text section for that input file". In this case, I have an input object module, let's call it A, that compiled and never linked. So its text essentially starts at zero. Object module A is then linked with other object modules to form object module B, not a fully linked executable.
In that case, ld will rewrite the relocations for B with adjusted addends.
> Object module A contains a text section starting at zero, since it is not fully linked. The text section of object module A is linked into B at an offset into B's text section, where the offset in this case is 0x1d77c
>
> Do I use 1d77c, the start of object module A's text section within object module B's text section?
Huh? At some stage you produce a final linked executable. Are you
using A or B in the final exe? If B, then look at B's relocations, with
B's .text vma in the final exe. A link map will tell you where B is
linked.
--
Alan Modra
IBM OzLabs - Linux Technology Centre