Lines Matching refs:shdr

399    Elf_Shdr* shdr = (Elf_Shdr*)(ehdrC + ehdr->e_shoff);
400 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
405 if (shdr[i].sh_type == sh_type
410 && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8)
412 ptr = ehdrC + shdr[i].sh_offset;
516 Elf_Shdr* shdr, int shnum,
522 Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset);
523 int nent = shdr[shnum].sh_size / sizeof(Elf_Rel);
524 int target_shndx = shdr[shnum].sh_info;
525 int symtab_shndx = shdr[shnum].sh_link;
527 stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset);
528 targ = (Elf_Word*)(ehdrC + shdr[ target_shndx ].sh_offset);
555 (ehdrC + shdr[ sym.st_shndx ].sh_offset
642 Elf_Shdr* shdr, int shnum,
648 Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset);
649 int nent = shdr[shnum].sh_size / sizeof(Elf_Rela);
650 int target_shndx = shdr[shnum].sh_info;
651 int symtab_shndx = shdr[shnum].sh_link;
653 stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset);
654 targ = (Elf_Addr) (ehdrC + shdr[ target_shndx ].sh_offset);
701 (ehdrC + shdr[ sym.st_shndx ].sh_offset
875 Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
876 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
896 if (0 == memcmp(".rel.stab", sh_strtab + shdr[shnum].sh_name, 9))
899 if (shdr[shnum].sh_type == SHT_REL ) {
900 ok = do_Elf_Rel_relocations ( oc, ehdrC, shdr,
905 if (shdr[shnum].sh_type == SHT_RELA) {
906 ok = do_Elf_Rela_relocations ( oc, ehdrC, shdr,
929 Elf_Shdr* shdr;
993 shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
1002 sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
1007 if (debug_linker>1) fprintf(stderr, "type=%2d ", (int)shdr[i].sh_type );
1008 if (debug_linker>1) fprintf(stderr, "size=%4d ", (int)shdr[i].sh_size );
1009 if (debug_linker>1) fprintf(stderr, "offs=%4d ", (int)shdr[i].sh_offset );
1011 ehdrC + shdr[i].sh_offset,
1012 ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1);
1014 if (shdr[i].sh_type == SHT_REL) {
1016 } else if (shdr[i].sh_type == SHT_RELA) {
1023 sh_strtab + shdr[i].sh_name );
1031 if (shdr[i].sh_type == SHT_STRTAB
1036 && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8)
1040 strtab = ehdrC + shdr[i].sh_offset;
1052 if (shdr[i].sh_type != SHT_SYMTAB) continue;
1055 stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset);
1056 nent = shdr[i].sh_size / sizeof(Elf_Sym);
1060 (Long)(shdr[i].sh_size % sizeof(Elf_Sym))
1062 if (0 != shdr[i].sh_size % sizeof(Elf_Sym)) {
1122 Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff);
1124 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
1139 Elf_Shdr hdr = shdr[i];
1168 if (is_bss && shdr[i].sh_size > 0) {
1172 char* zspace = calloc(1, shdr[i].sh_size);
1173 shdr[i].sh_offset = ((char*)zspace) - ((char*)ehdrC);
1176 zspace, (Long)shdr[i].sh_size);
1183 sec_name = sh_strtab + shdr[i].sh_name;
1194 if (kind != SECTIONKIND_OTHER && shdr[i].sh_size > 0) {
1195 addProddableBlock(oc, ehdrC + shdr[i].sh_offset, shdr[i].sh_size);
1200 if (shdr[i].sh_type != SHT_SYMTAB) continue;
1203 stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset);
1204 nent = shdr[i].sh_size / sizeof(Elf_Sym);
1257 ad = ehdrC + shdr[ secno ].sh_offset + stab[j].st_value;