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
478 ef->shstrtab = (char *)shdr[shstrindex].sh_addr; in link_elf_link_preload()
511 if (ef->shstrtab && shdr[i].sh_name != 0) in link_elf_link_preload()
513 ef->shstrtab + shdr[i].sh_name; in link_elf_link_preload()
941 ef->shstrtab = malloc(shdr[shstrindex].sh_size, M_LINKER, in link_elf_load_file()
943 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file()
1052 if (ef->shstrtab != NULL && shdr[i].sh_name != 0) { in link_elf_load_file()
1054 ef->shstrtab + shdr[i].sh_name; in link_elf_load_file()
1330 free(ef->shstrtab, M_LINKER); in link_elf_unload_file()
/freebsd/lib/libkldelf/
H A Def_obj.c87 caddr_t shstrtab; /* Section name string table */ member
373 &ef->shstrcnt, &ef->shstrtab) != 0) { in ef_obj_open()
402 if (ef->shstrtab && shdr[i].sh_name != 0) in ef_obj_open()
404 ef->shstrtab + shdr[i].sh_name; in ef_obj_open()
469 if (ef->shstrtab != NULL) in ef_obj_close()
470 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 */
124 "\0.shstrtab\0.text\0.data" /* shstrtab */
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()
983 fprintf(out, "\nrelocation with addend (%s):\n", shstrtab + name); in elf_print_rela()
[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.c995 char *shstrtab = NULL; local
1021 shstrtab = alloc_pread(VECTX_HANDLE(&ef), shdr[ef.ehdr->e_shstrndx].sh_offset,
1023 if (shstrtab == NULL) {
1033 if (strcmp(&shstrtab[shdr[i].sh_name],
1037 if ((strcmp(&shstrtab[shdr[i].sh_name], ".data") == 0) ||
1038 (strcmp(&shstrtab[shdr[i].sh_name], ".rodata") == 0)) {
1092 if (shstrtab != NULL)
1093 free(shstrtab);
H A Dload_elf_obj.c473 vm_offset_t shstrtab; in __elfN() local
478 shstrtab = shdr[ef->shstrindex].sh_addr; in __elfN()
485 p = strdupout(shstrtab + shdr[i].sh_name); in __elfN()
/freebsd/contrib/llvm-project/lld/ELF/
H A DInputFiles.cpp600 StringRef shstrtab = CHECK(obj.getSectionStringTable(objSections), this); in parse() local
606 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
629 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
680 i, sec, check(obj.getSectionName(sec, shstrtab))); in parse()
780 StringRef shstrtab = CHECK(obj.getSectionStringTable(objSections), this); in initializeSections() local
845 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
859 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
917 *this, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
/freebsd/contrib/llvm-project/lld/ELF/Arch/
H A DARM.cpp1443 StringTableSection *shstrtab = in writeARMCmseImportLib() local
1452 osIsPairs.emplace_back(make<OutputSection>(shstrtab->name, 0, 0), shstrtab); in writeARMCmseImportLib()
1472 osec->shName = shstrtab->addString(osec->name); in writeARMCmseImportLib()
1516 eHdr->e_shstrndx = shstrtab->getParent()->sectionIndex; in writeARMCmseImportLib()