Created
          October 6, 2018 02:58 
        
      - 
      
 - 
        
Save k3170makan/6ed1ae0e4230f83d1f8408852e796d8d to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | void | |
| _dl_init (struct link_map *main_map, int argc, char **argv, char **env) | |
| { | |
| ElfW(Dyn) *preinit_array = main_map->l_info[DT_PREINIT_ARRAY]; | |
| ElfW(Dyn) *preinit_array_size = main_map->l_info[DT_PREINIT_ARRAYSZ]; | |
| unsigned int i; | |
| //... snip .... | |
| addrs = (ElfW(Addr) *) (preinit_array->d_un.d_ptr + main_map->l_addr); | |
| for (cnt = 0; cnt < i; ++cnt) | |
| ((init_t) addrs[cnt]) (argc, argv, env); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment