Lines Matching defs:shdr
331 Elf_Shdr* shdr = (Elf_Shdr*)(ehdrC + ehdr->e_shoff);
332 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
337 if (shdr[i].sh_type == sh_type
342 && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8)
344 ptr = ehdrC + shdr[i].sh_offset;
420 Elf_Shdr* shdr, int shnum,
426 Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset);
427 int nent = shdr[shnum].sh_size / sizeof(Elf_Rel);
428 int target_shndx = shdr[shnum].sh_info;
429 int symtab_shndx = shdr[shnum].sh_link;
431 stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset);
432 targ = (Elf_Word*)(ehdrC + shdr[ target_shndx ].sh_offset);
459 (ehdrC + shdr[ sym.st_shndx ].sh_offset
546 Elf_Shdr* shdr, int shnum,
552 Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset);
553 int nent = shdr[shnum].sh_size / sizeof(Elf_Rela);
554 int target_shndx = shdr[shnum].sh_info;
555 int symtab_shndx = shdr[shnum].sh_link;
557 stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset);
558 targ = (Elf_Addr) (ehdrC + shdr[ target_shndx ].sh_offset);
594 (ehdrC + shdr[ sym.st_shndx ].sh_offset
715 Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
716 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
736 if (0 == memcmp(".rel.stab", sh_strtab + shdr[shnum].sh_name, 9))
739 if (shdr[shnum].sh_type == SHT_REL ) {
740 ok = do_Elf_Rel_relocations ( oc, ehdrC, shdr,
745 if (shdr[shnum].sh_type == SHT_RELA) {
746 ok = do_Elf_Rela_relocations ( oc, ehdrC, shdr,
769 Elf_Shdr* shdr;
830 shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
839 sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
844 if (debug_linker>1) fprintf(stderr, "type=%2d ", (int)shdr[i].sh_type );
845 if (debug_linker>1) fprintf(stderr, "size=%4d ", (int)shdr[i].sh_size );
846 if (debug_linker>1) fprintf(stderr, "offs=%4d ", (int)shdr[i].sh_offset );
848 ehdrC + shdr[i].sh_offset,
849 ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1);
851 if (shdr[i].sh_type == SHT_REL) {
853 } else if (shdr[i].sh_type == SHT_RELA) {
860 sh_strtab + shdr[i].sh_name );
868 if (shdr[i].sh_type == SHT_STRTAB
873 && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8)
877 strtab = ehdrC + shdr[i].sh_offset;
889 if (shdr[i].sh_type != SHT_SYMTAB) continue;
892 stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset);
893 nent = shdr[i].sh_size / sizeof(Elf_Sym);
897 shdr[i].sh_size % sizeof(Elf_Sym)
899 if (0 != shdr[i].sh_size % sizeof(Elf_Sym)) {
959 Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
961 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
976 Elf_Shdr hdr = shdr[i];
1005 if (is_bss && shdr[i].sh_size > 0) {
1009 char* zspace = calloc(1, shdr[i].sh_size);
1010 shdr[i].sh_offset = ((char*)zspace) - ((char*)ehdrC);
1013 zspace, shdr[i].sh_size);
1021 sec_name = sh_strtab + shdr[i].sh_name;
1032 if (kind != SECTIONKIND_OTHER && shdr[i].sh_size > 0) {
1033 addProddableBlock(oc, ehdrC + shdr[i].sh_offset, shdr[i].sh_size);
1034 //addSection(oc, kind, ehdrC + shdr[i].sh_offset,
1035 // ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1);
1038 if (shdr[i].sh_type != SHT_SYMTAB) continue;
1041 stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset);
1042 nent = shdr[i].sh_size / sizeof(Elf_Sym);
1085 if (shdr[secno].sh_type == SHT_NOBITS) {
1090 ad = ehdrC + shdr[ secno ].sh_offset + stab[j].st_value;