This commit includes:
1) extract the common code of loader and put them into core/loader_share.c
2) extract common code for moduler parsing into functions.
3) add code to parse the shared libary header, and load it into memory.
a few more note
1) I moved the code swap_peb_pointer to be called before the privload_insert and privload_finalize.
this is to put it into the os_loader_init. Also I think it should swap peb pointer before calling entries.
2) add #ifdef DEBUG before privload_recurse_cnt.
3) use search_paths_idx for search_paths, and privmod_static_idx for privmod_static.
From qin.zhao@gmail.com on July 08, 2010 01:55:03
This commit includes: 1) extract the common code of loader and put them into core/loader_share.c 2) extract common code for moduler parsing into functions. 3) add code to parse the shared libary header, and load it into memory.
a few more note 1) I moved the code swap_peb_pointer to be called before the privload_insert and privload_finalize. this is to put it into the os_loader_init. Also I think it should swap peb pointer before calling entries. 2) add #ifdef DEBUG before privload_recurse_cnt. 3) use search_paths_idx for search_paths, and privmod_static_idx for privmod_static.
stats: 2454 diff lines
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=325