Puzzle:where .rel sections get created in gas?

Alan Modra amodra@bigpond.net.au
Thu Mar 5 04:47:00 GMT 2009


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



More information about the Binutils mailing list