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 ? Thanks, Davidm > Index: elf2flt.ld > =================================================================== > RCS file: /var/cvs/elf2flt/elf2flt.ld,v > retrieving revision 1.15 > diff -u -d -p -r1.15 elf2flt.ld > --- elf2flt.ld 21 Jul 2006 13:11:04 -0000 1.15 > +++ elf2flt.ld 2 Oct 2007 16:40:44 -0000 > @@ -59,9 +59,6 @@ R_RODAT *(.gnu.linkonce.r*) > *(.data1) > *(.data.*) > *(.gnu.linkonce.d*) > - *(.data1) > - *(.eh_frame) > - *(.gcc_except_table) > > /* Microblaze has .sdata and .sbss (small bss). They must > be contiguous, so please don't move any of this. JW */ > @@ -133,10 +130,15 @@ SINGLE_LINK: KEEP (*(SORT(.dtors.*))) > KEEP (*(SORT(.fini_array.*))) > PROVIDE (__fini_array_end = .); > > - . = ALIGN(0x10) ; > - _edata = . ; > } > flatmem > > + .eh_frame_hdr : { *(.eh_frame_hdr) } > flatmem > + .eh_frame : { KEEP(*(.eh_frame)) } > flatmem > + .gcc_except_table : { KEEP(*(.gcc_except_table)) } >flatmem > + > + . = ALIGN(0x10) ; > + _edata = . ; > + > .bss : { > . = ALIGN(0x4) ; > _sbss = ALIGN(0x4) ; > _______________________________________________ > uClinux-dev mailing list > uClinux-dev@uclinux.org > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev > This message was resent by uclinux-dev@uclinux.org > To unsubscribe see: > http://mailman.uclinux.org/mailman/options/uclinux-dev > -- David McCullough, [EMAIL PROTECTED], Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com
Index: elf2flt.ld =================================================================== RCS file: /var/cvs/elf2flt/elf2flt.ld,v retrieving revision 1.15 diff -u -r1.15 elf2flt.ld --- elf2flt.ld 21 Jul 2006 13:11:04 -0000 1.15 +++ elf2flt.ld 11 Oct 2007 23:36:40 -0000 @@ -59,7 +59,7 @@ *(.data1) *(.data.*) *(.gnu.linkonce.d*) - *(.data1) + *(.eh_frame_hdr) *(.eh_frame) *(.gcc_except_table)
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev