Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15498483
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: LINUX

2009-07-03 14:56:33

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) |
给主人留下些什么吧!~~

charles4132012-03-12 16:11:55

弱弱的问下楼主arm-linux-gcc和arm-none-eabi-gcc有什么区别,编译后可运行的处理器平台相同吗?