jtool output small question

Used for discussing the various tools in the book as well as encouraging members to share tools

jtool output small question

Postby NJJN » Thu Jul 14, 2016 6:55 am


Was trying to understand the output shown by jtool & want to know what is the meaning of

1. b d r s t
2. Capital T C D

shown when we use -S -v on an app.

alias jt='ARCH=armv7 jtool' <--- alias in my zshrc

Like for example using jtool on ls

# jt -S -v ls
Code: Select all

        Symbol table is at offset 0x10a08 (68104), 189 entries <---- we got this 189 (49 + 55 + 85 = 189) entries.
        String table is at offset 0x11638 (71224), 2056 bytes 

           49 local symbols at index     0       <--- (b=17+d=8+r=5+s=1+t=18 = 49) local symbols starts with zero i.e. 0 to 48
           55 external symbols at index  49      <--- (T=25+C=29+D=1 = 55) external from 49
           85 undefined symbols at index 104      <--- (U) undefined at 104 to 189 <-- total entries shown below
           No TOC                  So b d r s t are local symbols (49)
           No modtab                   capital T C D are external symbols (55)
          213 Indirect symbols at offset 0x112e4       U there are undefined symbols (85)

189 entries are below using -S -v option for more details.

Code: Select all
0x10a08 0000c3ac t _traverse
0x10a14 0000c6e8 t _mastercmp
0x10a20 0000c79c t _display
0x10a2c 0000d1b0 t _makenines
0x10a38 0000d3a4 t _printaname
0x10a44 0000db68 t _printsize
0x10a50 0000dc0c t _printtime
0x10a5c 0000de6c t _colortype
0x10a68 0000df8c t _printname
0x10a74 0000dfec t _endcolor
0x10a80 0000e090 t _printtype
0x10a8c 0000e184 t _printlink
0x10a98 0000e2d8 t _printxattr
0x10aa4 0000e358 t _printacl
0x10ab0 0000ee20 t _uuid_to_name
0x10abc 0000ee3c t _writech
0x10ac8 0000ee64 t _putch
0x10ad4 0000ee7c t _printcolor
0x10ae0 0000f504 s  stub helpers
0x10aec 0000f8e8 r _rcsid
0x10af8 0000f92b r _copyright
0x10b04 0000f993 r _rcsid
0x10b10 0000f9d6 r _rcsid
0x10b1c 0000fa1d r _prn_octal.esc
0x10b28 00010214 d _ver
0x10b34 00010220 d _main.dot
0x10b40 00010224 d _main.dotav
0x10b4c 0001022c d _printcol.lastentries
0x10b58 00010230 d _defcolors
0x10b64 00010234 d _acl_perms
0x10b70 0001030c d _acl_flags
0x10b7c 00010348 d _printtime.d_first
0x10b88 000103c0 b _f_singlecol
0x10b94 000103c4 b _f_listdot
0x10ba0 000103c8 b _f_recursive
0x10bac 000103cc b _f_listdir
0x10bb8 000103d0 b _f_nosort
0x10bc4 000103d4 b _f_kblocks
0x10bd0 000103d8 b _f_reversesort
0x10bdc 000103dc b _f_sizesort
0x10be8 000103e0 b _f_timesort
0x10bf4 000103e4 b _f_whiteout
0x10c00 000103e8 b _sortfcn
0x10c0c 000103ec b _printfcn
0x10c18 000103f0 b _rval
0x10c24 000103f4 b _output
0x10c30 000103f8 b _printcol.array
0x10c3c 000103fc b _colors
0x10c48 00010480 b _printtime.now
0x10c54 00004000 T __mh_execute_header
0x10c60 0000b138 T _acccmp
0x10c6c 0001034c C _ansi_bgcol
0x10c78 00010350 C _ansi_coloff
0x10c84 00010354 C _ansi_fgcol
0x10c90 00010358 C _attrs_off
0x10c9c 0000b430 T _birthcmp
0x10ca8 0001035c C _blocksize
0x10cb4 0000edf8 T _colorquit
0x10cc0 00010360 C _enter_bold
0x10ccc 00010364 C _f_accesstime
0x10cd8 00010368 C _f_acl
0x10ce4 0001036c C _f_birthtime
0x10cf0 00010370 C _f_color
0x10cfc 00010374 C _f_flags
0x10d08 00010378 C _f_group
0x10d14 0001037c C _f_humanval
0x10d20 00010380 C _f_inode
0x10d2c 00010384 C _f_longform
0x10d38 00010388 C _f_nonprint
0x10d44 0001038c C _f_notabs
0x10d50 00010390 C _f_numericonly
0x10d5c 00010394 C _f_octal
0x10d68 00010398 C _f_octal_escape
0x10d74 0001039c C _f_owner
0x10d80 000103a0 C _f_sectime
0x10d8c 000103a4 C _f_size
0x10d98 000103a8 C _f_slash
0x10da4 000103ac C _f_sortacross
0x10db0 000103b0 C _f_statustime
0x10dbc 000103b4 C _f_stream
0x10dc8 000103b8 C _f_type
0x10dd4 000103bc C _f_xattr
0x10de0 0000f1d0 T _len_octal
0x10dec 0000b520 T _main
0x10df8 0000b048 T _modcmp
0x10e04 0000b010 T _namecmp
0x10e10 0000eb50 T _parsecolors
0x10e1c 0000e73c T _printcol
0x10e28 0000d540 T _printlong
0x10e34 0000d224 T _printscol
0x10e40 0000e674 T _printstream
0x10e4c 0000efac T _prn_normal
0x10e58 0000f2c8 T _prn_octal
0x10e64 0000f0b4 T _prn_printable
0x10e70 0000b1b0 T _revacccmp
0x10e7c 0000b4a8 T _revbirthcmp
0x10e88 0000b0c0 T _revmodcmp
0x10e94 0000b02c T _revnamecmp
0x10ea0 0000b3a4 T _revsizecmp
0x10eac 0000b2a0 T _revstatcmp
0x10eb8 0000b318 T _sizecmp
0x10ec4 0000b228 T _statcmp
0x10ed0 0001021c D _termwidth
0x10edc 0000f4d8 T _usage
0x10ee8          U ___assert_rtn: /usr/lib/libSystem.B.dylib
0x10ef4          U ___divdi3: /usr/lib/libSystem.B.dylib
0x10f00          U ___divsi3: /usr/lib/libSystem.B.dylib
0x10f0c          U ___error: /usr/lib/libSystem.B.dylib
0x10f18          U ___memset_chk: /usr/lib/libSystem.B.dylib
0x10f24          U ___moddi3: /usr/lib/libSystem.B.dylib
0x10f30          U ___modsi3: /usr/lib/libSystem.B.dylib
0x10f3c          U ___snprintf_chk: /usr/lib/libSystem.B.dylib
0x10f48          U ___stack_chk_fail: /usr/lib/libSystem.B.dylib
0x10f54          U ___stack_chk_guard: /usr/lib/libSystem.B.dylib
0x10f60          U ___stderrp: /usr/lib/libSystem.B.dylib
0x10f6c          U ___stdoutp: /usr/lib/libSystem.B.dylib
0x10f78          U ___strcpy_chk: /usr/lib/libSystem.B.dylib
0x10f84          U ___udivdi3: /usr/lib/libSystem.B.dylib
0x10f90          U ___umoddi3: /usr/lib/libSystem.B.dylib
0x10f9c          U _acl_free: /usr/lib/libSystem.B.dylib
0x10fa8          U _acl_get_entry: /usr/lib/libSystem.B.dylib
0x10fb4          U _acl_get_flag_np: /usr/lib/libSystem.B.dylib
0x10fc0          U _acl_get_flagset_np: /usr/lib/libSystem.B.dylib
0x10fcc          U _acl_get_link_np: /usr/lib/libSystem.B.dylib
0x10fd8          U _acl_get_perm_np: /usr/lib/libSystem.B.dylib
0x10fe4          U _acl_get_permset: /usr/lib/libSystem.B.dylib
0x10ff0          U _acl_get_qualifier: /usr/lib/libSystem.B.dylib
0x10ffc          U _acl_get_tag_type: /usr/lib/libSystem.B.dylib
0x11008          U _atoi: /usr/lib/libSystem.B.dylib
0x11014          U _calloc: /usr/lib/libSystem.B.dylib
0x11020          U _compat_mode: /usr/lib/libSystem.B.dylib
0x1102c          U _err: /usr/lib/libSystem.B.dylib
0x11038          U _exit: /usr/lib/libSystem.B.dylib
0x11044          U _fflagstostr: /usr/lib/libSystem.B.dylib
0x11050          U _fprintf: /usr/lib/libSystem.B.dylib
0x1105c          U _fputs: /usr/lib/libSystem.B.dylib
0x11068          U _free: /usr/lib/libSystem.B.dylib
0x11074          U _fts_children: /usr/lib/libSystem.B.dylib
0x11080          U _fts_close: /usr/lib/libSystem.B.dylib
0x1108c          U _fts_open: /usr/lib/libSystem.B.dylib
0x11098          U _fts_read: /usr/lib/libSystem.B.dylib
0x110a4          U _fts_set: /usr/lib/libSystem.B.dylib
0x110b0          U _getbsize: /usr/lib/libSystem.B.dylib
0x110bc          U _getenv: /usr/lib/libSystem.B.dylib
0x110c8          U _getopt: /usr/lib/libSystem.B.dylib
0x110d4          U _getpid: /usr/lib/libSystem.B.dylib
0x110e0          U _getuid: /usr/lib/libSystem.B.dylib
0x110ec          U _getxattr: /usr/lib/libSystem.B.dylib
0x110f8          U _group_from_gid: /usr/lib/libSystem.B.dylib
0x11104          U _humanize_number: /usr/lib/libutil.dylib
0x11110          U _ioctl: /usr/lib/libSystem.B.dylib
0x1111c          U _isatty: /usr/lib/libSystem.B.dylib
0x11128          U _iswprint: /usr/lib/libSystem.B.dylib
0x11134          U _kill: /usr/lib/libSystem.B.dylib
0x11140          U _listxattr: /usr/lib/libSystem.B.dylib
0x1114c          U _localtime: /usr/lib/libSystem.B.dylib
0x11158          U _malloc: /usr/lib/libSystem.B.dylib
0x11164          U _mbrtowc: /usr/lib/libSystem.B.dylib
0x11170          U _memset: /usr/lib/libSystem.B.dylib
0x1117c          U _nl_langinfo: /usr/lib/libSystem.B.dylib
0x11188          U _optind: /usr/lib/libSystem.B.dylib
0x11194          U _printf: /usr/lib/libSystem.B.dylib
0x111a0          U _putchar: /usr/lib/libSystem.B.dylib
0x111ac          U _readlink: /usr/lib/libSystem.B.dylib
0x111b8          U _realloc: /usr/lib/libSystem.B.dylib
0x111c4          U _reallocf: /usr/lib/libSystem.B.dylib
0x111d0          U _setenv: /usr/lib/libSystem.B.dylib
0x111dc          U _setlocale: /usr/lib/libSystem.B.dylib
0x111e8          U _signal: /usr/lib/libSystem.B.dylib
0x111f4          U _sscanf: /usr/lib/libSystem.B.dylib
0x11200          U _strchr: /usr/lib/libSystem.B.dylib
0x1120c          U _strcoll: /usr/lib/libSystem.B.dylib
0x11218          U _strdup: /usr/lib/libSystem.B.dylib
0x11224          U _strerror: /usr/lib/libSystem.B.dylib
0x11230          U _strftime: /usr/lib/libSystem.B.dylib
0x1123c          U _strlen: /usr/lib/libSystem.B.dylib
0x11248          U _strmode: /usr/lib/libSystem.B.dylib
0x11254          U _tgetent: /usr/lib/libncurses.5.4.dylib
0x11260          U _tgetstr: /usr/lib/libncurses.5.4.dylib
0x1126c          U _tgoto: /usr/lib/libncurses.5.4.dylib
0x11278          U _time: /usr/lib/libSystem.B.dylib
0x11284          U _tolower: /usr/lib/libSystem.B.dylib
0x11290          U _tputs: /usr/lib/libncurses.5.4.dylib
0x1129c          U _user_from_uid: /usr/lib/libSystem.B.dylib
0x112a8          U _warn: /usr/lib/libSystem.B.dylib
0x112b4          U _warnx: /usr/lib/libSystem.B.dylib
0x112c0          U _wcwidth: /usr/lib/libSystem.B.dylib
0x112cc          U _write: /usr/lib/libSystem.B.dylib
0x112d8          U dyld_stub_binder: /usr/lib/libSystem.B.dylib

Thank you for all your great tools its awesome.

Thanks, NJJN
Posts: 9
Joined: Sat Feb 27, 2016 12:09 pm

Re: jtool output small question

Postby NJJN » Thu Jul 14, 2016 9:25 am

I got the answer it's symbol type. Searching nm command details pages on the web.

The symbol type.
At least the following types are used; others are, as well, depending on the object file format.
If lowercase, the symbol is usually local;
If uppercase, the symbol is global (external).
There are however a few lowercase symbols that are shown for special global symbols (u, v and w).
Code: Select all
b = The symbol is in the uninitialized data section
d = The symbol is in the initialized data section
r = The symbol is in a read only data section.
s = The symbol is in an uninitialized data section for small objects.
t = The symbol is in the text (code) section

T = The symbol is in the text (code) section (external)
C = Common symbols are uninitialized data.
D = The symbol is in the initialized data section (external)

U = Undefined that was straight forward.

Amazing tool *JTOOL* rocks!
Posts: 9
Joined: Sat Feb 27, 2016 12:09 pm

Return to Tools

Who is online

Users browsing this forum: No registered users and 5 guests