bfd_sizeof_headers

Hans-Peter Nilsson hp@bitrange.com
Wed Jun 21 11:20:00 GMT 2006


On Wed, 21 Jun 2006, Alan Modra wrote:
> On Tue, Jun 20, 2006 at 10:59:07PM -0400, Hans-Peter Nilsson wrote:
> > Other than that, the output seems by manual inspection to match
> > the test.  Was that test the reason?
>
> Yes, that test failure shows why mmo needs elf-generic.  Basically any
> target that calls bfd_elf_final_link needs to first call
> _bfd_elf_map_sections_to_segments.

To wit, that'd include all (non-ELF) emulations where there's a
target that includes at least one ELF linker emulation.
The non-ELF part of the MMIX port or the mmo emulation doesn't
openly call bfd_elf_final_link; it's being arranged "behind its
back" AFAICS by the use of cross-format options.

Maybe putting a hook in ldemul.c:finish_default to be armed and
used when ELF output is to be generated, would've avoided loose
ends for other targets.  Not that anyone in their right mind
would use that kind of cross-emulation options anyway, of
course.  Certainly less important than sizeof_headers problems!

brgds, H-P



More information about the Binutils mailing list