我程序里面压根就没用到这个memset 函数,怎么会出现这个错误的呢??
root@phg-ubuntu:/work/test/LD3320# make
arm-linux-gcc -Wall -O2 -c -o head.o head.S
arm-linux-gcc -Wall -O2 -c -o init.o init.c
arm-linux-gcc -Wall -O2 -c -o spi.o spi.c
arm-linux-gcc -Wall -O2 -c -o LDChip.o LDChip.c
arm-linux-gcc -Wall -O2 -c -o Reg_RW.o Reg_RW.c
arm-linux-gcc -Wall -O2 -c -o main.o main.c
arm-linux-ld -Tuart.lds -o spi_elf head.o init.o spi.o LDChip.o Reg_RW.o main.o
LDChip.o: In function `LD_AsrAddFixed':
LDChip.c:(.text+0x140): undefined reference to `memset'
LDChip.c:(.text+0x174): undefined reference to `memcpy'
LDChip.c:(.text+0x19c): undefined reference to `memcpy'
LDChip.c:(.text+0x1b4): undefined reference to `memcpy'
make: *** [spi.bin] 错误 1
我程序里面也没有memcpy 这个函数,为什么会出现这个错误呢??
我用的交叉编译器 是这个版本的 ARM-Linux GCC 4.4.3