arm-linux-gcc错误提示要比arm-none-eabi-gcc详细
1.下面使用arm-linux-gcc编译提示的log信息,非常全,很容易锁定出错位置为ld脚本地址空间定义问题
是/home/luther/eb40_armlinux/install/lib/target.ld出现了问题.
make[1]: Entering directory `/home/luther/eb40_armlinux/redboot/v3_0'
arm-linux-gcc -c -I/home/luther/eb40_armlinux/install/include -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0 -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/src -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/tests -I. -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -mthumb-interwork -mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-exceptions -o /home/luther/eb40_armlinux/install/lib/version.o /vobs/ecos/ecos-3.0/packages/redboot/v3_0/src/version.c
arm-linux-gcc -mthumb-interwork -mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib -L/home/luther/eb40_armlinux/install/lib -Ttarget.ld -o /home/luther/eb40_armlinux/install/bin/redboot.elf /home/luther/eb40_armlinux/install/lib/version.o
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_udivsi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_divsi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_umodsi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_dvmd_lnx.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_ashrdi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_udivdi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_umoddi3.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: Warning: /usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/libgcc.a(_clz.oS) does not support interworking, whereas /home/luther/eb40_armlinux/install/bin/redboot.elf does
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: warning: no memory region specified for section `.got'
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: warning: no memory region specified for section `.got.plt'
/usr/local/arm/3.3/lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: address 0x1015f64 of /home/luther/eb40_armlinux/install/bin/redboot.elf section .bss is not within region ram
collect2: ld returned 1 exit status
make[1]: *** [/home/luther/eb40_armlinux/install/bin/redboot.elf] Error 1
make[1]: Leaving directory `/home/luther/eb40_armlinux/redboot/v3_0'
make: *** [build] Error 2
luther@gliethttp:~/eb40_armlinux$
2.下面为arm-none-eabi-gcc编译出错提示,它只是告诉ld连接失败,并没有具体提示是什么原因导致了失败
make[1]: `/home/luther/eb40/install/lib/target.ld' is up to date.
make[1]: Leaving directory `/home/luther/eb40/hal/arm/arch/v3_0'
make -r -C redboot/v3_0 /home/luther/eb40/install/bin/redboot.elf
make[1]: Entering directory `/home/luther/eb40/redboot/v3_0'
arm-none-eabi-gcc -c -I/home/luther/eb40/install/include -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0 -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/src -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/tests -I. -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -mthumb-interwork -mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-exceptions -o /home/luther/eb40/install/lib/version.o /vobs/ecos/ecos-3.0/packages/redboot/v3_0/src/version.c
arm-none-eabi-gcc -mthumb-interwork -mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib -L/home/luther/eb40/install/lib -Ttarget.ld -o /home/luther/eb40/install/bin/redboot.elf /home/luther/eb40/install/lib/version.o
collect2: ld terminated with signal 11 [Segmentation fault]
make[1]: *** [/home/luther/eb40/install/bin/redboot.elf] Error 1
make[1]: Leaving directory `/home/luther/eb40/redboot/v3_0'
make: *** [build] Error 2
luther@gliethttp:~/eb40$
3.编译ecos-3.0必须使用arm-eabi-gcc编译器
make[1]: Leaving directory `/vobs/ep9312/redboot/hal/arm/arch/v3_0'
make -r -C hal/arm/arch/v3_0 /vobs/ep9312/redboot/install/lib/target.ld
make[1]: Entering directory `/vobs/ep9312/redboot/hal/arm/arch/v3_0'
arm-eabi-gcc -E -P -Wp,-MD,target.tmp -xc -I/vobs/ep9312/redboot/install/include -I/vobs/ecos/ecos-3.0/packages/hal/arm/arch/v3_0 -I/vobs/ecos/ecos-3.0/packages/hal/arm/arch/v3_0/src -I/vobs/ecos/ecos-3.0/packages/hal/arm/arch/v3_0/tests -I. -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -mthumb-interwork -mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-exceptions -o /vobs/ep9312/redboot/install/lib/target.ld /vobs/ecos/ecos-3.0/packages/hal/arm/arch/v3_0/src/arm.ld
make[1]: Leaving directory `/vobs/ep9312/redboot/hal/arm/arch/v3_0'
make -r -C redboot/v3_0 /vobs/ep9312/redboot/install/bin/redboot.elf
make[1]: Entering directory `/vobs/ep9312/redboot/redboot/v3_0'
arm-eabi-gcc -c -I/vobs/ep9312/redboot/install/include -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0 -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/src -I/vobs/ecos/ecos-3.0/packages/redboot/v3_0/tests -I. -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -mthumb-interwork -mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-exceptions -o /vobs/ep9312/redboot/install/lib/version.o /vobs/ecos/ecos-3.0/packages/redboot/v3_0/src/version.c
arm-eabi-gcc -mthumb-interwork -mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib -L/vobs/ep9312/redboot/install/lib -Ttarget.ld -o /vobs/ep9312/redboot/install/bin/redboot.elf /vobs/ep9312/redboot/install/lib/version.o
make[1]: Leaving directory `/vobs/ep9312/redboot/redboot/v3_0'
make -r -C hal/arm/at91/eb40/v3_0 /vobs/ep9312/redboot/install/bin/redboot.bin
make[1]: Entering directory `/vobs/ep9312/redboot/hal/arm/at91/eb40/v3_0'
arm-eabi-objcopy --strip-debug /vobs/ep9312/redboot/install/bin/redboot.elf /vobs/ep9312/redboot/install/bin/redboot.img
arm-eabi-objcopy -O srec /vobs/ep9312/redboot/install/bin/redboot.elf /vobs/ep9312/redboot/install/bin/redboot.srec
arm-eabi-objcopy -O binary /vobs/ep9312/redboot/install/bin/redboot.elf /vobs/ep9312/redboot/install/bin/redboot.bin
make[1]: Leaving directory `/vobs/ep9312/redboot/hal/arm/at91/eb40/v3_0'
build finished
luther@gliethttp:~/eb40$ ls install/bin/
redboot.bin redboot.elf redboot.img redboot.srec
阅读(7418) | 评论(1) | 转发(0) |