|

楼主 |
发表于 2004-9-5 20:58:12
|
显示全部楼层
lanche兄,这个问题解决了,需要在ld时加上-lc选项。
但当我再次修改makeifile时又发生错误,将makefile改为:
all:
gcc -c -o hello.o hello.c
ld -Ttext=0x30008000 -o hello -lc hello.o
错误为:
gcc -c -o main.o main.c
ld -Ttext=0x30800000 -lc -o hello main.o
ld: warning: cannot find entry symbol _start; defaulting to 30800000
ld: hello: Not enough room for program headers (allocated 5, need 6)
ld: final link failed: Bad value
各位大侠看看这是怎么回事啊? |
|