Home
last modified time | relevance | path

Searched refs:shstrtab (Results 1 – 15 of 15) sorted by relevance

/freebsd/sys/kern/
H A Dkern_ctf.c51 caddr_t shstrtab = NULL; in link_elf_ctf_get() local
158 shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER, M_WAITOK); in link_elf_ctf_get()
161 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, shstrtab, in link_elf_ctf_get()
168 if (strcmp(".SUNW_ctf", shstrtab + shdr[i].sh_name) == 0) in link_elf_ctf_get()
297 if (shstrtab != NULL) in link_elf_ctf_get()
298 free(shstrtab, M_LINKER); in link_elf_ctf_get()
H A Dlink_elf_obj.c113 caddr_t shstrtab; /* Section name string table */ member
481 ef->shstrtab = (char *)shdr[shstrindex].sh_addr; in link_elf_link_preload()
514 if (ef->shstrtab && shdr[i].sh_name != 0) in link_elf_link_preload()
516 ef->shstrtab + shdr[i].sh_name; in link_elf_link_preload()
944 ef->shstrtab = malloc(shdr[shstrindex].sh_size, M_LINKER, in link_elf_load_file()
946 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file()
1055 if (ef->shstrtab != NULL && shdr[i].sh_name != 0) { in link_elf_load_file()
1057 ef->shstrtab + shdr[i].sh_name; in link_elf_load_file()
1333 free(ef->shstrtab, M_LINKER); in link_elf_unload_file()
/freebsd/usr.sbin/kldxref/
H A Def_obj.c87 caddr_t shstrtab; /* Section name string table */ member
368 &ef->shstrcnt, &ef->shstrtab) != 0) { in ef_obj_open()
397 if (ef->shstrtab && shdr[i].sh_name != 0) in ef_obj_open()
399 ef->shstrtab + shdr[i].sh_name; in ef_obj_open()
464 if (ef->shstrtab != NULL) in ef_obj_close()
465 free(ef->shstrtab); in ef_obj_close()
/freebsd/usr.sbin/btxld/
H A Delfh.c92 htole32(offsetof(struct elfh, shstrtab)), /* sh_offset */
93 htole32(sizeof(elfhdr.shstrtab)), /* sh_size */
H A Delfh.h35 char shstrtab[28]; /* section header string table */ member
/freebsd/usr.bin/elfdump/
H A Delfdump.c448 static char *shstrtab; variable
621 shstrtab = (char *)e + offset; in main()
626 shstrtab = NULL; in main()
631 if (strcmp(shstrtab + name, ".strtab") == 0) in main()
633 if (strcmp(shstrtab + name, ".dynstr") == 0) in main()
682 strcmp(shstrtab + name, ".note.tag") == 0) in main()
692 strcmp(shstrtab + name, ".got") == 0) in main()
851 fprintf(out, "\tsh_name: %s\n", shstrtab + name); in elf_print_shdr()
885 fprintf(out, "\nsymbol table (%s):\n", shstrtab + name); in elf_print_symtab()
1014 fprintf(out, "\nrelocation (%s):\n", shstrtab + name); in elf_print_rel()
[all …]
/freebsd/contrib/elftoolchain/elfcopy/
H A Dbinary.c195 ecp->shstrtab->off = 0; in create_elf_from_binary()
208 if ((ecp->shstrtab->os = elf_newscn(ecp->eout)) == NULL) in create_elf_from_binary()
211 insert_to_sec_list(ecp, ecp->shstrtab, 1); in create_elf_from_binary()
H A Dsections.c437 s = ecp->shstrtab; in create_scn()
1395 if (elftc_string_table_insert(ecp->shstrtab->strtab, name) == 0) in add_to_shstrtab()
1418 osh.sh_name = elftc_string_table_lookup(ecp->shstrtab->strtab, in update_shdr()
1457 Elf_Scn *shstrtab; in init_shstrtab() local
1463 shstrtab = elf_getscn(ecp->ein, indx); in init_shstrtab()
1464 if (shstrtab == NULL) in init_shstrtab()
1467 if (gelf_getshdr(shstrtab, &shdr) != &shdr) in init_shstrtab()
1477 if ((ecp->shstrtab = calloc(1, sizeof(*ecp->shstrtab))) == NULL) in init_shstrtab()
1479 s = ecp->shstrtab; in init_shstrtab()
1504 s = ecp->shstrtab; in set_shstrtab()
H A Dascii.c241 ecp->shstrtab->off = 0; in create_elf_from_srec()
313 if ((ecp->shstrtab->os = elf_newscn(ecp->eout)) == NULL) in create_elf_from_srec()
316 insert_to_sec_list(ecp, ecp->shstrtab, 1); in create_elf_from_srec()
510 ecp->shstrtab->off = 0; in create_elf_from_ihex()
586 if ((ecp->shstrtab->os = elf_newscn(ecp->eout)) == NULL) in create_elf_from_ihex()
589 insert_to_sec_list(ecp, ecp->shstrtab, 1); in create_elf_from_ihex()
H A Delfcopy.h242 struct section *shstrtab; /* .shstrtab section. */ member
H A Dmain.c487 elftc_string_table_destroy(ecp->shstrtab->strtab); in free_elf()
505 ecp->shstrtab = NULL; in free_elf()
/freebsd/stand/common/
H A Dload_elf.c997 char *shstrtab = NULL; local
1023 shstrtab = alloc_pread(VECTX_HANDLE(&ef), shdr[ef.ehdr->e_shstrndx].sh_offset,
1025 if (shstrtab == NULL) {
1035 if (strcmp(&shstrtab[shdr[i].sh_name],
1039 if ((strcmp(&shstrtab[shdr[i].sh_name], ".data") == 0) ||
1040 (strcmp(&shstrtab[shdr[i].sh_name], ".rodata") == 0)) {
1094 if (shstrtab != NULL)
1095 free(shstrtab);
H A Dload_elf_obj.c475 vm_offset_t shstrtab; in __elfN() local
480 shstrtab = shdr[ef->shstrindex].sh_addr; in __elfN()
487 p = strdupout(shstrtab + shdr[i].sh_name); in __elfN()
/freebsd/contrib/llvm-project/lld/ELF/
H A DInputFiles.cpp577 StringRef shstrtab = CHECK(obj.getSectionStringTable(objSections), this); in parse() local
583 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
606 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
657 i, sec, check(obj.getSectionName(sec, shstrtab))); in parse()
748 StringRef shstrtab = CHECK(obj.getSectionStringTable(objSections), this); in initializeSections() local
809 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
860 *this, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
/freebsd/contrib/llvm-project/lld/ELF/Arch/
H A DARM.cpp1366 StringTableSection *shstrtab = in writeARMCmseImportLib() local
1375 osIsPairs.emplace_back(make<OutputSection>(shstrtab->name, 0, 0), shstrtab); in writeARMCmseImportLib()
1395 osec->shName = shstrtab->addString(osec->name); in writeARMCmseImportLib()
1439 eHdr->e_shstrndx = shstrtab->getParent()->sectionIndex; in writeARMCmseImportLib()