- 论坛徽章:
- 1
|
回复 3# 井蛙夏虫
readelf 这个命令好
得好好研究下它查询出来的一些信息,不是很理解
- readelf -h a.out
- 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: 0x8048650
- Start of program headers: 52 (bytes into file)
- Start of section headers: 4476 (bytes into file)
- Flags: 0x0
- Size of this header: 52 (bytes)
- Size of program headers: 32 (bytes)
- Number of program headers: 9
- Size of section headers: 40 (bytes)
- Number of section headers: 30
- Section header string table index: 27
复制代码
- readelf -l a.out
- Elf file type is EXEC (Executable file)
- Entry point 0x8048650
- There are 9 program headers, starting at offset 52
- Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4
- INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1
- [Requesting program interpreter: /lib/ld-linux.so.2]
- LOAD 0x000000 0x08048000 0x08048000 0x00be4 0x00be4 R E 0x1000
- LOAD 0x000f14 0x08049f14 0x08049f14 0x00140 0x0014c RW 0x1000
- DYNAMIC 0x000f28 0x08049f28 0x08049f28 0x000c8 0x000c8 RW 0x4
- NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4
- GNU_EH_FRAME 0x000ac4 0x08048ac4 0x08048ac4 0x0003c 0x0003c R 0x4
- GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
- GNU_RELRO 0x000f14 0x08049f14 0x08049f14 0x000ec 0x000ec R 0x1
- Section to Segment mapping:
- Segment Sections...
- 00
- 01 .interp
- 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
- 03 .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
- 04 .dynamic
- 05 .note.ABI-tag .note.gnu.build-id
- 06 .eh_frame_hdr
- 07
- 08 .ctors .dtors .jcr .dynamic .got
复制代码 |
|