議論/ELFローダ


Top / 議論 / ELFローダ

ELFローダのインターフェース等の議論およびメモです

実行可能形式のロード

前提

インターフェース

public
ELFLoader#prepare(ELFHeader* header) return size of image or error_cd
ELFLoader#load(byte* toAddress) return bool
ELFLoader#getErrorCode() const return int;

デバッグ

$ objdump -x KEYBDMNG.SVR
KEYBDMNG.SVR:     file format elf32-i386
KEYBDMNG.SVR
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0xa0000202
 
Program Header:
    LOAD off    0x00001000 vaddr 0xa0000000 paddr 0xa0000000 align 2**12
         filesz 0x000020e0 memsz 0x000020e0 flags r-x
    LOAD off    0x00004000 vaddr 0xa0003000 paddr 0xa0003000 align 2**12
         filesz 0x00000080 memsz 0x00001020 flags rw-
    LOAD off    0x00005000 vaddr 0xa0005000 paddr 0xa0005000 align 2**12
         filesz 0x00000014 memsz 0x00000014 flags rw-
 
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000020e0  a0000000  a0000000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000080  a0003000  a0003000  00004000  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000020  a0004000  a0004000  00005000  2**4
                  ALLOC
  3 .idata        00000014  a0005000  a0005000  00005000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
