aboutsummaryrefslogtreecommitdiffhomepage
path: root/explore-elf.txt
blob: 65684d82f71b77d513f831ad088d3a1fabfc2d2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# explore elf
--------------------------------------------------------------------------------

# toc
------
  |readelf|
  |objdump|
  |nm|
  |c++filt|

# readelf(1)                                                           *readelf*
=============
  args:
    -W|--wide     wide output, dont break output at 80 chars
    -h            print ELF header
    -S            print sections headers
    -l            print program headers + segment mapping
    -d            print .dynamic section (dynamic link information)
    -s            print symbol table(s)
    -r            print relocation table(s)

# objdump(1)                                                           *objdump*
=============
  args:
    -M intel                use intil syntax
    -d                      disassemble text section
    -D                      disassemble all sections
    -S                      mix disassembly with source code
    -C                      demangle
    -j <section>            display info for section
    --[no-]show-raw-insn    [dont] show object code next to disassembly

  ## disassemble .plt section
  objdump -j .plt -d <elf_file>

# nm(1)                                                                     *nm*
========
  args:
    -C          demangle
    -u          undefined only

# c++filt(1)                                                           *c++filt*
=============
  ## demangle symbol
  c++-filt <symbol_str>

  ## demangle stream
  nm <elf_file> | c++filt

--------------------------------------------------------------------------------
vim:sts=2:et:tw=80:cc=80:fo+=t:ft=help