manywaypark's Blog
개발, 검색, 함수

'extract'에 해당되는 글 1건

  1. 2014.05.19 lists exported symbols

lists exported symbols

tips & tricks/Linux/Unix 2014. 5. 19. 16:05 by manywaypark

shared object 파일에서 어떤 symbol들이 export되는지 궁금해지는 경우가 있다.

(특히 unsolved external symbol 따위 linker error가 발생할 경우)

다음과 같이 하면 symbol들을 human-readable한 형태로 뽑아준다.

$ (find . -name '*.a'|xargs nm -f posix; find . -name '*.so' | xargs nm -f posix -D)|cut -f1 -d' '|LANG=C sort -u > all_symbols

$ grep '^_Z' all_symbols | c++filt|sort > demangled_c++_symbols


refs:

http://gcc.gnu.org/wiki/Cxx11AbiCompatibility

http://stackoverflow.com/questions/1237575/how-do-i-find-out-what-all-symbols-are-exported-from-a-shared-object


happy hackin'

1 
분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

04-24 01:46