sandpoint8245 Build fails with optimization turned off
I was attempting to debug an issue so I wanted to turn off the optimization (change from -Os to -O0 in config.mk) so I can more easily step thru code in gdb. When I do this for the sandpoint8245 target I get the following error. I am using u-boot 1.1.4 pulled down yesterday and gcc 4.0.1 toolchain built by crosstool.
a - virtex2.o
a - xilinx.o
gmake[1]: Leaving directory
`/home/eolsen/tree/u-boot-1.1.4/u-boot-1.1.4/common'
UNDEF_SYM=`powerpc-603e-linux-gnu-objdump -x lib_generic/libgeneric.a board/sandpoint/libsandpoint.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.afs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.afs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.anet/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a
post/cpu/libcpu.a common/libcommon.a |sed -n -e
's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
powerpc-603e-linux-gnu-ld -Bstatic -T/home/eolsen/tree/u-boot-1.1.4/u-boot-1.1.4/board/sandpoint/u-boot.lds
-Ttext 0xFFF00000 -n $UNDEF_SYM cpu/mpc824x/start.o \
--start-group lib_generic/libgeneric.a
board/sandpoint/libsandpoint.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.afs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.afs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.anet/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a
post/cpu/libcpu.a common/libcommon.a --end-group -L /usr/local/opt/crosstool/gcc-4.0.1-glibc-2.3.5/powerpc-603e-linux-gnu/bin/../lib/gcc/powerpc-603e-linux-gnu/4.0.1/nof -lgcc \
-Map u-boot.map -o u-boot/home/eolsen/tree/u-boot-1.1.4/u-boot-1.1.4/board/sandpoint/u-boot.lds:134
cannot move location counter backwards (from fff04288 to fff04000)
gmake: *** [u-boot] Error 1
Has anyone else managed to fix this?
Thanks
Eric
Quoted 4 lines · In message <[email protected]> you wrote:
I was attempting to debug an issue so I wanted to turn off the optimization (change from -Os to -O0 in config.mk) so I can more easily step thru code in gdb. When I do this for the sandpoint8245 target I get the following error. I am using u-boot 1.1.4 pulled down yesterday
...
Quoted 1 line
cannot move location counter backwards (from
fff04288tofff04000)
That means that the code became larger because of missing optimization, and you either need to adapt your linker script (u-boot.lds).
Quoted 1 line
Has anyone else managed to fix this?
Of course. Some boards even provide a debug version of the linker script (u-boot.lds.debug).
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Life is a game. Money is how we keep score. - Ted Turner