ELFとか
$ more hello.c #includeint main(){ puts("Hellom World!"); return 0; } $ hd hello.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 fc 00 00 00 00 00 00 00 34 00 00 00 00 00 28 00 |........4.....(.| 00000030 0b 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 55 89 e5 83 ec 08 83 c4 f4 68 00 00 00 00 e8 fc |U........h......| 00000050 ff ff ff 83 c4 10 31 c0 eb 06 8d b6 00 00 00 00 |......1.........| 00000060 c9 c3 00 00 08 00 00 00 00 00 00 00 01 00 00 00 |................| 00000070 30 31 2e 30 31 00 00 00 48 65 6c 6c 6f 6d 20 57 |01.01...Hellom W| 00000080 6f 72 6c 64 21 00 00 47 43 43 3a 20 28 47 4e 55 |orld!..GCC: (GNU| 00000090 29 20 32 2e 39 35 2e 33 20 32 30 30 31 30 33 31 |) 2.95.3 2001031| 000000a0 35 20 28 72 65 6c 65 61 73 65 29 00 00 2e 73 79 |5 (release)...sy| 000000b0 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 |mtab..strtab..sh| 000000c0 73 74 72 74 61 62 00 2e 74 65 78 74 00 2e 72 65 |strtab..text..re| 000000d0 6c 2e 74 65 78 74 00 2e 64 61 74 61 00 2e 62 73 |l.text..data..bs| 000000e0 73 00 2e 6e 6f 74 65 00 2e 72 6f 64 61 74 61 00 |s..note..rodata.| 000000f0 2e 63 6f 6d 6d 65 6e 74 00 00 00 00 00 00 00 00 |.comment........| 00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| $ objdump -d hello.o hello.o: file format elf32-i386 Disassembly of section .text: 00000000 : 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 08 sub $0x8,%esp 6: 83 c4 f4 add $0xfffffff4,%esp 9: 68 00 00 00 00 push $0x0 e: e8 fc ff ff ff call f 13: 83 c4 10 add $0x10,%esp 16: 31 c0 xor %eax,%eax 18: eb 06 jmp 20 1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 20: c9 leave 21: c3 ret $ objdump -j .rodata -s hello.o hello.o: file format elf32-i386 Contents of section .rodata: 0000 48656c6c 6f6d2057 6f726c64 2100 Hellom World!. $ objdump -h hello.o hello.o: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .text 00000022 00000000 00000000 00000040 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 1 .data 00000000 00000000 00000000 00000064 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000000 00000000 00000000 00000064 2**2 ALLOC 3 .note 00000014 00000000 00000000 00000064 2**0 CONTENTS, READONLY 4 .rodata 0000000e 00000000 00000000 00000078 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .comment 00000026 00000000 00000000 00000086 2**0 CONTENTS, READONLY
readelfが無いから、objdump -hを使わんと...