This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bfd_sizeof_headers


On Tue, Jun 20, 2006 at 10:59:07PM -0400, Hans-Peter Nilsson wrote:
> On Tue, 20 Jun 2006, Alan Modra wrote:
> 
> > 	* emultempl/mmo.em: Correct comment.  Include elf-bfd.h and
> > 	source elf-generic.em.
> > 	(mmo_finish): Call gld${EMULATION_NAME}_map_segments.
> 
> That doesn't seem right.  mmo.em isn't *intended* to emit ELF
> output.  Though I see no failures with your change.
> 
> Weirder, when I revert it, I get:
> FAIL: ld-mmix/bpo-22
> 
> That's just an insanity test-case:
> # This weird combination of format and emulation options caused hiccups in
> # the reloc accounting machinery.
> (Referring to "-m mmo --oformat elf64-mmix", akin of
> "-m i386aout --oformat elf32-i386" or something like that.
> Oh yuck.  Why oh why is that allowed.)
> 
> I'm not sure what to expect for that case, except for no SEGV.
> It does get a new warning, which is the cause for the FAIL:
> ./ld-new: tmpdir/dump: warning: allocated section `.text' not in segment
> 
> 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.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]