ELF段的查看
使用命令readelf -l /usr/bin/chmod,结果:
Elf file type is DYN (Position-Independent Executable file) Entry point 0x41e0 There are 13 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align PHDR 0x0000000000000040 0x0000000000000040 0x0000000000000040 0x00000000000002d8 0x00000000000002d8 R 0x8 INTERP 0x0000000000000318 0x0000000000000318 0x0000000000000318 0x000000000000001c 0x000000000000001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001728 0x0000000000001728 R 0x1000 LOAD 0x0000000000002000 0x0000000000002000 0x0000000000002000 0x0000000000007aa6 0x0000000000007aa6 R E 0x1000 LOAD 0x000000000000a000 0x000000000000a000 0x000000000000a000 0x0000000000001fc8 0x0000000000001fc8 R 0x1000 LOAD 0x000000000000ca60 0x000000000000da60 0x000000000000da60 0x0000000000000638 0x00000000000007a0 RW 0x1000 DYNAMIC 0x000000000000cbe0 0x000000000000dbe0 0x000000000000dbe0 0x00000000000001b0 0x00000000000001b0 RW 0x8 NOTE 0x0000000000000338 0x0000000000000338 0x0000000000000338 0x0000000000000030 0x0000000000000030 R 0x8 NOTE 0x0000000000000368 0x0000000000000368 0x0000000000000368 0x0000000000000044 0x0000000000000044 R 0x4 GNU_PROPERTY 0x0000000000000338 0x0000000000000338 0x0000000000000338 0x0000000000000030 0x0000000000000030 R 0x8 GNU_EH_FRAME 0x000000000000b1a0 0x000000000000b1a0 0x000000000000b1a0 0x0000000000000204 0x0000000000000204 R 0x4 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x10 GNU_RELRO 0x000000000000ca60 0x000000000000da60 0x000000000000da60 0x00000000000005a0 0x00000000000005a0 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.gnu.property .note.gnu.build-id .note.ABI-tag .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .plt.got .plt.sec .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .ctors .dtors .data.rel.ro .dynamic .got .data .bss 06 .dynamic 07 .note.gnu.property 08 .note.gnu.build-id .note.ABI-tag 09 .note.gnu.property 10 .eh_frame_hdr 11
这是个可执行文件的programe head
人就像是被蒙着眼推磨的驴子,生活就像一条鞭子;当鞭子抽到你背上时,你就只能一直往前走,虽然连你也不知道要走到什么时候为止,便一直这么坚持着。