Question on where input_sections are populated
Alan Modra
amodra@bigpond.net.au
Sat Aug 11 10:19:00 GMT 2007
bfd/config.bfd says x86 interix uses i386pei_vec.
bfd/configure.in says i386pei_vec target is in pei-i386.c, peigen.c,
cofflink.c. The last two are generic, so look in pei-i386.c, which
pulls in coff-i386.c. coff-i386.c has what we are looking for, the
bfd_target struct. _bfd_check_format[bfd_object] in this struct is
coff_object_p, so look for that. It's in bfd/coffgen.c, but note
the define in peicode.h! BFD has lots of horrible defines, especially
in the COFF code. So we are really using pe_bfd_object_p in
peicode.h, but this calls coff_object_p anyway to do the bulk of the
work. coff_object_p is where the file is read into a bfd *, and if
you follow down that function you'll find make_a_section_from_file.
Probably more detail than you wanted, but that's the way to pull apart
BFD targets.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list