zlib를 arm-elf-gcc로 크로스컴파일 하는 중에 나온 에러의 이유유
글쓴이: bakdorazi / 작성시간: 금, 2010/05/28 - 3:11오후
zlib를 arm-elf-gcc를 이용해서 크로스 컴파일 하는 중에 아래의 에러가 나왔습니다.
혹시 uClibc 를 설치를 안해서 나온 에러 입니까?
에러가 왜 나왔는지 원인을 모르겠습니다.
[root@localhost zlib-1.2.5]# CC=arm-elf-gcc ./configure --prefix=/home/test/zlib Checking for shared library support... Tested arm-elf-gcc -w -c -O3 -fPIC ztest4402.c Tested arm-elf-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -o ztest4402.so ztest4402.o /usr/local/arm-elf/lib/crt0.o(.text+0x10): In function `_start': : undefined reference to `__uClibc_main' /usr/local/arm-elf/lib/crt0.o(.text+0x14): In function `_start': : undefined reference to `abort' ztest4402.o(.text+0xc): In function `hello': : undefined reference to `getchar' collect2: ld returned 1 exit status No shared library support; try without defining CC and CFLAGS Building static library libz.a version 1.2.5 with arm-elf-gcc. Checking for off64_t... Yes. Checking for fseeko... Yes. Checking for unistd.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf(). Checking for vsnprintf() in stdio.h... No. WARNING: vsnprintf() not found, falling back to vsprintf(). zlib can build but will be open to possible buffer-overflow security vulnerabilities. Checking for return value of vsprintf()... Yes. Checking for attribute(visibility) support... No.
Forums:
_start
_start 프로시져(아마도 부트스트랩의 초기 부분 혹은 프로그램 초기화 부분일껍니다.)에서 __uClibc_main와 abort 심볼을 찾는데 (호출을 하는데) 찾지 못해서 나는 에러입니다. uClibc를 써본적은 없지만 에러를 봐서 꼭 필요한 것 같습니다.
댓글 달기