Lines Matching refs:sh
181 if (!gelf_getshdr(s, &sec->sh)) { in read_sections()
186 sec->name = elf_strptr(elf->elf, shstrndx, sec->sh.sh_name); in read_sections()
192 if (sec->sh.sh_size != 0) { in read_sections()
199 sec->data->d_size != sec->sh.sh_size) { in read_sections()
205 sec->len = sec->sh.sh_size; in read_sections()
231 symbols_nr = symtab->sh.sh_size / symtab->sh.sh_entsize; in read_symbols()
248 sym->name = elf_strptr(elf->elf, symtab->sh.sh_link, in read_symbols()
352 if (sec->sh.sh_type != SHT_RELA) in read_relas()
364 for (i = 0; i < sec->sh.sh_size / sec->sh.sh_entsize; i++) { in read_relas()
510 if (!gelf_getshdr(s, &sec->sh)) { in elf_create_section()
515 sec->sh.sh_size = size; in elf_create_section()
516 sec->sh.sh_entsize = entsize; in elf_create_section()
517 sec->sh.sh_type = SHT_PROGBITS; in elf_create_section()
518 sec->sh.sh_addralign = 1; in elf_create_section()
519 sec->sh.sh_flags = SHF_ALLOC; in elf_create_section()
547 sec->sh.sh_name = shstrtab->len; in elf_create_section()
576 sec->sh.sh_type = SHT_RELA; in elf_create_rela_section()
577 sec->sh.sh_addralign = 8; in elf_create_rela_section()
578 sec->sh.sh_link = find_section_by_name(elf, ".symtab")->idx; in elf_create_rela_section()
579 sec->sh.sh_info = base->idx; in elf_create_rela_section()
580 sec->sh.sh_flags = SHF_INFO_LINK; in elf_create_rela_section()
605 sec->sh.sh_size = size; in elf_rebuild_rela_section()
631 if (!gelf_update_shdr(s, &sec->sh)) { in elf_write()