Symbols (Exports)

With rabin2, the generated symbols list format is similar to the imports list. Use the -s option to get it:

  1. rabin2 -s /bin/ls | head
  2. [Symbols]
  3. nth paddr vaddr bind type size lib name
  4. ------------------------------------------------------
  5. 110 0x000150a0 0x000150a0 GLOBAL FUNC 56 _obstack_allocated_p
  6. 111 0x0001f600 0x0021f600 GLOBAL OBJ 8 program_name
  7. 112 0x0001f620 0x0021f620 GLOBAL OBJ 8 stderr
  8. 113 0x00014f90 0x00014f90 GLOBAL FUNC 21 _obstack_begin_1
  9. 114 0x0001f600 0x0021f600 WEAK OBJ 8 program_invocation_name
  10. 115 0x0001f5c0 0x0021f5c0 GLOBAL OBJ 8 alloc_failed_handler
  11. 116 0x0001f5f8 0x0021f5f8 GLOBAL OBJ 8 optarg
  12. 117 0x0001f5e8 0x0021f5e8 GLOBAL OBJ 8 stdout
  13. 118 0x0001f5e0 0x0021f5e0 GLOBAL OBJ 8 program_short_name

With the -sr option rabin2 produces a radare2 script instead. It can later be passed to the core to automatically flag all symbols and to define corresponding byte ranges as functions and data blocks.

  1. $ rabin2 -sr /bin/ls | head
  2. fs symbols
  3. f sym.obstack_allocated_p 56 0x000150a0
  4. f sym.program_invocation_name 8 0x0021f600
  5. f sym.stderr 8 0x0021f620
  6. f sym.obstack_begin_1 21 0x00014f90
  7. f sym.program_invocation_name 8 0x0021f600
  8. f sym.obstack_alloc_failed_handler 8 0x0021f5c0
  9. f sym.optarg 8 0x0021f5f8
  10. f sym.stdout 8 0x0021f5e8
  11. f sym.program_invocation_short_name 8 0x0021f5e0