Comment 12 for bug 756044

Revision history for this message
In , Rguenth (rguenth) wrote :

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.