利用makefile和lds编译自己的程序的时候,出现了以下的问题:
make[1]: Leaving directory `/home/txgcwm/weidongshan/arm_sources/code/lib'
/home/txgcwm/weidongshan/arm_sources/code/obj/init.o(.text+0x0): In function `disable_watch_dog':
: multiple definition of `disable_watch_dog'
obj/init.o(.text+0x0): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/init.o(.text+0x10): In function `clock_init':
: multiple definition of `clock_init'
obj/init.o(.text+0x10): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/init.o(.text+0x78): In function `memsetup':
: multiple definition of `memsetup'
obj/init.o(.text+0x78): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/init.o(.text+0xe4): In function `copy_steppingstone_to_sdram':
: multiple definition of `copy_steppingstone_to_sdram'
obj/init.o(.text+0xe4): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/init.o(.text+0x108): In function `init_irq':
: multiple definition of `init_irq'
obj/init.o(.text+0x108): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/nand.o(.text+0x240): In function `nand_init':
: multiple definition of `nand_init'
obj/nand.o(.text+0x240): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/nand.o(.text+0x374): In function `nand_read':
: multiple definition of `nand_read'
obj/nand.o(.text+0x374): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/2440start.o(.text+0x0): In function `_start':
: multiple definition of `_start'
obj/2440start.o(.text+0x0): first defined here
/home/txgcwm/weidongshan/arm_sources/code/obj/2440start.o(.text+0x24): In function `Reset':
: relocation truncated to fit: R_ARM_PC24 disable_watch_dog
/home/txgcwm/weidongshan/arm_sources/code/obj/2440start.o(.text+0x28): In function `Reset':
: relocation truncated to fit: R_ARM_PC24 clock_init
/home/txgcwm/weidongshan/arm_sources/code/obj/2440start.o(.text+0x2c): In function `Reset':
: relocation truncated to fit: R_ARM_PC24 memsetup
/home/txgcwm/weidongshan/arm_sources/code/obj/2440start.o(.text+0x30): In function `Reset':
: relocation truncated to fit: R_ARM_PC24 copy_steppingstone_to_sdram
make: *** [rom.bin] 错误 1
产生错误的原因是lds中链接.o文件的路径写错误了。如果有朋友发现类似的错误,可以查看lds编写是否正确。
阅读(2614) | 评论(1) | 转发(0) |