Created attachment 5702 testcase
While the 2.21 release links the attached testcase just fine, the 2.21 branch taken at Apr 19th fails to link it with
> ld -T romlayout32seg.lds code32seg.o -o rom32seg.o romlayout32seg.lds:66 cannot move location counter backwards (from 00000000000067b0 to 00000000000067a0)
If one changes the linker script to add 0x4 more room for the sections (which corresponds to their alignment) like
*(.rodata.__func__.10274) . = ( 0x6782 - code32seg_start ) ; *(.rodata.__func__.8035) . = ( 0x6796 - code32seg_start ) ; *(.rodata.__func__.8048) . = ( 0x67aa - code32seg_start ) ; *(.rodata.__func__.8075) . = ( 0x67c0 - code32seg_start ) ; *(.rodata.__func__.8115)
then the link succeeds. This looks like a bogus alignment calculation as with the size of 0xe for the section 0x10 should be enough space to properly align the data.
Created attachment 5702
testcase
While the 2.21 release links the attached testcase just fine, the 2.21 branch
taken at Apr 19th fails to link it with
> ld -T romlayout32seg.lds code32seg.o -o rom32seg.o lds:66 cannot move location counter backwards (from 00000000000067b0 to 00000000000067a0)
romlayout32seg.
If one changes the linker script to add 0x4 more room for the sections
(which corresponds to their alignment) like
*(.rodata. __func_ _.10274) __func_ _.8035) __func_ _.8048) __func_ _.8075) __func_ _.8115)
. = ( 0x6782 - code32seg_start ) ;
*(.rodata.
. = ( 0x6796 - code32seg_start ) ;
*(.rodata.
. = ( 0x67aa - code32seg_start ) ;
*(.rodata.
. = ( 0x67c0 - code32seg_start ) ;
*(.rodata.
then the link succeeds. This looks like a bogus alignment calculation
as with the size of 0xe for the section 0x10 should be enough space
to properly align the data.