반응형

 

-------------------------------------------------------

file [바이너리명]

: 몇 비트 파일인지 확인 할 수 있다.

 

-------------------------------------------------------

nm 사용법 -> 알아봅시다.

 

 

-------------------------------------------------------

- 해석되지 않은 심볼
현상 : ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
원인 : 심볼을 해석하지 못한 에러는 다양한 경우에 발생할 수 있지만 대부분의 이유는 필요한 파일을 제대로 주지 않은 경우이다.
조치 : 라이브러리에 들어있지 않은 라이브러리 함수를 호출하는 경우 해당하는 함수가 들어있는 라이브러리를 지정해주어야 한다.

- 동일한 심볼을 중복해서 정의할 경우 프로그래밍 에러가 발생.
현상 : ld: 0711-224 WARNING: Duplicate symbol:
.A<int>::f()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
원인 : 이 경우 링커는 첫번째 심볼 만을 인정하기 때문에 의도하지 않은 결과가 발생할 수 있다. 함수의 이름을 바꾸던가 정적(static) 함수를 사용해야 한다.
조치 : 심볼이 중복되어 똑같이 정의되어 있으므로 -bhalt:5 옵션을사용해서 링커에게 메시지를 보여주지 않도록 해야 한다.
-bhalt 링커 옵션은 링킹 과정 중 지정한 숫자보다 적은 에러메시지가 발생하면 이 메시지를 보여주지 않도록 한다.

- 링킹과정 중 메모리가 충분하지 않을 때
현상 : ld: 0711-101 fatal error, allocation of bytes fail in routine initsymtab_info.
There is not enough memory.
원인 : 대부분 원인은 페이징 공간이 너무 크기가 작거나, 링커명령을 사용한 사용자의 자원제한이 너무 낮아서 발생한다.
조치 : 위와 같은 에러가 발생하면 다음 사항을 체크해보고 가능하다면 페이징 공간을 늘리는 편이 좋다.
1.시스템 내의 가용한 페이징 공간
2.링커를 사용한 사용자가 사용할 수 있는 자원의 제한. 이 상황은 ulimit 명령으로 알아볼 수 있다.

-------------------------------------------------------

-lm

/bin/sh ./libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -W -D_THREAD_SAFE -o utilities/animate utilities/animate.o magick/libMagick.la wand/libWand.la
ld: 0711-317 ERROR: Undefined symbol: .fmod
ld: 0711-317 ERROR: Undefined symbol: .cos
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-317 ERROR: Undefined symbol: .ceil
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .cexp
ld: 0711-317 ERROR: Undefined symbol: .exp
ld: 0711-317 ERROR: Undefined symbol: .floor
ld: 0711-317 ERROR: Undefined symbol: .atan2
ld: 0711-317 ERROR: Undefined symbol: .hypot
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .log
ld: 0711-317 ERROR: Undefined symbol: .log10
ld: 0711-317 ERROR: Undefined symbol: .acos
ld: 0711-317 ERROR: Undefined symbol: .asin
ld: 0711-317 ERROR: Undefined symbol: .atan
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.

에러 제거시

You're obviously missing libm.so (or libm.a or libm.sl or whatever the
extension for (shared) libraries is on your system).

You can check config.sh to see if Configure includes -lm in the 'libs='
line

libs='-lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lc -lbsd';

if it does, check to see if libm.a is in any of the path's shown for
libs

libdirs=' /usr/local/ppc64/lib64  /lib /pro/local/lib';
libpth='/usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib';
libsdirs=' /lib /usr/local/ppc64/lib64';
libld.a /lib/libm.a /lib/libcrypt.a /lib/libc.a /lib/libbsd.a';
libspath=' /usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib';

-------------------------------------------------------

반응형

'OS > Common' 카테고리의 다른 글

Z 확장자 압축해제  (0) 2013.07.09
aix hpux solaris 특징 및 명령어 비교  (0) 2012.12.05
ftp 사용법 [명령어]  (0) 2011.10.20
Tar 와 Gzip Bzip2사용법  (0) 2011.10.20
unix/linux의 OS 32/64bit 확인 방법  (0) 2011.10.04

+ Recent posts