View difference between Paste ID: eDkMtdrC and gCCTL2YL
SHOW: | | - or go back to the newest paste.
1
$ cat /proc/self/maps | grep `which cat`
2
08048000-08054000 r-xp 00000000 08:01 788936     /usr/bin/cat
3
08054000-08055000 r--p 0000b000 08:01 788936     /usr/bin/cat
4
08055000-08056000 rw-p 0000c000 08:01 788936     /usr/bin/cat
5
6-
$ readelf -S `which cat`
6+
$ readelf -S -l `which cat`
7
There are 28 section headers, starting at offset 0xc304:
8
9
Section Headers:
10
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
11
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
12
  [ 1] .interp           PROGBITS        08048154 000154 000013 00   A  0   0  1
13
  [ 2] .note.ABI-tag     NOTE            08048168 000168 000020 00   A  0   0  4
14
  [ 3] .note.gnu.build-i NOTE            08048188 000188 000024 00   A  0   0  4
15
  [ 4] .gnu.hash         GNU_HASH        080481ac 0001ac 000064 04   A  5   0  4
16
  [ 5] .dynsym           DYNSYM          08048210 000210 000500 10   A  6   1  4
17
  [ 6] .dynstr           STRTAB          08048710 000710 00035a 00   A  0   0  1
18
  [ 7] .gnu.version      VERSYM          08048a6a 000a6a 0000a0 02   A  5   0  2
19
  [ 8] .gnu.version_r    VERNEED         08048b0c 000b0c 000090 00   A  6   1  4
20
  [ 9] .rel.dyn          REL             08048b9c 000b9c 000030 08   A  5   0  4
21
  [10] .rel.plt          REL             08048bcc 000bcc 000238 08   A  5  12  4
22
  [11] .init             PROGBITS        08048e04 000e04 000023 00  AX  0   0  4
23
  [12] .plt              PROGBITS        08048e30 000e30 000480 04  AX  0   0 16
24
  [13] .text             PROGBITS        080492b0 0012b0 006cd4 00  AX  0   0 16
25
  [14] .fini             PROGBITS        0804ff84 007f84 000014 00  AX  0   0  4
26
  [15] .rodata           PROGBITS        0804ffc0 007fc0 000ec6 00   A  0   0 64
27
  [16] .eh_frame_hdr     PROGBITS        08050e88 008e88 000314 00   A  0   0  4
28
  [17] .eh_frame         PROGBITS        0805119c 00919c 002170 00   A  0   0  4
29
  [18] .init_array       INIT_ARRAY      08054f08 00bf08 000004 00  WA  0   0  4
30
  [19] .fini_array       FINI_ARRAY      08054f0c 00bf0c 000004 00  WA  0   0  4
31
  [20] .jcr              PROGBITS        08054f10 00bf10 000004 00  WA  0   0  4
32
  [21] .dynamic          DYNAMIC         08054f14 00bf14 0000e8 08  WA  6   0  4
33
  [22] .got              PROGBITS        08054ffc 00bffc 000004 04  WA  0   0  4
34
  [23] .got.plt          PROGBITS        08055000 00c000 000128 04  WA  0   0  4
35
  [24] .data             PROGBITS        08055140 00c140 000080 00  WA  0   0 32
36
  [25] .bss              NOBITS          080551c0 00c1c0 000584 00  WA  0   0 64
37
  [26] .comment          PROGBITS        00000000 00c1c0 00004e 01  MS  0   0  1
38
  [27] .shstrtab         STRTAB          00000000 00c20e 0000f6 00      0   0  1
39
Key to Flags:
40
  W (write), A (alloc), X (execute), M (merge), S (strings)
41
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
42-
  O (extra OS processing required) o (OS specific), p (processor specific)
42+
  O (extra OS processing required) o (OS specific), p (processor specific)
43
44
Elf file type is EXEC (Executable file)
45
Entry point 0x8049e7d
46
There are 9 program headers, starting at offset 52
47
48
Program Headers:
49
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
50
  PHDR           0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4
51
  INTERP         0x000154 0x08048154 0x08048154 0x00013 0x00013 R   0x1
52
      [Requesting program interpreter: /lib/ld-linux.so.2]
53
  LOAD           0x000000 0x08048000 0x08048000 0x0b30c 0x0b30c R E 0x1000
54
  LOAD           0x00bf08 0x08054f08 0x08054f08 0x002b8 0x0083c RW  0x1000
55
  DYNAMIC        0x00bf14 0x08054f14 0x08054f14 0x000e8 0x000e8 RW  0x4
56
  NOTE           0x000168 0x08048168 0x08048168 0x00044 0x00044 R   0x4
57
  GNU_EH_FRAME   0x008e88 0x08050e88 0x08050e88 0x00314 0x00314 R   0x4
58
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x10
59
  GNU_RELRO      0x00bf08 0x08054f08 0x08054f08 0x000f8 0x000f8 R   0x1
60
61
 Section to Segment mapping:
62
  Segment Sections...
63
   00     
64
   01     .interp 
65
   02     .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 
66
   03     .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 
67
   04     .dynamic 
68
   05     .note.ABI-tag .note.gnu.build-id 
69
   06     .eh_frame_hdr 
70
   07     
71
   08     .init_array .fini_array .jcr .dynamic .got