Lines Matching refs:osh
821 GElf_Shdr osh; in update_reloc() local
841 if (gelf_getshdr(s->os, &osh) == NULL) in update_reloc()
845 if (osh.sh_link != elf_ndxscn(ecp->symtab->is)) in update_reloc()
850 n = osh.sh_size / osh.sh_entsize; in update_reloc()
862 GElf_Shdr osh; in pad_section() local
884 if (gelf_getshdr(s->os, &osh) == NULL) in pad_section()
887 osh.sh_size = s->sz + s->pad_sz; in pad_section()
888 if (!gelf_update_shdr(s->os, &osh)) in pad_section()
934 GElf_Shdr osh; in resync_sections() local
991 if (gelf_getshdr(s->os, &osh) == NULL) in resync_sections()
994 osh.sh_addr = s->vma; in resync_sections()
995 osh.sh_addralign = s->align; in resync_sections()
996 osh.sh_offset = s->off; in resync_sections()
997 osh.sh_size = s->sz; in resync_sections()
998 if (!gelf_update_shdr(s->os, &osh)) in resync_sections()
1172 GElf_Shdr ish, osh; in copy_shdr() local
1177 if (gelf_getshdr(s->os, &osh) == NULL) in copy_shdr()
1182 (void) memcpy(&osh, &ish, sizeof(ish)); in copy_shdr()
1184 osh.sh_type = s->type; in copy_shdr()
1185 osh.sh_addr = s->vma; in copy_shdr()
1186 osh.sh_offset = s->off; in copy_shdr()
1187 osh.sh_size = s->sz; in copy_shdr()
1188 osh.sh_link = ish.sh_link; in copy_shdr()
1189 osh.sh_info = ish.sh_info; in copy_shdr()
1190 osh.sh_addralign = s->align; in copy_shdr()
1191 osh.sh_entsize = ish.sh_entsize; in copy_shdr()
1194 osh.sh_flags = 0; in copy_shdr()
1196 osh.sh_flags |= SHF_ALLOC; in copy_shdr()
1198 osh.sh_flags |= SHF_WRITE; in copy_shdr()
1200 osh.sh_flags |= SHF_EXECINSTR; in copy_shdr()
1207 osh.sh_type = s->type = SHT_PROGBITS; in copy_shdr()
1213 osh.sh_flags = ish.sh_flags; in copy_shdr()
1222 osh.sh_flags |= SHF_INFO_LINK; in copy_shdr()
1231 if (!gelf_update_shdr(s->os, &osh)) in copy_shdr()
1297 GElf_Shdr osh; in create_external_section() local
1317 if (gelf_getshdr(os, &osh) == NULL) in create_external_section()
1320 osh.sh_flags = flags; in create_external_section()
1321 osh.sh_type = s->type; in create_external_section()
1322 osh.sh_addr = s->vma; in create_external_section()
1323 osh.sh_addralign = s->align; in create_external_section()
1324 if (!gelf_update_shdr(os, &osh)) in create_external_section()
1403 GElf_Shdr osh; in update_shdr() local
1413 if (gelf_getshdr(s->os, &osh) == NULL) in update_shdr()
1418 osh.sh_name = elftc_string_table_lookup(ecp->shstrtab->strtab, in update_shdr()
1425 if (update_link && osh.sh_link != 0) in update_shdr()
1426 osh.sh_link = ecp->secndx[osh.sh_link]; in update_shdr()
1433 osh.sh_info != 0) in update_shdr()
1434 osh.sh_info = ecp->secndx[osh.sh_info]; in update_shdr()
1442 osh.sh_info = ecp->symndx[osh.sh_info]; in update_shdr()
1444 if (!gelf_update_shdr(s->os, &osh)) in update_shdr()