著者:後藤大地
今回は分割したファイルが実際にどのように処理され、最終的にバイナリ形式の実装ファイルに変換されるのかといった過程を、もうちょっと詳しく紹介していこうと思う。実際にどのように処理が進むのか知ることで、コーディング中の頭の中にどのように処理されるのか地図が浮かんでくるようになり、より効率が良く見通しの良いソースコードを記述できるようになる。その内側を調べていこう。
記事本文掲載のシェルスクリプトマガジンvol.46は以下リンク先でご購入できます。
1 2 3 4 5 6 7 8 9 |
% tree . |--?Makefile |--?func.c `--?main.c 0 directories, 3 files % |
1 2 3 4 5 6 7 8 9 |
#include <unistd.h> #include <stdio.h> #include <sysexits.h> int main(int argc, char *argv[]) { return EX_OK; } |
1 2 3 4 5 6 7 8 9 |
#include <stdio.h> int func() { printf("func is called.\n"); return 0; } |
1 2 3 4 5 6 7 |
all: # C言語ソースコードをオブジェクトデータへコンパイル cc -o func.o -c func.c cc -o main.o -c main.c clean: rm -f func.o main.o |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
% make cc -o func.o -c func.c cc -o main.o -c main.c % ls -l total 20 -rw-r--r-- 1 daichi staff 82 Dec 14 16:48 Makefile -rw-r--r-- 1 daichi staff 78 Dec 14 16:32 func.c -rw-r--r-- 1 daichi staff 1224 Dec 14 16:49 func.o -rw-r--r-- 1 daichi staff 114 Dec 14 16:30 main.c -rw-r--r-- 1 daichi staff 944 Dec 14 16:49 main.o % file func.o func.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped % file main.o main.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped % |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
% readelf -r -s func.o Relocation section with addend (.rela.text): r_offset r_info r_type st_value st_name + r_addend 00000000000a 000300000001 R_X86_64_64 0000000000000000 .rodata.str1.1 + 0 000000000015 000500000002 R_X86_64_PC32 0000000000000000 printf + fffffffffffffffc Relocation section with addend (.rela.eh_frame): r_offset r_info r_type st_value st_name + r_addend 000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0 Symbol table (.symtab) contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS func.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 4: 0000000000000000 38 FUNC GLOBAL DEFAULT 2 func 5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND printf % |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
% readelf -r -s main.o Relocation section with addend (.rela.eh_frame): r_offset r_info r_type st_value st_name + r_addend 000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0 Symbol table (.symtab) contains 4 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS main.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 3: 0000000000000000 22 FUNC GLOBAL DEFAULT 2 main % |
1 2 3 4 5 6 7 8 9 10 11 |
#include <unistd.h> #include <stdio.h> #include <sysexits.h> int main(int argc, char *argv[]) { func(); /* ← この行を追加 */ return EX_OK; } |
1 2 3 4 5 6 7 8 9 10 |
% make cc -o func.o -c func.c cc -o main.o -c main.c main.c:8:2: warning: implicit declaration of function 'func' is invalid in C99 [-Wimplicit-function-declaration] func(); ^ 1 warning generated. % |
1 2 3 4 5 6 7 8 9 |
all: # C言語ソースコードをオブジェクトデータへコンパイル cc -o func.o -c func.c # 定義が見つからない関数は無視してコンパイル cc -Wno-implicit-function-declaration \ -o main.o -c main.c clean: rm -f func.o main.o |
1 2 3 4 5 |
% make cc -o func.o -c func.c cc -Wno-implicit-function-declaration -o main.o -c main.c % |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
% readelf -r -s main.o Relocation section with addend (.rela.text): r_offset r_info r_type st_value st_name + r_addend 000000000019 000300000002 R_X86_64_PC32 0000000000000000 func + fffffffffffffffc Relocation section with addend (.rela.eh_frame): r_offset r_info r_type st_value st_name + r_addend 000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0 Symbol table (.symtab) contains 5 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS main.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 3: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND func 4: 0000000000000000 42 FUNC GLOBAL DEFAULT 2 main % |
1 2 3 4 5 6 7 8 9 10 11 |
all: # C言語ソースコードをオブジェクトデータへコンパイル cc -o func.o -c func.c # 定義が見つからない関数は無視してコンパイル cc -Wno-implicit-function-declaration \ -o main.o -c main.c # ライブラリ等をリンクして実行ファイルを生成 cc -o a.out main.o func.o clean: rm -f a.out func.o main.o |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
% make cc -o func.o -c func.c cc -Wno-implicit-function-declaration -o main.o -c main.c cc -o a.out main.o func.o % ls Makefile a.out func.c func.o main.c main.o % file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked,interpreter /libexec/ld-elf.so.1, for FreeBSD 11.0 (1100122), FreeBSD-style, not stripped % ./a.out func is called. % |
1 2 3 4 5 6 7 8 9 10 11 |
% ldd main.o ldd: main.o: not a dynamic ELF executable % ldd func.o ldd: func.o: not a dynamic ELF executable % ldd a.out a.out: libc.so.7 => /lib/libc.so.7 (0x800821000) % |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
% readelf -s -r a.out Relocation section with addend (.rela.plt): r_offset r_info r_type st_value st_name + r_addend 000000600a80 000200000007 R_X86_64_JUMP_SLOT 0000000000000000 printf + 0 000000600a88 000300000007 R_X86_64_JUMP_SLOT 0000000000000000 atexit + 0 000000600a90 000400000007 R_X86_64_JUMP_SLOT 0000000000000000 _init_tls + 0 000000600a98 000500000007 R_X86_64_JUMP_SLOT 0000000000000000 exit + 0 Symbol table (.dynsym) contains 9 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 2: 0000000000000000 188 FUNC GLOBAL DEFAULT UND printf@FBSD_1.0 (2) 3: 0000000000000000 71 FUNC GLOBAL DEFAULT UND atexit@FBSD_1.0 (2) 4: 0000000000000000 6 FUNC GLOBAL DEFAULT UND _init_tls@FBSD_1.0 (2) 5: 0000000000000000 54 FUNC GLOBAL DEFAULT UND exit@FBSD_1.0 (2) 6: 0000000000600ac0 8 OBJECT GLOBAL DEFAULT 23 environ 7: 0000000000600ac8 0 NOTYPE GLOBAL DEFAULT ABS _end 8: 0000000000600aa0 8 OBJECT GLOBAL DEFAULT 22 __progname Symbol table (.symtab) contains 69 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000400200 0 SECTION LOCAL DEFAULT 1 2: 0000000000400218 0 SECTION LOCAL DEFAULT 2 3: 0000000000400248 0 SECTION LOCAL DEFAULT 3 4: 0000000000400280 0 SECTION LOCAL DEFAULT 4 5: 00000000004002b0 0 SECTION LOCAL DEFAULT 5 6: 0000000000400388 0 SECTION LOCAL DEFAULT 6 7: 00000000004003e0 0 SECTION LOCAL DEFAULT 7 8: 00000000004003f8 0 SECTION LOCAL DEFAULT 8 9: 0000000000400418 0 SECTION LOCAL DEFAULT 9 10: 0000000000400478 0 SECTION LOCAL DEFAULT 10 11: 000000000040048c 0 SECTION LOCAL DEFAULT 11 12: 00000000004004e0 0 SECTION LOCAL DEFAULT 12 13: 00000000004007d8 0 SECTION LOCAL DEFAULT 13 14: 00000000004007e6 0 SECTION LOCAL DEFAULT 14 15: 00000000004007f8 0 SECTION LOCAL DEFAULT 15 16: 0000000000400828 0 SECTION LOCAL DEFAULT 16 17: 00000000006008d0 0 SECTION LOCAL DEFAULT 17 18: 00000000006008e0 0 SECTION LOCAL DEFAULT 18 19: 00000000006008f0 0 SECTION LOCAL DEFAULT 19 20: 00000000006008f8 0 SECTION LOCAL DEFAULT 20 21: 0000000000600a68 0 SECTION LOCAL DEFAULT 21 22: 0000000000600aa0 0 SECTION LOCAL DEFAULT 22 23: 0000000000600ac0 0 SECTION LOCAL DEFAULT 23 24: 0000000000000000 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/lib/csu/amd64/crt1.c 26: 0000000000400218 24 OBJECT LOCAL DEFAULT 2 abitag 27: 0000000000400230 24 OBJECT LOCAL DEFAULT 2 crt_noinit_tag 28: 0000000000400670 83 FUNC LOCAL DEFAULT 12 finalizer 29: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c 30: 00000000006008d0 8 OBJECT LOCAL DEFAULT 17 __CTOR_LIST__ 31: 00000000006008e0 8 OBJECT LOCAL DEFAULT 18 __DTOR_LIST__ 32: 00000000006008f0 0 OBJECT LOCAL DEFAULT 19 __JCR_LIST__ 33: 00000000004006d0 53 FUNC LOCAL DEFAULT 12 __do_global_dtors_aux 34: 0000000000600ab8 1 OBJECT LOCAL DEFAULT 22 __do_global_dtors_aux.completed 35: 0000000000600ab0 8 OBJECT LOCAL DEFAULT 22 __do_global_dtors_aux.p 36: 0000000000400710 34 FUNC LOCAL DEFAULT 12 frame_dummy 37: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c 38: 00000000006008d8 8 OBJECT LOCAL DEFAULT 17 __CTOR_END__ 39: 00000000006008e8 8 OBJECT LOCAL DEFAULT 18 __DTOR_END__ 40: 00000000004008c8 4 OBJECT LOCAL DEFAULT 16 __FRAME_END__ 41: 00000000006008f0 8 OBJECT LOCAL DEFAULT 19 __JCR_END__ 42: 00000000004007a0 54 FUNC LOCAL DEFAULT 12 __do_global_ctors_aux 43: 0000000000000000 0 FILE LOCAL DEFAULT ABS main.c 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS func.c 45: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __preinit_array_start 46: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __fini_array_end 47: 0000000000600a68 0 OBJECT LOCAL HIDDEN 21 _GLOBAL_OFFSET_TABLE_ 48: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __preinit_array_end 49: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __fini_array_start 50: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __init_array_end 51: 00000000006008cc 0 NOTYPE LOCAL HIDDEN 17 __init_array_start 52: 00000000006008f8 0 OBJECT LOCAL HIDDEN 20 _DYNAMIC 53: 00000000004004e0 390 FUNC GLOBAL DEFAULT 12 _start 54: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 55: 0000000000600aa0 8 OBJECT GLOBAL DEFAULT 22 __progname 56: 00000000004007d8 0 FUNC GLOBAL HIDDEN 13 _fini 57: 0000000000000000 188 FUNC GLOBAL DEFAULT UND printf@@FBSD_1.0 58: 0000000000000000 71 FUNC GLOBAL DEFAULT UND atexit@@FBSD_1.0 59: 0000000000000000 6 FUNC GLOBAL DEFAULT UND _init_tls@@FBSD_1.0 60: 0000000000400770 38 FUNC GLOBAL DEFAULT 12 func 61: 0000000000600aa8 8 OBJECT GLOBAL HIDDEN 22 __dso_handle 62: 0000000000600ab9 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 63: 0000000000600ac0 8 OBJECT GLOBAL DEFAULT 23 environ 64: 0000000000600ac8 0 NOTYPE GLOBAL DEFAULT ABS _end 65: 0000000000000000 54 FUNC GLOBAL DEFAULT UND exit@@FBSD_1.0 66: 0000000000600ab9 0 NOTYPE GLOBAL DEFAULT ABS _edata 67: 0000000000400740 42 FUNC GLOBAL DEFAULT 12 main 68: 0000000000400478 0 FUNC GLOBAL HIDDEN 10 _init % |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#include <unistd.h> #include <stdio.h> #include <sysexits.h> int func(); /* ← この行が宣言として追加された行 */ int main(int argc, char *argv[]) { func(); return EX_OK; } |
1 2 3 4 5 6 7 8 9 |
all: # C言語ソースコードをオブジェクトデータへコンパイル cc -o func.o -c func.c cc -o main.o -c main.c # ライブラリ等をリンクして実行ファイルを生成 cc -o a.out main.o func.o clean: rm -f a.out func.o main.o |
1 2 3 4 5 6 7 8 9 |
% make cc -o func.o -c func.c cc -o main.o -c main.c cc -o a.out main.o func.o % ./a.out func is called. % |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
% readelf -r -s main.o Relocation section with addend (.rela.text): r_offset r_info r_type st_value st_name + r_addend 000000000019 000300000002 R_X86_64_PC32 0000000000000000 func + fffffffffffffffc Relocation section with addend (.rela.eh_frame): r_offset r_info r_type st_value st_name + r_addend 000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0 Symbol table (.symtab) contains 5 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS main.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 3: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND func 4: 0000000000000000 42 FUNC GLOBAL DEFAULT 2 main % |
1 |
int func(); /* この関数を使うよ、という宣言をヘッダファイルへ移動 */ |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#include <unistd.h> #include <stdio.h> #include <sysexits.h> #include "tools.h" /* 作成したヘッダファイルを読み込む */ int main(int argc, char *argv[]) { func(); return EX_OK; } |
1 2 3 4 5 6 7 8 9 |
#include <stdio.h> int func() { printf("func is called.\n"); return 0; } |
1 2 3 4 5 6 7 8 9 10 |
% tree . . |-- Makefile |-- func.c |-- main.c `-- tools.h 0 directories, 4 files % |
1 2 3 4 5 6 7 8 9 |
all: # C言語ソースコードをオブジェクトデータへコンパイル cc -o func.o -c func.c cc -o main.o -c main.c # ライブラリ等をリンクして実行ファイルを生成 cc -o a.out main.o func.o clean: rm -f a.out func.o main.o |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
typedef signed char __int8_t; ...略... typedef __va_list va_list; struct __sbuf { unsigned char *_base; int _size; }; ...略... extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; ...略... int printf(const char * restrict, ...); ...略... int func() { printf("func is called.\n"); return 0; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
typedef signed char __int8_t; ...略... struct pthread; ...略... __bitcount16(__uint16_t _x) { _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f; _x = (_x + (_x >> 8)) & 0x00ff; return (_x); } ...略... extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; ...略... int func(); int main(int argc, char *argv[]) { func(); return 0; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
.text .file "func.c" .globl func .align 16, 0x90 .type func,@function func: # @func .cfi_startproc # BB#0: pushq %rbp .Ltmp0: .cfi_def_cfa_offset 16 .Ltmp1: .cfi_offset %rbp, -16 movq %rsp, %rbp .Ltmp2: .cfi_def_cfa_register %rbp subq $16, %rsp movabsq $.L.str, %rdi movb $0, %al callq printf xorl %ecx, %ecx movl %eax, -4(%rbp) # 4-byte Spill movl %ecx, %eax addq $16, %rsp popq %rbp retq .Lfunc_end0: .size func, .Lfunc_end0-func .cfi_endproc .type .L.str,@object # @.str .section .rodata.str1.1,"aMS",@progbits,1 .L.str: .asciz "func is called.\n" .size .L.str, 17 .ident "FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)" .section ".note.GNU-stack","",@progbits |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
.text .file "main.c" .globl main .align 16, 0x90 .type main,@function main: # @main .cfi_startproc # BB#0: pushq %rbp .Ltmp0: .cfi_def_cfa_offset 16 .Ltmp1: .cfi_offset %rbp, -16 movq %rsp, %rbp .Ltmp2: .cfi_def_cfa_register %rbp subq $32, %rsp movl $0, -4(%rbp) movl %edi, -8(%rbp) movq %rsi, -16(%rbp) movb $0, %al callq func xorl %edi, %edi movl %eax, -20(%rbp) # 4-byte Spill movl %edi, %eax addq $32, %rsp popq %rbp retq .Lfunc_end0: .size main, .Lfunc_end0-main .cfi_endproc .ident "FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)" .section ".note.GNU-stack","",@progbits |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
00000000 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00 |.ELF............| 00000010 01 00 3e 00 01 00 00 00 00 00 00 00 00 00 00 00 |..>.............| 00000020 00 00 00 00 00 00 00 00 70 01 00 00 00 00 00 00 |........p.......| 00000030 00 00 00 00 40 00 00 00 00 00 40 00 0d 00 0a 00 |....@.....@.....| 00000040 55 48 89 e5 48 83 ec 10 48 bf 00 00 00 00 00 00 |UH..H...H.......| 00000050 00 00 b0 00 e8 00 00 00 00 31 c9 89 45 fc 89 c8 |.........1..E...| 00000060 48 83 c4 10 5d c3 00 00 66 75 6e 63 20 69 73 20 |H...]...func is | 00000070 63 61 6c 6c 65 64 2e 0a 00 00 46 72 65 65 42 53 |called....FreeBS| 00000080 44 20 63 6c 61 6e 67 20 76 65 72 73 69 6f 6e 20 |D clang version | 00000090 33 2e 38 2e 30 20 28 74 61 67 73 2f 52 45 4c 45 |3.8.0 (tags/RELE| 000000a0 41 53 45 5f 33 38 30 2f 66 69 6e 61 6c 20 32 36 |ASE_380/final 26| 000000b0 32 35 36 34 29 20 28 62 61 73 65 64 20 6f 6e 20 |2564) (based on | 000000c0 4c 4c 56 4d 20 33 2e 38 2e 30 29 00 00 00 00 00 |LLVM 3.8.0).....| 000000d0 14 00 00 00 00 00 00 00 01 7a 52 00 01 78 10 01 |.........zR..x..| 000000e0 1b 0c 07 08 90 01 00 00 1c 00 00 00 1c 00 00 00 |................| 000000f0 00 00 00 00 26 00 00 00 00 41 0e 10 86 02 43 0d |....&....A....C.| 00000100 06 00 00 00 00 00 00 00 00 2e 73 79 6d 74 61 62 |..........symtab| 00000110 00 2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 |..strtab..shstrt| 00000120 61 62 00 2e 72 65 6c 61 2e 74 65 78 74 00 2e 64 |ab..rela.text..d| ...略... 000005b0 00 00 00 00 00 00 00 00 00 66 75 6e 63 2e 63 00 |.........func.c.| 000005c0 66 75 6e 63 00 70 72 69 6e 74 66 00 00 00 00 00 |func.printf.....| 000005d0 0a 00 00 00 00 00 00 00 01 00 00 00 05 00 00 00 |................| 000005e0 00 00 00 00 00 00 00 00 15 00 00 00 00 00 00 00 |................| 000005f0 02 00 00 00 0a 00 00 00 fc ff ff ff ff ff ff ff |................| 00000600 20 00 00 00 00 00 00 00 02 00 00 00 02 00 00 00 | ...............| 00000610 00 00 00 00 00 00 00 00 |........| 00000618 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
00000000 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00 |.ELF............| 00000010 01 00 3e 00 01 00 00 00 00 00 00 00 00 00 00 00 |..>.............| 00000020 00 00 00 00 00 00 00 00 58 01 00 00 00 00 00 00 |........X.......| 00000030 00 00 00 00 40 00 00 00 00 00 40 00 0c 00 09 00 |....@.....@.....| 00000040 55 48 89 e5 48 83 ec 20 c7 45 fc 00 00 00 00 89 |UH..H.. .E......| 00000050 7d f8 48 89 75 f0 b0 00 e8 00 00 00 00 31 ff 89 |}.H.u........1..| 00000060 45 ec 89 f8 48 83 c4 20 5d c3 00 00 00 46 72 65 |E...H.. ]....Fre| 00000070 65 42 53 44 20 63 6c 61 6e 67 20 76 65 72 73 69 |eBSD clang versi| 00000080 6f 6e 20 33 2e 38 2e 30 20 28 74 61 67 73 2f 52 |on 3.8.0 (tags/R| 00000090 45 4c 45 41 53 45 5f 33 38 30 2f 66 69 6e 61 6c |ELEASE_380/final| 000000a0 20 32 36 32 35 36 34 29 20 28 62 61 73 65 64 20 | 262564) (based | 000000b0 6f 6e 20 4c 4c 56 4d 20 33 2e 38 2e 30 29 00 00 |on LLVM 3.8.0)..| 000000c0 14 00 00 00 00 00 00 00 01 7a 52 00 01 78 10 01 |.........zR..x..| 000000d0 1b 0c 07 08 90 01 00 00 1c 00 00 00 1c 00 00 00 |................| 000000e0 00 00 00 00 2a 00 00 00 00 41 0e 10 86 02 43 0d |....*....A....C.| 000000f0 06 00 00 00 00 00 00 00 00 2e 73 79 6d 74 61 62 |..........symtab| 00000100 00 2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 |..strtab..shstrt| 00000110 61 62 00 2e 72 65 6c 61 2e 74 65 78 74 00 2e 64 |ab..rela.text..d| 00000120 61 74 61 00 2e 62 73 73 00 2e 63 6f 6d 6d 65 6e |ata..bss..commen| ...略... 00000540 00 00 00 00 00 00 00 00 00 6d 61 69 6e 2e 63 00 |.........main.c.| 00000550 6d 61 69 6e 00 66 75 6e 63 00 00 00 00 00 00 00 |main.func.......| 00000560 19 00 00 00 00 00 00 00 02 00 00 00 09 00 00 00 |................| 00000570 fc ff ff ff ff ff ff ff 20 00 00 00 00 00 00 00 |........ .......| 00000580 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 |................| 00000590 |