This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Puzzle:where .rel sections get created in gas?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Amker.Cheng" <amker dot cheng at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 5 Mar 2009 15:16:46 +1030
- Subject: Re: Puzzle:where .rel sections get created in gas?
- References: <e8b251c80903041925p6cb513bep37263e1f48321d60@mail.gmail.com>
On Thu, Mar 05, 2009 at 11:25:10AM +0800, Amker.Cheng wrote:
> I think gas write relocation into object file in function
> write_relocs, but where does
It doesn't actually. This function just transforms relocs from one
internal representation into another.
> the relocation sections ".rel.text" itself get created and written
> into object file?
If you are talking about ELF, then this happens in
bfd/elf.c:_bfd_elf_write_object_contents, in the loop after the call
to _bfd_elf_assign_file_positions_for_relocs.
--
Alan Modra
Australia Development Lab, IBM