0000000a l       *ABS*	00000000 KeyBoardServer.cpp
a0000000 l       .text	00000000 .text
a0003000 l       .data	00000000 .data
a0004000 l       .bss	00000000 .bss
00000049 l       *ABS*	00000000 userlib.cpp
a0004000 l       .bss	00000000 _um
a00008e2 l       .text	00000000 __Z41__static_initialization_and_destruction_0ii
a0000920 l       .text	00000000 __GLOBAL__I__Z5sleepj
a000093c l       .text	00000000 __GLOBAL__D__Z5sleepj
a0000140 l       .text	00000000 .text
a0003000 l       .data	00000000 .data
a0004000 l       .bss	00000000 .bss
a00020cc l       .text	00000000 .ctors
a00020d8 l       .text	00000000 .dtors
0000006e l       *ABS*	00000000 MemoryManager.cpp
a0000960 l       .text	00000000 .text
a0003000 l       .data	00000000 .data
a0004010 l       .bss	00000000 .bss
000000a6 l       *ABS*	00000000 KeyBoardManager.cpp
a0003040 l       .data	00000000 .data$_ZTV5HListIP7KeyInfoE
a0003000 l       .data	00000000 .data$_ZTV4ListIP7KeyInfoE
a0001f88 l       .text	00000000 .text$_ZN5HListIP7KeyInfoED0Ev
a0001fc8 l       .text	00000000 .text$_ZN5HListIP7KeyInfoED1Ev
a0002008 l       .text	00000000 .text$_ZNK5HListIP7KeyInfoE10hasElementES1_
a00020a8 l       .text	00000000 .text$_ZNK5HListIP7KeyInfoE4sizeEv
a00020b4 l       .text	00000000 .text$_ZNK5HListIP7KeyInfoE7isEmptyEv
a0002068 l       .text	00000000 .text$_ZNK5HListIP7KeyInfoE3getEi
a0001e44 l       .text	00000000 .text$_ZN5HListIP7KeyInfoE6removeES1_
a0001ebc l       .text	00000000 .text$_ZN5HListIP7KeyInfoE8removeAtEi
a0001d10 l       .text	00000000 .text$_ZN5HListIP7KeyInfoE3addES1_
a0001ddc l       .text	00000000 .text$_ZN5HListIP7KeyInfoE4initEii
a0001d00 l       .text	00000000 .text$_ZN4ListIP7KeyInfoEC2Ev
a0001f50 l       .text	00000000 .text$_ZN5HListIP7KeyInfoEC1Ev
a0001170 l       .text	00000000 .text
a0003000 l       .data	00000000 .data
a0004010 l       .bss	00000000 .bss
000000b9 l       *ABS*	00000000 string.cpp
a0004010 l       .bss	00000000 _ZZ6strtokE5place
a0001a50 l       .text	00000000 .text
a0003000 l       .data	00000000 .data
a0004010 l       .bss	00000000 .bss
a0000000 l    d  .text	00000000 
a0003000 l    d  .data	00000000 
a0004000 l    d  .bss	00000000 
a0005000 l    d  .idata	00000000 
a0000038 g     F .text	00000000 __Z8monamainv
a0000140 g     F .text	00000000 __Z5sleepj
a0000154 g     F .text	00000000 __Z5printPKc
a0000168 g     F .text	00000000 __Z10_put_pixeliic
a0000190 g     F .text	00000000 __Z4killv
a000019e g     F .text	00000000 __Z4exiti
a00001ac g     F .text	00000000 __Z5_sendPKcP7Message
a00001c6 g     F .text	00000000 __Z8_receiveP7Message
a00001da g     F .text	00000000 __Z14mthread_createj
a00001ee g     F .text	00000000 __Z12mthread_joinj
a0000202 g     F .text	00000000 _user_start
a0000344 g     F .text	00000000 __Z20syscall_mutex_createv
a000035e g     F .text	00000000 __Z21syscall_mutex_trylocki
a000037e g     F .text	00000000 __Z18syscall_mutex_locki
a000039e g     F .text	00000000 __Z20syscall_mutex_unlocki
a00003be g     F .text	00000000 __Z21syscall_mutex_destroyi
a00003de g     F .text	00000000 __Z6mallocm
a00003fa g     F .text	00000000 __Z4freePv
a0000416 g     F .text	00000000 __Znaj
a0000432 g     F .text	00000000 __ZdaPv
a0000468 g     F .text	00000000 ___cxa_pure_virtual
a0000492 g     F .text	00000000 __pure_virtual
a00004a6 g     F .text	00000000 ___pure_virtual
a00004ba g     F .text	00000000 __Znwj
a00004d6 g     F .text	00000000 __ZdlPv
a00004f2 g     F .text	00000000 __ZN5MutexC2Ev
a00004f8 g     F .text	00000000 __ZN5MutexC1Ev
a00004fe g     F .text	00000000 __ZN5MutexD2Ev
a0000504 g     F .text	00000000 __ZN5MutexD1Ev
a000050a g     F .text	00000000 __ZN5Mutex4initEv
a0000526 g     F .text	00000000 __ZN5Mutex4lockEv
a000053c g     F .text	00000000 __ZN5Mutex6unlockEv
a0000552 g     F .text	00000000 __ZN5Mutex7tryLockEv
a0000568 g     F .text	00000000 __ZN5Mutex7destoryEv
a0000580 g     F .text	00000000 __Z6printfPKcz
a00008ae g     F .text	00000000 __Z6_powerjj
a00007c0 g     F .text	00000000 __Z12putCharacterc
a000069c g     F .text	00000000 __Z6putIntji
a00007ea g     F .text	00000000 __Z8printInti
a000025a g     F .text	00000000 __Z20syscall_mthread_joinj
a000023a g     F .text	00000000 __Z22syscall_mthread_createj
a0000324 g     F .text	00000000 __Z15syscall_receiveP7Message
a0000302 g     F .text	00000000 __Z12syscall_sendPKcP7Message
a00002e8 g     F .text	00000000 __Z12syscall_killv
a00002ba g     F .text	00000000 __Z17syscall_put_pixeliic
a000029a g     F .text	00000000 __Z13syscall_printPKc
a000027a g     F .text	00000000 __Z13syscall_sleepj
a0000960 g     F .text	00000000 __ZN13MemoryManagerC2Ev
a0000966 g     F .text	00000000 __ZN13MemoryManagerC1Ev
a000096c g     F .text	00000000 __ZN13MemoryManager10initializeEjj
a00009b4 g     F .text	00000000 __ZN13MemoryManagerD2Ev
a00009ba g     F .text	00000000 __ZN13MemoryManagerD1Ev
a00009c0 g     F .text	00000000 __ZNK13MemoryManager10hasNoEntryEP11memoryentry
a00009d0 g     F .text	00000000 __ZN13MemoryManager9addToNextEP11memoryentryS1_
a00009f0 g     F .text	00000000 __ZN13MemoryManager9addToListEPP11memoryentryS1_
a0000aa4 g     F .text	00000000 __ZN13MemoryManager14concatFreeListEv
a0000b6e g     F .text	00000000 __ZN13MemoryManager8allocateEj
a0000d02 g     F .text	00000000 __ZN13MemoryManager4freeEPv
a0000de4 g     F .text	00000000 __ZNK13MemoryManager17getFreeMemorySizeEv
a0000e1c g     F .text	00000000 __ZNK13MemoryManager17getUsedMemorySizeEv
a0000e54 g     F .text	00000000 __ZNK13MemoryManager10debugPrintEv
a0000e5a g     F .text	00000000 __ZN13MemoryManager21getPhysicalMemorySizeEv
a0000ebc g     F .text	00000000 __ZN14MemoryManager2C2Ev
a0000ec2 g     F .text	00000000 __ZN14MemoryManager2C1Ev
a0000ec8 g     F .text	00000000 __ZN14MemoryManager210initializeEjj
a0000ef6 g     F .text	00000000 __ZN14MemoryManager2D2Ev
a0000efc g     F .text	00000000 __ZN14MemoryManager2D1Ev
a0000f02 g     F .text	00000000 __ZN14MemoryManager28allocateEj
a0000fc0 g     F .text	00000000 __ZN14MemoryManager24freeEPv
a0001094 g     F .text	00000000 __ZN14MemoryManager221getPhysicalMemorySizeEv
a00010f6 g     F .text	00000000 __ZNK14MemoryManager217getFreeMemorySizeEv
a0001136 g     F .text	00000000 __ZNK14MemoryManager217getUsedMemorySizeEv
a0000d62 g     F .text	00000000 __ZN13MemoryManager14deleteFromListEPP11memoryentryS1_
a0000b62 g     F .text	00000000 __ZN13MemoryManager11getRealSizeEj
a0000adc g     F .text	00000000 __ZN13MemoryManager9tryConcatEP11memoryentry
a0001570 g     F .text	00000000 __ZN15KeyBoardManagerD2Ev
a0001586 g     F .text	00000000 __ZN15KeyBoardManagerD1Ev
a000159c g     F .text	00000000 __ZN15KeyBoardManagerC2Ev
a00015a8 g     F .text	00000000 __ZN15KeyBoardManagerC1Ev
a00015bc g     F .text	00000000 __ZN15KeyBoardManager4initEv
a000162a g     F .text	00000000 __ZN15KeyBoardManager10getKeyInfoEP7KeyInfo
a0001754 g     F .text	00000000 __ZN15KeyBoardManager14setKeyScanCodeEh
a0001f88 g     F .text	00000000 __ZN5HListIP7KeyInfoED0Ev
a0001fc8 g     F .text	00000000 __ZN5HListIP7KeyInfoED1Ev
a0002008 g     F .text	00000000 __ZNK5HListIP7KeyInfoE10hasElementES1_
a00020a8 g     F .text	00000000 __ZNK5HListIP7KeyInfoE4sizeEv
a00020b4 g     F .text	00000000 __ZNK5HListIP7KeyInfoE7isEmptyEv
a0002068 g     F .text	00000000 __ZNK5HListIP7KeyInfoE3getEi
a0001e44 g     F .text	00000000 __ZN5HListIP7KeyInfoE6removeES1_
a0001ebc g     F .text	00000000 __ZN5HListIP7KeyInfoE8removeAtEi
a0001d10 g     F .text	00000000 __ZN5HListIP7KeyInfoE3addES1_
a0001ddc g     F .text	00000000 __ZN5HListIP7KeyInfoE4initEii
a0001d00 g     F .text	00000000 __ZN4ListIP7KeyInfoEC2Ev
a0001f50 g     F .text	00000000 __ZN5HListIP7KeyInfoEC1Ev
a0001a50 g     F .text	00000000 _memset
a0001a7e g     F .text	00000000 _strlen
a0001aa4 g     F .text	00000000 _strcpy
a0001adc g     F .text	00000000 _strcmp
a0001b22 g     F .text	00000000 _memcpy
a0001b3a g     F .text	00000000 _strncpy
a0001b90 g     F .text	00000000 _strtok
a0001c94 g     F .text	00000000 _strcspn
a0001c34 g     F .text	00000000 _strspn
a0000000 g       .text	00000000 ___RUNTIME_PSEUDO_RELOC_LIST__
a0003040 g       .data	00000000 __ZTV5HListIP7KeyInfoE
a0003000 g       .data	00000000 __data_start__
a00020d4 g       .text	00000000 ___DTOR_LIST__
00001000 g       *ABS*	00000000 __size_of_stack_commit__
00200000 g       *ABS*	00000000 __size_of_stack_reserve__
00000004 g       *ABS*	00000000 __major_subsystem_version__
a0004000 g       .bss	00000000 __bss_start__
a0000000 g       .text	00000000 ___RUNTIME_PSEUDO_RELOC_LIST_END__
00001000 g       *ABS*	00000000 __size_of_heap_commit__
00000000 g       *ABS*	00000000 __dll__
00000000 g       *ABS*	00000000 __minor_os_version__
00400000 g       *ABS*	00000000 __image_base__
00001000 g       *ABS*	00000000 __section_alignment__
a0000000 g       .text	00000000 __RUNTIME_PSEUDO_RELOC_LIST__
a0003080 g       .data	00000000 __data_end__
a00020c8 g       .text	00000000 __CTOR_LIST__
a0001170 g       .text	00000000 __ZN15KeyBoardManager7keyMap_E
a0004020 g       .bss	00000000 __bss_end__
a00020c8 g       .text	00000000 ___CTOR_LIST__
00000200 g       *ABS*	00000000 __file_alignment__
00000004 g       *ABS*	00000000 __major_os_version__
a0000000 g       .text	00000000 __end__
a00020d4 g       .text	00000000 __DTOR_LIST__
00100000 g       *ABS*	00000000 __size_of_heap_reserve__
00000003 g       *ABS*	00000000 __subsystem__
00000001 g       *ABS*	00000000 __major_image_version__
00000000 g       *ABS*	00000000 __loader_flags__
00000000 g       *ABS*	00000000 __minor_subsystem_version__
00000000 g       *ABS*	00000000 __minor_image_version__
a0001370 g       .text	00000000 __ZN15KeyBoardManager9keyMapE0_E
a0000000 g       .text	00000000 __RUNTIME_PSEUDO_RELOC_LIST_END__
a0003000 g       .data	00000000 __ZTV4ListIP7KeyInfoE

 

MENU

now: 6

リンク


最新の20件
2018-10-07 2018-09-20 2018-09-03 2018-05-09 2017-09-29 2017-01-10 2016-12-11 2016-10-04 2016-08-14 2016-05-29 2015-12-28 2013-02-25 2013-02-21 2013-02-20 2013-02-12 2013-02-11 2013-02-10
最新の20件
2010-02-01 2010-01-31 2010-01-30 2010-01-29 2010-01-16

Counter: 3919, today: 1, yesterday: 0

リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Last-modified: 2008-03-28 (金) 15:48:02 (3914d);  Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.042 sec.