Lines Matching refs:CurrentShdrEx
288 ELShdrEx* CurrentShdrEx; in ELi_LoadObject() local
323 CurrentShdrEx = &DmyShdrEx; in ELi_LoadObject()
325 CurrentShdrEx->next = (void*)(malloc( sizeof(ELShdrEx))); in ELi_LoadObject()
326 CurrentShdrEx = (ELShdrEx*)(CurrentShdrEx->next); in ELi_LoadObject()
327 memset( CurrentShdrEx, 0, sizeof(ELShdrEx)); //Clear zero in ELi_LoadObject()
331 CurrentShdrEx->debug_flag = 1; in ELi_LoadObject()
335 ELi_GetShdr( ElfHandle, i, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
336 CurrentShdrEx->debug_flag = 0; in ELi_LoadObject()
342 CurrentShdrEx->str = (char*)malloc( 128); //Get 128 character buffer in ELi_LoadObject()
344 CurrentShdrEx->Shdr.sh_name, in ELi_LoadObject()
345 CurrentShdrEx->str, 128); in ELi_LoadObject()
350 …length = ELi_GetStrLen( ElfHandle, ElfHandle->CurrentEhdr.e_shstrndx, CurrentShdrEx->Shdr.sh_name)… in ELi_LoadObject()
352 CurrentShdrEx->str = (char*)malloc(length); in ELi_LoadObject()
353 if(CurrentShdrEx->str == 0) in ELi_LoadObject()
358 CurrentShdrEx->Shdr.sh_name, in ELi_LoadObject()
359 CurrentShdrEx->str, length); in ELi_LoadObject()
367 CurrentShdrEx->next = (void*)(malloc( sizeof(ELShdrEx))); in ELi_LoadObject()
368 CurrentShdrEx = (ELShdrEx*)(CurrentShdrEx->next); in ELi_LoadObject()
369 memset( CurrentShdrEx, 0, sizeof(ELShdrEx)); //Clear zero in ELi_LoadObject()
371 CurrentShdrEx->Shdr.sh_type = SPECIAL_SECTION_TYPE; in ELi_LoadObject()
372 CurrentShdrEx->Shdr.sh_flags = 0; in ELi_LoadObject()
373 CurrentShdrEx->Shdr.sh_addr = 0; in ELi_LoadObject()
374 CurrentShdrEx->Shdr.sh_offset = 0; in ELi_LoadObject()
375 …CurrentShdrEx->Shdr.sh_size = (section_num - 1)*4; //(ElfHandle- >CurrentEhdr.e_shnum)*4; (When ol… in ELi_LoadObject()
376 CurrentShdrEx->Shdr.sh_link = 0; in ELi_LoadObject()
377 CurrentShdrEx->Shdr.sh_info = 0; in ELi_LoadObject()
378 CurrentShdrEx->Shdr.sh_addralign = 4; in ELi_LoadObject()
379 CurrentShdrEx->Shdr.sh_entsize = 4; in ELi_LoadObject()
381 CurrentShdrEx->str = (char*)malloc( 128); in ELi_LoadObject()
383 CurrentShdrEx->str = (char*)malloc( strlen(SPECIAL_SECTION_NAME) + 1 ); in ELi_LoadObject()
384 if(CurrentShdrEx->str == 0) in ELi_LoadObject()
389 strcpy( CurrentShdrEx->str, SPECIAL_SECTION_NAME); in ELi_LoadObject()
391 CurrentShdrEx->next = NULL; in ELi_LoadObject()
400 CurrentShdrEx = ELi_GetShdrExfromList( ElfHandle->ShdrEx, i); in ELi_LoadObject()
402 if( CurrentShdrEx->debug_flag == 1) { //When it is debugging information in ELi_LoadObject()
407 (CurrentShdrEx->Shdr.sh_type == SHT_PROGBITS)) { in ELi_LoadObject()
409 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
410 ELi_CopySectionToBuffer( ElfHandle, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
420 else if( (CurrentShdrEx->Shdr.sh_flags == (SHF_ALLOC | SHF_WRITE))&& in ELi_LoadObject()
421 (CurrentShdrEx->Shdr.sh_type == SHT_NOBITS)) { in ELi_LoadObject()
423 CurrentShdrEx->loaded_adr = ELi_ALIGN( (u32)(ElfHandle->buf_current), 4); in ELi_LoadObject()
435 else if( CurrentShdrEx->Shdr.sh_type == SPECIAL_SECTION_TYPE) { in ELi_LoadObject()
438 u32 sh_size = CurrentShdrEx->Shdr.sh_size; in ELi_LoadObject()
448 CurrentShdrEx->loaded_adr = load_start; in ELi_LoadObject()
453 else if( CurrentShdrEx->Shdr.sh_type >= SHT_LOPROC) { in ELi_LoadObject()
455 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
456 ELi_CopySectionToBuffer( ElfHandle, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
459 else if( CurrentShdrEx->Shdr.sh_type == SHT_SYMTAB) { in ELi_LoadObject()
460 ELi_BuildSymList( ElfHandle, i, &(CurrentShdrEx->sym_table)); //Create symbol list in ELi_LoadObject()
476 CurrentShdrEx->Shdr.sh_link); in ELi_LoadObject()
479 ELi_GetStrAdr( ElfHandle, CurrentShdrEx->Shdr.sh_link, //Get symbol string in ELi_LoadObject()
486 … length = ELi_GetStrLen( ElfHandle, CurrentShdrEx->Shdr.sh_link, CurrentSymEx->Sym.st_name ) + 1; in ELi_LoadObject()
493 ELi_GetStrAdr( ElfHandle, CurrentShdrEx->Shdr.sh_link, in ELi_LoadObject()
531 CurrentShdrEx->loaded_adr = (u32)(ELi_CopySymToBuffer( ElfHandle)); in ELi_LoadObject()
532 if( (CurrentShdrEx->Shdr.sh_link != SHN_UNDEF) && in ELi_LoadObject()
533 (CurrentShdrEx->Shdr.sh_link < SHN_LORESERVE)) { in ELi_LoadObject()
534 …CurrentShdrEx->Shdr.sh_link = shdr_table[CurrentShdrEx->Shdr.sh_link]; //Update string section num… in ELi_LoadObject()
536 CurrentShdrEx->Shdr.sh_size = symbol_num * sizeof( Elf32_Sym); in ELi_LoadObject()
537 … CurrentShdrEx->Shdr.sh_info = last_local_symbol_index; //Reference the ARM ELF materials in ELi_LoadObject()
540 … ELi_FreeSymList( ElfHandle, (u32**)(CurrentShdrEx->sym_table)); //Deallocate the symbol list in ELi_LoadObject()
551 CurrentShdrEx = ELi_GetShdrExfromList( ElfHandle->ShdrEx, i); in ELi_LoadObject()
553 if( CurrentShdrEx->debug_flag == 1) { //When it is debugging information in ELi_LoadObject()
556 if( CurrentShdrEx->Shdr.sh_type == SHT_REL) { in ELi_LoadObject()
557 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
558 ELi_CopySectionToBuffer( ElfHandle, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
565 CurrentShdrEx->Shdr.sh_link); in ELi_LoadObject()
567 for( j=0; j<(CurrentShdrEx->Shdr.sh_size/CurrentShdrEx->Shdr.sh_entsize); j++) { in ELi_LoadObject()
568 … CurrentRel = (Elf32_Rel*)(CurrentShdrEx->loaded_adr + (j * sizeof( Elf32_Rel))); in ELi_LoadObject()
576 else if( CurrentShdrEx->Shdr.sh_type == SHT_RELA) { in ELi_LoadObject()
577 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
578 ELi_CopySectionToBuffer( ElfHandle, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
585 CurrentShdrEx->Shdr.sh_link); in ELi_LoadObject()
587 for( j=0; j<(CurrentShdrEx->Shdr.sh_size/CurrentShdrEx->Shdr.sh_entsize); j++) { in ELi_LoadObject()
588 … CurrentRela = (Elf32_Rela*)(CurrentShdrEx->loaded_adr + (j * sizeof( Elf32_Rela))); in ELi_LoadObject()
598 else if( CurrentShdrEx->Shdr.sh_type == SHT_STRTAB) { in ELi_LoadObject()
600 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
601 ELi_CopyShStrToBuffer( ElfHandle, &(CurrentShdrEx->Shdr)); in ELi_LoadObject()
603 CurrentShdrEx->loaded_adr = (u32) in ELi_LoadObject()
604 ELi_CopySymStrToBuffer( ElfHandle, CurrentShdrEx); in ELi_LoadObject()
630 CurrentShdrEx = ELi_GetShdrExfromList( ElfHandle->ShdrEx, i); in ELi_LoadObject()
631 …if( CurrentShdrEx->debug_flag == 1) { //Convert to the NULL section for debugging i… in ELi_LoadObject()
635 if( CurrentShdrEx->loaded_adr != 0) { in ELi_LoadObject()
636 CurrentShdrEx->Shdr.sh_offset = (CurrentShdrEx->loaded_adr - (u32)buf); in ELi_LoadObject()
639 if( CurrentShdrEx->Shdr.sh_type == SHT_SYMTAB) { in ELi_LoadObject()
644 … CurrentShdrEx->Shdr.sh_link = shdr_table[CurrentShdrEx->Shdr.sh_link]; //Update section number in ELi_LoadObject()
645 … CurrentShdrEx->Shdr.sh_info = shdr_table[CurrentShdrEx->Shdr.sh_info]; //Update section number in ELi_LoadObject()
647 memcpy( (u8*)tmp_buf, &(CurrentShdrEx->Shdr), in ELi_LoadObject()
773 CurrentShdrEx = ElfHandle->ShdrEx; in ELi_LoadObject()
774 if( CurrentShdrEx) { in ELi_LoadObject()
776 FwdShdrEx = CurrentShdrEx; in ELi_LoadObject()
777 CurrentShdrEx = CurrentShdrEx->next; in ELi_LoadObject()
782 }while( CurrentShdrEx != NULL); in ELi_LoadObject()