ToDo:
NASM¤â¿¨¤ì¤ó¤È¤Ê¤¡¡¢¤È¤¤¤¦¤³¤È¤Ç Hello world! 76B ¤ò°Ü¿¢¡£ ¤µ¤é¤Ë¥´¥ë¥Õ¤·¤è¤¦
; hello76.asm BITS 32 org 0x00000000 db 0x7F, "ELF" ; e_ident db "Hello world!" dw 2 ; e_type dw 3 ; e_machine _start: mov byte [EDI+0x10], 0xa ; e_version ; set "\n" dd _start ; e_entry ; fall through! dd phdr - $$ ; e_phoff lea EDX, [ECX+0xd] ; e_shoff lea EAX, [ECX+0x4] ; e_flags mov ECX, EAX jmp short label1 ; e_ehsize dw 32 ; e_phentsize phdr: dd 1 ; e_phnum ; p_type ; e_shentsize dd 0 ; e_shnum ; p_offset ; e_shstrndx dd 0 ; p_vaddr label1: inc EBX ; p_paddr jmp short label2 db 0 dd 76 ; p_filesz dd 76 ; p_memsz db 0xff ; p_flags label2: int 0x80 xchg EBX, EAX xor EBX, EBX ; p_align int 0x80 filesize equ $ - $$
(05:37)
¤³¤Î¥¢¥×¥í¡¼¥Á¤Ï¸¤¤¤Ê¤¡¤È¤Ï»×¤Ã¤¿¤±¤É¡¢ "Hello world" ¤Î¤¢¤ë°ÌÃÖ¤¬ 0x00200000 ¤È¤«¤Ë¤Ê¤Ã¤Á¤ã¤Ã¤Æ¡¢ ¤³¤ì¤¬¤¦¤Ã¤È¤¦¤·¤¤¤ó¤À¤è¤Ê¤¡¡Ä
¤µ¤Ã¤¤Î Hello world ¤Ï EAX(write¥·¥¹¥Æ¥à¥³¡¼¥ë) ¤È ECX(4ByteÌܤËHello world¤¬ÃÖ¤¤¤Æ¤¢¤ë) ¤¬ °ìÃפ·¤Æ¤ë¡¢¤È¤«¤½¤¦¤¤¤¦¤Î¤¬Èþ¤·¤¤¤ó¤À¤±¤É
; hello.asm BITS 32 org 0x00200000 db 0x7F, "ELF" ; e_ident db "Hello world", 0xa dw 2 ; e_type dw 3 ; e_machine ;_start: jmp short label1 ; e_version ; dw 0 dd 1 ; e_version dd _start ; e_entry dd phdr - $$ ; e_phoff phdr: dd 1 ; e_shoff ; p_type dd 0 ; e_flags ; p_offset dd $$ ; e_ehsize ; p_vaddr ; e_phentsize dw 1 ; e_phnum ; p_paddr dw 0 ; e_shentsize dd filesize ; e_shnum ; p_filesz ; e_shstrndx dd filesize ; p_memsz ; db 0xff dd 5 ; p_flags dd 0x1000 ; p_align ; _start: xor eax, eax ; inc eax ; int 0x80 ;_start: mov byte [EDI+0x10], 0xa ; p_flags _start: mov ECX, 0x00200000 ; p_align lea EDX, [EDI+0xd] ; p_align lea EAX, [EDI+0x4] lea ECX, [ECX+0x4] inc EBX int 0x80 xchg EBX, EAX xor EBX, EBX int 0x80 filesize equ $ - $$
¥³¥á¥ó¥È̵Ãã¶ìÃã¤ä¤Ê¡£
(06:14)
¤µ¤Ã¤¤Î¤Ï 88B
¤¦¡¼¤ó ! ¤Ï̵¤¤¤·¤Ê¤ó¤«¤Ê¤¡¡£ x86 ¤Ã¤Æʸ»úÎó¥³¥Ô¡¼Ì¿Îá¤È¤«¤¢¤Ã¤¿¤È»×¤¦¤±¤É¡¢ ¤¢¤Î¤Ø¤ó»È¤¦¤È´°Á´¤Ë 76B ¤Ë¤Ï¤Ê¤é¤óµ¤¤¬¤¹¤ë¤Ê¤¡¡£
¤¢¤ÈåºÎï¤Ë½Å¤Ê¤ê¤¹¤®¤Æ¤Æ fall through ¤Ç¤¤Ê¤¤¤Î¤âÈþ¤·¤¯¤Ê¤¤¤è¤Ê¤¡¡£
(06:19)
; hello.asm BITS 32 org 0x00200000 db 0x7F, "ELF" ; e_ident db "Hello world", 0xa dw 2 ; e_type dw 3 ; e_machine exit: xor EBX, EBX ; e_version int 0x80 dd _start ; e_entry dd phdr - $$ ; e_phoff phdr: dd 1 ; e_shoff ; p_type dd 0 ; e_flags ; p_offset dd $$ ; e_ehsize ; p_vaddr ; e_phentsize dw 1 ; e_phnum ; p_paddr dw 0 ; e_shentsize dd filesize ; e_shnum ; p_filesz ; e_shstrndx dd filesize ; p_memsz _start: inc ECX shl ECX, 21 lea EDX, [EDI+0xd] lea EAX, [EDI+0x4] add ECX, EAX inc EBX int 0x80 xchg EBX, EAX jmp exit filesize equ $ - $$
¤È¤ê¤¢¤¨¤ºÉáÄ̤ˤä¤ë¤È exit 0 ¤¹¤ë¥³¡¼¥É¤Ï¤³¤ó¤Ê¤È¤³¤«¤Ê
(06:42)
(06:48)
ËöÈø¤Î ! ¤Ë¤³¤À¤ï¤ë¤È¤¹¤ë¤È¡¢ ¤¦¡¼¤ó¤¦¤Þ¤¯ e_type, e_machine ¤¬ fall through ¤Ç¤¤Ê¤¯¤Æ¡¢
BITS 32 org 0x00200000 db 0x7F, "ELF" ; e_ident _start: inc EBX mov ECX, hello lea EDX, [EDI+0xd] inc EAX jmp short label1 dw 2 ; e_type dw 3 ; e_machine label1: ; e_version inc EAX inc EAX jmp short label2 dd _start ; e_entry dd phdr - $$ ; e_phoff phdr: dd 1 ; e_shoff ; p_type dd 0 ; e_flags ; p_offset dd $$ ; e_ehsize ; p_vaddr ; e_phentsize dw 1 ; e_phnum ; p_paddr dw 0 ; e_shentsize dd filesize ; e_shnum ; p_filesz ; e_shstrndx dd filesize ; p_memsz db 0xff label2: inc EAX int 0x80 hello: db "Hello world!", 0x0a filesize equ $ - $$
¤Ç 73B ¡£¤³¤ì¤Ï¥»¥°¤ë¡£ exit ¤µ¤»¤¿¤¤ã¤â¤¦3B¡£¤µ¤é¤Ë1B¤ÇÀµ¾ï½ªÎ»¤Ë¡£ ¤Þ¤¡ 76B ±Û¤¨¤ë¤È°ÕÌ£¤¬¤Ê¤¤¡£
ËöÈø¤Î ! ¤Ë¤³¤À¤ï¤é¤Ê¤¤¤Ê¤é
BITS 32 org 0x00200000 db 0x7F, "ELF" ; e_ident db "Hello world", 0xa dw 2 ; e_type dw 3 ; e_machine _start: ; e_version inc ECX inc EAX jmp short main dd _start ; e_entry dd phdr - $$ ; e_phoff phdr: dd 1 ; e_shoff ; p_type dd 0 ; e_flags ; p_offset dd $$ ; e_ehsize ; p_vaddr ; e_phentsize dw 1 ; e_phnum ; p_paddr dw 0 ; e_shentsize dd filesize ; e_shnum ; p_filesz ; e_shstrndx dd filesize ; p_memsz main: shl ECX, 21 lea EDX, [EDI+0xd] lea EBX, [EDI+0x4] add ECX, EBX sys: xchg EBX, EAX int 0x80 jmp short sys filesize equ $ - $$
¤Î 72B ¤¢¤¿¤ê¤¬¡¢ exit 13 ¤Ë¤Ê¤Ã¤Á¤ã¤¦¤±¤É¡¢°ì±þ¡£
exit 0 ¤Ë¤¹¤ë¤È¡¢ 73B ¤Ë¤Ê¤Ã¤¿¡£
BITS 32 org 0x00200000 db 0x7F, "ELF" ; e_ident db "Hello world", 0xa dw 2 ; e_type dw 3 ; e_machine exit: xor EBX, EBX ; e_version int 0x80 dd _start ; e_entry dd phdr - $$ ; e_phoff phdr: dd 1 ; e_shoff ; p_type dd 0 ; e_flags ; p_offset dd $$ ; e_ehsize ; p_vaddr ; e_phentsize dw 1 ; e_phnum ; p_paddr dw 0 ; e_shentsize dd filesize ; e_shnum ; p_filesz ; e_shstrndx dd filesize ; p_memsz _start: lea EDX, [EDI+0xd] lea EAX, [EDI+0x4] mov ECX, 0x00200004 inc EBX int 0x80 xchg EBX, EAX jmp exit filesize equ $ - $$
¤¤¤º¤ì¤Ë¤»¤è¤â¤Ã¤ÈÌ¿Îá¤ò ¥Ø¥Ã¥À¤Ëʶ¤ì¤³¤Þ¤»¤ì¤Ð¤â¤¦¤Á¤ç¤¤ºï¤ì¤ëµ¤¤¬¤¹¤ë¡Ä
(08:44)
2634.jp ¤Ç¥¢¥¯¥»¥¹¤ò¡¢¤Ã¤Æ¤¤¤¦¹¹ð¤¬¤¢¤Ã¤¿¤ï¤±¤À¤±¤É¡¢ promise.jp ¤Ç¤â¹Ô¤±¤ë¤ó¤Ê¤é ¤½¤ì¤Ç¤¤¤¤¤ó¤¸¤ã¡¢¤ß¤¿¤¤¤Ê¤³¤È¤ò»×¤Ã¤¿¤Î¤Ç¤¹¤¬¡£
¤¦¡¼¤ó²¶¥×¥í¥ß¥¹¢ªpromise¤ÏÊÑ´¹¤Ç¤¤ë¤±¤É¡¢ ¥×¥í¥ß¥¹¢ª2634¤Ï¤Á¤ç¤Ã¤ÈÊÑ´¹¤Ç¤¤Ê¤¤¤ó¤À¤è¡£ ¤¦¡¼¤ó¡£ ¤É¤Ã¤Á¤¬Á´ÆüËÜ¿Í¡¢¤È¤¤¤¦¤« ¶â¼Ú¤ê¤ë¦¤Î¿ÍÁؤˤϤ狼¤ê¤ä¤¹¤¤¤ó¤À¤í¤¦¡Ä
¤¿¤Ö¤ó puromisu.jp ¤ò¼è¤ë¤È¤¤¤¤¤È»×¤¦¤ó¤À¡£ ¤È»×¤Ã¤¿¤é¼è¤Ã¤Æ¤¢¤Ã¤¿¡£ ¤µ¤¹¤¬
(16:38)
Î㤨¤Ð¤³¤Î¶õ´Ö¤Î¤Æ¤Ã¤Ú¤ó¤Ë¡¢ »ä¤Ï¤³¤³1½µ´Ö¤Ï¼«»¦¤¹¤ëͽÄê¤Î̵¤¤¤³¤È¤òÌÀµ¤·¤Þ¤¹¡¢ ºÇ½ª³ÎǧÆü(¡û·î¡ûÆü)¤ß¤¿¤¤¤Ê¤Î¤ò ¼ê·Ú¤Ë¹¹¿·¤Ç¤¤ë¤è¤¦¤ËÃÖ¤¤¤Æ¤ª¤±¤Ð¡¢ »ö¸Î¤«»¦¿Í¤Î»þ¤Ë¼«»¦¤À¤È¸íǧ¤µ¤ì¤ë ¥ê¥¹¥¯¤¬¸º¤ë¤È¤«¡£
¤¢¤Þ¤ê¤Ë¤É¤¦¤Ç¤â¤¤¤¤¥ê¥¹¥¯¤À¤Ã¤¿¡Ä¡ª
(16:40)
¤ä¤ë¤Ù¤¤³¤È¤ò½ñ¤½Ð¤¹¤È¤¤¤¤¤é¤·¤¤
¤È¤«¤Ï¤É¤¦¤Ç¤â¤¤¤¤¤È¤·¤Æ¡¢
mail ¤Î¤¢¤ì¤Ï¤ä¤ê¤¿¤¤¤±¤É ¤Þ¤º Apache 2.2 ¤¬Íߤ·¤¤¤ó¤À¤è¤Ê¡Ä
¤É¤¦¤Ç¤â¤¤¤¤¤±¤ÉºòÆü¤Î Hello ¤Ï readelf ¤Ï SEGV ¤¹¤ë¤Î¤Ë ¼Â¹Ô¤Ï¤Ç¤¤ë¤ó¤À¤è¡£
¤¢¤È Ubuntu ¤Ï¥¦¥Ö¥ó¥Ä¡¼¤¸¤ã¤Ê¤¤¤è¡£ ¥æ¥Ð¥ó¥È¥¥¡¼¤À¤è¡£ ºòÆüÁ´¤¯Ä̤¸¤Ê¤«¤Ã¤¿²¶¤¬¸À¤¦¤ó¤À¤«¤é´Ö°ã¤¤¤Ê¤¤
(18:25)
°Ê²¼¤Î¤è¤¦¤Ê¤³¤È¤Ë»È¤ï¤ì¤ëͽÄê¤Ç¤¹¡ª
¤Ê¤ó¤Ç¤½¤ó¤Ê¸Ä¿ÍŪ¤Ê¥Á¥ã¥ó¥Í¥ë¤Ë¡Ö¤µ¤½¤¤¡×¤Ã¤Æ½ñ¤¤¤¿¤ó¤À¤í¤¦
IRC¤À¤È¾Ã¤»¤Ê¤¤¤ï¤±¤À
(19:43)
shinh.org ¤Ë IRC ¥µ¥ÐΩ¤Æ¤Æ¤½¤ó¤Ê´¶¤¸¤Ë¤¹¤ë¤«¤Ê¤¡¡Ä ¤¿¤È¤¨¤Ð #mail ¤Ë¤Ï¥á¡¼¥ë¤ÎÄÌÃΤ¬¤¯¤ë¤È¤«
(19:46)
http://d.hatena.ne.jp/kikx/20061109#1163073252
¤¦¤Ø¡¼¡£ ¤Æ¤¤¤¦¤« file ¥³¥Þ¥ó¥É¤Î½ÐÎϤ¬¤ä¤±¤Ëû¤¤¤ó¤À¤±¤É ¤½¤¦¤¤¤¦ file ¥³¥Þ¥ó¥É¤Ê¤Î¤ä¤é ELF ¥Ø¥Ã¥À¤¬¤ª¤«¤·¤¤¤Î¤ä¤é¡Ä ¤Ç¤â ELF ¥Ø¥Ã¥À¤Î e_type ¤È e_machine ¤Ï¤¤¤ë¤È»×¤¦¤·¡Ä
¤¢¤È¤½¤â¤½¤âº£¤Î¤ä¤ê¤«¤¿¤À¤È ¸Â³¦¤Þ¤Ç¥³¡¼¥É¤È¥Ø¥Ã¥Àº®¤¼¤Æ¤â64B¤Ê¤ó¤À¡Ä
¤¦¤ó¤Ä¡¼¤³¤È¤Ï overlap ¤Î¤·¤«¤¿¤«¤é¤·¤Æ°ã¤¦¤ó¤«¡£
(23:56)
Á° | 2006ǯ 11·î |
¼¡ | ||||
Æü | ·î | ²Ð | ¿å | ÌÚ | ¶â | ÅÚ |
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 |
Á´¤Æ¥ê¥ó¥¯¥Õ¥ê¡¼¤Ç¤¹¡£ ¥³¡¼¥ÉÊҤϼ«Í³¤Ë»ÈÍѤ·¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£ ¤½¤Î¾¤Î¤â¤Î¤ÏGPL°·¤¤¤Ç¤¢¤ì¤Ð¤¢¤é¤æ¤ë»ÈÍѤ˴ؤ·¤Æʸ¶ç¤Ï¸À¤¤¤Þ¤»¤ó¡£ ¤Ê¤Ë¤«¤¢¤ì¤Ð²¼µ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ø¡£