# readelf -a sca.o
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Intel 80386
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 208 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 8
Section header string table index: 5
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 000034 000038 00 AX 0 0 4
[ 2] .rel.text REL 00000000 0002c8 000020 08 6 1 4
[ 3] .data PROGBITS 00000000 00006c 000031 00 WA 0 0 4
[ 4] .bss NOBITS 00000000 0000a0 000000 00 WA 0 0 4
[ 5] .shstrtab STRTAB 00000000 0000a0 000030 00 0 0 1
[ 6] .symtab SYMTAB 00000000 000210 000090 10 7 8 4
[ 7] .strtab STRTAB 00000000 0002a0 000028 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
There are no section groups in this file.
There are no program headers in this file.
Relocation section '.rel.text' at offset 0x2c8 contains 4 entries:
Offset Info Type Sym.Value Sym. Name
00000003 00000201 R_386_32 00000000 .data
00000009 00000201 R_386_32 00000000 .data
0000000f 00000201 R_386_32 00000000 .data
0000001c 00000201 R_386_32 00000000 .data
There are no unwind sections in this file.
Symbol table '.symtab' contains 9 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 SECTION LOCAL DEFAULT 1
2: 00000000 0 SECTION LOCAL DEFAULT 3
3: 00000000 0 SECTION LOCAL DEFAULT 4
4: 00000000 0 NOTYPE LOCAL DEFAULT 3 string1
5: 0000002c 0 NOTYPE LOCAL DEFAULT 3 length
6: 00000030 0 NOTYPE LOCAL DEFAULT 3 string2
7: 0000002c 0 NOTYPE LOCAL DEFAULT 1 notfound
8: 00000000 0 NOTYPE GLOBAL DEFAULT 1 _start
No version information found in this file.
[root@centos assembly]# hexdump -C sca.o
00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 01 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 d0 00 00 00 00 00 00 00 34 00 00 00 00 00 28 00 |........4.....(.|
00000030 08 00 05 00 90 8d 3d 00 00 00 00 8d 35 30 00 00 |......=.....50..|
00000040 00 8b 0d 2c 00 00 00 ac fc f2 ae 75 13 66 2b 0d |...,.......u.f+.|
00000050 2c 00 00 00 66 f7 d9 b8 01 00 00 00 89 cb cd 80 |,...f...........|
00000060 b8 01 00 00 00 bb 00 00 00 00 cd 80 54 68 69 73 |............This|
00000070 20 69 73 20 61 20 74 65 73 74 20 2d 20 61 20 6c | is a test - a l|
00000080 6f 6e 67 20 74 65 78 74 20 73 74 72 69 6e 67 20 |ong text string |
00000090 74 6f 20 73 63 61 6e 2e 2c 00 00 00 2d 00 00 00 |to scan.,...-...|
000000a0 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 |..symtab..strtab|
000000b0 00 2e 73 68 73 74 72 74 61 62 00 2e 72 65 6c 2e |..shstrtab..rel.|
000000c0 74 65 78 74 00 2e 64 61 74 61 00 2e 62 73 73 00 |text..data..bss.|
000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000000f0 00 00 00 00 00 00 00 00 1f 00 00 00 01 00 00 00 |................|
00000100 06 00 00 00 00 00 00 00 34 00 00 00 38 00 00 00 |........4...8...|
00000110 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |................|
00000120 1b 00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 c8 02 00 00 20 00 00 00 06 00 00 00 01 00 00 00 |.... ...........|
00000140 04 00 00 00 08 00 00 00 25 00 00 00 01 00 00 00 |........%.......|
00000150 03 00 00 00 00 00 00 00 6c 00 00 00 31 00 00 00 |........l...1...|
00000160 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |................|
00000170 2b 00 00 00 08 00 00 00 03 00 00 00 00 00 00 00 |+...............|
00000180 a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000190 04 00 00 00 00 00 00 00 11 00 00 00 03 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 a0 00 00 00 30 00 00 00 |............0...|
000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
000001c0 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 |................|
000001d0 10 02 00 00 90 00 00 00 07 00 00 00 08 00 00 00 |................|
000001e0 04 00 00 00 10 00 00 00 09 00 00 00 03 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 a0 02 00 00 28 00 00 00 |............(...|
00000200 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000220 00 00 00 00 00 00 00 00 00 00 00 00 03 00 01 00 |................|
00000230 00 00 00 00 00 00 00 00 00 00 00 00 03 00 03 00 |................|
00000240 00 00 00 00 00 00 00 00 00 00 00 00 03 00 04 00 |................|
00000250 01 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 |................|
00000260 09 00 00 00 2c 00 00 00 00 00 00 00 00 00 03 00 |....,...........|
00000270 10 00 00 00 30 00 00 00 00 00 00 00 00 00 03 00 |....0...........|
00000280 18 00 00 00 2c 00 00 00 00 00 00 00 00 00 01 00 |....,...........|
00000290 21 00 00 00 00 00 00 00 00 00 00 00 10 00 01 00 |!...............|
000002a0 00 73 74 72 69 6e 67 31 00 6c 65 6e 67 74 68 00 |.string1.length.|
000002b0 73 74 72 69 6e 67 32 00 6e 6f 74 66 6f 75 6e 64 |string2.notfound|
000002c0 00 5f 73 74 61 72 74 00 03 00 00 00 01 02 00 00 |._start.........|
000002d0 09 00 00 00 01 02 00 00 0f 00 00 00 01 02 00 00 |................|
000002e0 1c 00 00 00 01 02 00 00 |........|
000002e8
[root@centos assembly]# objdump -d sca.o
sca.o: file format elf32-i386
Disassembly of section .text:
00000000 <_start>:
0: 90 nop
1: 8d 3d 00 00 00 00 lea 0x0,%edi
7: 8d 35 30 00 00 00 lea 0x30,%esi
d: 8b 0d 2c 00 00 00 mov 0x2c,%ecx
13: ac lods %ds:(%esi),%al
14: fc cld
15: f2 ae repnz scas %es:(%edi),%al
17: 75 13 jne 2c <notfound>
19: 66 2b 0d 2c 00 00 00 sub 0x2c,%cx
20: 66 f7 d9 neg %cx
23: b8 01 00 00 00 mov $0x1,%eax
28: 89 cb mov %ecx,%ebx
2a: cd 80 int $0x80
0000002c <notfound>:
2c: b8 01 00 00 00 mov $0x1,%eax
31: bb 00 00 00 00 mov $0x0,%ebx
36: cd 80 int $0x80
00000030 08 00 05 00 90 8d 3d 00 00 00 00 8d 35 30 00 00 |......=.....50..|
00000040 00 8b 0d 2c 00 00 00 ac fc f2 ae 75 13 66 2b 0d |...,.......u.f+.|
00000050 2c 00 00 00 66 f7 d9 b8 01 00 00 00 89 cb cd 80 |,...f...........|
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Intel 80386
Version: 0x1
Entry point address: 0x8048074
Start of program headers: 52 (bytes into file)
Start of section headers: 260 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 2
Size of section headers: 40 (bytes)
Number of section headers: 6
Section header string table index: 3
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 08048074 000074 000038 00 AX 0 0 4
[ 2] .data PROGBITS 080490ac 0000ac 000031 00 WA 0 0 4
[ 3] .shstrtab STRTAB 00000000 0000dd 000027 00 0 0 1
[ 4] .symtab SYMTAB 00000000 0001f4 0000b0 10 5 7 4
[ 5] .strtab STRTAB 00000000 0002a4 000040 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
There are no section groups in this file.
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x08048000 0x08048000 0x000ac 0x000ac R E 0x1000
LOAD 0x0000ac 0x080490ac 0x080490ac 0x00031 0x00031 RW 0x1000
Section to Segment mapping:
Segment Sections...
00 .text
01 .data
There is no dynamic section in this file.
There are no relocations in this file.
There are no unwind sections in this file.
Symbol table '.symtab' contains 11 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 08048074 0 SECTION LOCAL DEFAULT 1
2: 080490ac 0 SECTION LOCAL DEFAULT 2
3: 080490ac 0 NOTYPE LOCAL DEFAULT 2 string1
4: 080490d8 0 NOTYPE LOCAL DEFAULT 2 length
5: 080490dc 0 NOTYPE LOCAL DEFAULT 2 string2
6: 080480a0 0 NOTYPE LOCAL DEFAULT 1 notfound
7: 08048074 0 NOTYPE GLOBAL DEFAULT 1 _start
8: 080490dd 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
9: 080490dd 0 NOTYPE GLOBAL DEFAULT ABS _edata
10: 080490e0 0 NOTYPE GLOBAL DEFAULT ABS _end
No version information found in this file.
# objdump -d sca.o
sca.o: file format elf32-i386
Disassembly of section .text:
00000000 <_start>:
0: 90 nop
1: 8d 3d 00 00 00 00 lea 0x0,%edi #00000003
7: 8d 35 30 00 00 00 lea 0x30,%esi #00000009
d: 8b 0d 2c 00 00 00 mov 0x2c,%ecx #0000000f
13: ac lods %ds:(%esi),%al
14: fc cld
15: f2 ae repnz scas %es:(%edi),%al
17: 75 13 jne 2c <notfound>
19: 66 2b 0d 2c 00 00 00 sub 0x2c,%cx #0000001c
20: 66 f7 d9 neg %cx
23: b8 01 00 00 00 mov $0x1,%eax
28: 89 cb mov %ecx,%ebx
2a: cd 80 int $0x80
0000002c <notfound>:
2c: b8 01 00 00 00 mov $0x1,%eax
31: bb 00 00 00 00 mov $0x0,%ebx
36: cd 80
# objdump -d sca
sca: file format elf32-i386
Disassembly of section .text:
08048074 <_start>:
8048074: 90 nop
8048075: 8d 3d ac 90 04 08 lea 0x80490ac,%edi
804807b: 8d 35 dc 90 04 08 lea 0x80490dc,%esi
8048081: 8b 0d d8 90 04 08 mov 0x80490d8,%ecx
8048087: ac lods %ds:(%esi),%al
8048088: fc cld
8048089: f2 ae repnz scas %es:(%edi),%al
804808b: 75 13 jne 80480a0 <notfound>
804808d: 66 2b 0d d8 90 04 08 sub 0x80490d8,%cx
8048094: 66 f7 d9 neg %cx
8048097: b8 01 00 00 00 mov $0x1,%eax
804809c: 89 cb mov %ecx,%ebx
804809e: cd 80 int $0x80
080480a0 <notfound>:
80480a0: b8 01 00 00 00 mov $0x1,%eax
80480a5: bb 00 00 00 00 mov $0x0,%ebx
80480aa: cd 80 int $0x80
00000003 00000201 R_386_32 00000000 .data
00000009 00000201 R_386_32 00000000 .data
0000000f 00000201 R_386_32 00000000 .data
0000001c 00000201 R_386_32 00000000 .data
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |