[uClinux-dev] [patch] Support C++ in elf2flt.ld.

David McCullough David_Mccullough at securecomputing.com
Fri Oct 12 02:50:49 EDT 2007


Jivin Nathan Sidwell lays it down ...
> David McCullough wrote:
> >Jivin Kazu Hirata lays it down ...
> >>Hi,
> >
> >Sorry for taking a while to reply to this,  holidays and other lame
> >excuses :-)
> >
> >>Attached is a patch to fix elf2flt.ld so that C++ programs will link
> >>successfully.
> >
> >With a newer compiler version I am guessing,  they currently link and
> >work correctly depending on your platform and/or compiler version :-)
> >
> >>Nathan Sidwell says:
> >>
> >>  "The problem is the .eh_frame_hdr optimization. firstly that input
> >>  section was not mentioned in the linker script and secondly, the
> >>  linker requires .eh_frame_hdr and .eh_frame section in the output,
> >>  so it can optimize them. I move gcc_except_table out of .data, for
> >>  consistency."
> >>
> >>Tested on m68k-uclinux.  OK?
> >
> >Why didn't you just put the new .eh_frame_hdr in like the others ?
> >They are included  in the output already and since you moved _edata
> >to after .gcc_except_table I don't see the gain.
> >
> >Could you try the attached patch and see if that works ?
> 
> It doesn't work.  The linker needs to see .eh_frame_hdr (& I think 
> .eh_frame) as output sections so that it can process them.

So are the sections used by the linker but not included in the final image ?

I only ask because I am fairly sure that elf2flt only pulls in the .data
and .text sections of the output.  Well at least sections flaged as SEC_DATA.

Just want to be sure this change can't backfire :-)

Any idea why it appears to be  working for the blackfin guys in it's
current state ?

Thanks,
Davidm

-- 
David McCullough,  david_mccullough at securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org http://www.cyberguard.com


More information about the uClinux-dev mailing list