nm -D libmy.so | sed -n 's/^[0-9a-f]* [Tt] \(.*\)/\1/p'
- parsing name
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/'
- //{num, name, define, bused}
- { 27, mutual_exclusion_read_unlock, MUTUAL_EXCLUSION_READ, 0},
- class out
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/' |awk -F ", " '{print $2}' | awk '!seen[$0]++'
- VPI
- enum out
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/' |awk -F ", " '{print $2}' | awk '!seen[$0]++'| awk '{print $0 "=" NR-1 ","}'
- CGI=0,
- EEPROM=1,
- GET=2,
- IPC=3,
- MQ=4,
- MUTUAL=5,
- PRINTLOG=6,
- PUT=7,
沒有留言:
張貼留言