/freebsd/sys/kern/ |
H A D | kern_ctf.c | 51 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 D | link_elf_obj.c | 113 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 D | ef_obj.c | 87 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 D | elfh.c | 92 htole32(offsetof(struct elfh, shstrtab)), /* sh_offset */ 93 htole32(sizeof(elfhdr.shstrtab)), /* sh_size */ 124 "\0.shstrtab\0.text\0.data" /* shstrtab */
|
H A D | elfh.h | 35 char shstrtab[28]; /* section header string table */ member
|
/freebsd/usr.bin/elfdump/ |
H A D | elfdump.c | 448 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 D | binary.c | 195 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 D | sections.c | 437 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 D | ascii.c | 241 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 D | elfcopy.h | 242 struct section *shstrtab; /* .shstrtab section. */ member
|
H A D | main.c | 487 elftc_string_table_destroy(ecp->shstrtab->strtab); in free_elf() 505 ecp->shstrtab = NULL; in free_elf()
|
/freebsd/stand/common/ |
H A D | load_elf.c | 995 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 D | load_elf_obj.c | 473 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 D | InputFiles.cpp | 600 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 D | ARM.cpp | 1443 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()
|