| /freebsd-12.1/usr.bin/gprof/ |
| H A D | elf.c | 70 const char *strtab; in elf_getnfile() local 102 strtab = (const char *)(base + sh_strtab->sh_offset); in elf_getnfile() 107 if (wantsym(&symtab[i], strtab)) in elf_getnfile() 119 if (wantsym(sym, strtab)) { in elf_getnfile() 121 npe->name = strtab + sym->st_name; in elf_getnfile() 132 wantsym(const Elf_Sym *sym, const char *strtab) in wantsym() argument 142 (uflag && strchr(strtab + sym->st_name, '.') != NULL)) in wantsym()
|
| H A D | aout.c | 55 static char *strtab; /* string table in core */ variable 106 strtab = calloc(ssiz, 1); in getstrtab() 107 if (strtab == NULL) in getstrtab() 109 if (fread(strtab+sizeof(ssiz), ssiz-sizeof(ssiz), 1, nfile) != 1) in getstrtab() 151 nbuf.n_type , strtab + nbuf.n_un.n_strx ); in getsymtab() 157 npe->name = strtab+nbuf.n_un.n_strx; in getsymtab() 212 name = strtab + nlistp -> n_un.n_strx; in funcsymbol()
|
| /freebsd-12.1/contrib/libarchive/libarchive/ |
| H A D | archive_read_support_format_ar.c | 61 char *strtab; member 113 ar->strtab = NULL; in archive_read_support_format_ar() 141 free(ar->strtab); in archive_read_format_ar_cleanup() 272 if (ar->strtab != NULL) { in _ar_read_header() 285 ar->strtab = st; in _ar_read_header() 317 if (ar->strtab == NULL || number >= ar->strtab_size) { in _ar_read_header() 561 for (p = ar->strtab; p < ar->strtab + size - 1; ++p) { in ar_parse_gnu_filename_table() 573 if (p != ar->strtab + size && *p != '\n' && *p != '`') in ar_parse_gnu_filename_table() 577 ar->strtab[size - 1] = '\0'; in ar_parse_gnu_filename_table() 584 free(ar->strtab); in ar_parse_gnu_filename_table() [all …]
|
| H A D | archive_write_set_format_ar.c | 52 char *strtab; member 259 ss = strstr(ar->strtab, se); in archive_write_ar_header() 274 if (format_decimal(ss - ar->strtab, in archive_write_ar_header() 382 ar->strtab = (char *)malloc(s + 1); in archive_write_ar_data() 383 if (ar->strtab == NULL) { in archive_write_ar_data() 388 memcpy(ar->strtab, buff, s); in archive_write_ar_data() 389 ar->strtab[s] = '\0'; in archive_write_ar_data() 412 free(ar->strtab); in archive_write_ar_free() 413 ar->strtab = NULL; in archive_write_ar_free()
|
| /freebsd-12.1/sbin/ldconfig/ |
| H A D | ldconfig.c | 410 char *strtab; in buildhints() local 446 strtab = (char *)xmalloc(strtab_sz); in buildhints() 474 strcpy(strtab + str_index, shp->name); in buildhints() 478 strcpy(strtab + str_index, shp->path); in buildhints() 487 strcpy(strtab + str_index, dir_list); in buildhints() 513 if (write(fd, strtab, strtab_sz) != strtab_sz) { in buildhints() 538 char *strtab; in readhints() local 580 strtab = (char *)addr + hdr->hh_strtab; in readhints() 583 add_search_path(strtab + hdr->hh_dirlist); in readhints() 615 shp->name = strdup(strtab + bp->hi_namex); in readhints() [all …]
|
| H A D | elfhints.c | 195 char *strtab; in read_elf_hints() local 225 strtab = (char *)mapbase + hdr->strtab; in read_elf_hints() 226 dirlist = strtab + hdr->dirlist; in read_elf_hints() 273 hdr.strtab = sizeof hdr; in write_elf_hints()
|
| /freebsd-12.1/lib/libc/gen/ |
| H A D | nlist.c | 111 caddr_t strtab, a_out_mmap; in __aout_fdnlist() local 154 strtab = a_out_mmap + stroff; in __aout_fdnlist() 185 if (!strcmp(&strtab[soff], p->n_un.n_name)) { in __aout_fdnlist() 245 char *strtab = NULL; in __elf_fdnlist() local 305 strtab = (char *)base; in __elf_fdnlist() 344 name = strtab + s->st_name; in __elf_fdnlist() 361 if (strtab != NULL) in __elf_fdnlist() 362 munmap(strtab, symstrsize); in __elf_fdnlist()
|
| /freebsd-12.1/contrib/compiler-rt/lib/cfi/ |
| H A D | cfi.cc | 223 uptr strtab = 0, symtab = 0, strsz = 0; in find_cfi_check_in_dso() local 228 strtab = p->d_un.d_ptr; in find_cfi_check_in_dso() 233 if (symtab > strtab) { in find_cfi_check_in_dso() 234 VReport(1, "Can not handle: symtab > strtab (%p > %zx)\n", symtab, strtab); in find_cfi_check_in_dso() 246 if (strtab >= beg && strtab + strsz < end && symtab >= beg && in find_cfi_check_in_dso() 254 VReport(1, "Can not handle: symtab %p, strtab %zx\n", symtab, strtab); in find_cfi_check_in_dso() 258 for (const Elf_Sym *p = (const Elf_Sym *)symtab; (Elf_Addr)p < strtab; in find_cfi_check_in_dso() 264 char *name = (char*)(strtab + p->st_name); in find_cfi_check_in_dso()
|
| /freebsd-12.1/libexec/rtld-elf/arm/ |
| H A D | reloc.c | 93 name = dstobj->strtab + dstsym->st_name; in do_copy_relocations() 218 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 225 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 248 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 294 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 311 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 331 obj->strtab + obj->symtab[symnum].st_name, in reloc_nonplt_object() 341 obj->strtab + obj->symtab[symnum].st_name); in reloc_nonplt_object()
|
| /freebsd-12.1/contrib/elftoolchain/elfcopy/ |
| H A D | symbols.c | 421 ecp->strtab->sz = 0; in generate_symbols() 423 ecp->strtab->buf = st_buf; in generate_symbols() 677 st = ecp->strtab; in create_symtab() 713 free(ecp->strtab->buf); in create_symtab() 714 free(ecp->strtab); in create_symtab() 716 ecp->strtab = NULL; in create_symtab() 767 if (ecp->strtab != NULL && ecp->strtab->buf != NULL) { in free_symtab() 845 ecp->strtab->sz = 0; in create_external_symtab() 847 ecp->strtab->buf = st_buf; in create_external_symtab() 956 st_buf = ecp->strtab->buf; in add_to_symtab() [all …]
|
| /freebsd-12.1/contrib/libarchive/libarchive/test/ |
| H A D | test_write_format_ar.c | 33 static char strtab[] = "abcdefghijklmn.o/\nggghhhjjjrrrttt.o/\niiijjjdddsssppp.o/\n"; variable 51 archive_entry_set_size(ae, strlen(strtab)); in DEFINE_TEST() 53 assertA(strlen(strtab) == (size_t)archive_write_data(a, strtab, strlen(strtab))); in DEFINE_TEST()
|
| /freebsd-12.1/libexec/rtld-elf/mips/ |
| H A D | reloc.c | 136 name = dstobj->strtab + dstsym->st_name; in do_copy_relocations() 334 (intmax_t)reloff, defobj->strtab + def->st_name, in _mips_rtld_bind() 390 sym->st_name + obj->strtab, (u_long) *got); in reloc_non_plt() 460 obj->strtab + obj->symtab[i].st_name); in reloc_non_plt() 500 obj->strtab + def->st_name, in reloc_non_plt() 531 obj->strtab + def->st_name, obj->path); in reloc_non_plt() 571 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt() 598 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt() 627 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt() 640 obj->strtab + obj->symtab[r_symndx].st_name); in reloc_non_plt()
|
| /freebsd-12.1/cddl/contrib/opensolaris/lib/libdtrace/common/ |
| H A D | dt_link.c | 128 char *strtab; in prepare_elf32() local 156 assert(strtab[0] == '\0'); in prepare_elf32() 324 char *strtab; in prepare_elf64() local 352 assert(strtab[0] == '\0'); in prepare_elf64() 1217 dt_strtab_t *strtab; in process_obj() local 1387 dt_strtab_destroy(strtab); in process_obj() 1399 dt_strtab_destroy(strtab); in process_obj() 1404 dt_strtab_destroy(strtab); in process_obj() 1415 dt_strtab_destroy(strtab); in process_obj() 1462 dt_strtab_destroy(strtab); in process_obj() [all …]
|
| /freebsd-12.1/contrib/dtc/libfdt/ |
| H A D | fdt_sw.c | 202 char *strtab = (char *)fdt + fdt_totalsize(fdt); in _fdt_find_add_string() local 208 p = _fdt_find_string(strtab - strtabsize, strtabsize, s); in _fdt_find_add_string() 210 return p - strtab; in _fdt_find_add_string() 218 memcpy(strtab + offset, s, len); in _fdt_find_add_string()
|
| H A D | fdt.c | 230 const char *_fdt_find_string(const char *strtab, int tabsize, const char *s) in _fdt_find_string() argument 233 const char *last = strtab + tabsize - len; in _fdt_find_string() 236 for (p = strtab; p <= last; p++) in _fdt_find_string()
|
| H A D | fdt_rw.c | 154 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt); in _fdt_find_add_string() local 160 p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s); in _fdt_find_add_string() 163 return (p - strtab); in _fdt_find_add_string() 165 new = strtab + fdt_size_dt_strings(fdt); in _fdt_find_add_string() 171 return (new - strtab); in _fdt_find_add_string()
|
| /freebsd-12.1/sys/contrib/libfdt/ |
| H A D | fdt_sw.c | 202 char *strtab = (char *)fdt + fdt_totalsize(fdt); in fdt_find_add_string_() local 208 p = fdt_find_string_(strtab - strtabsize, strtabsize, s); in fdt_find_add_string_() 210 return p - strtab; in fdt_find_add_string_() 218 memcpy(strtab + offset, s, len); in fdt_find_add_string_()
|
| H A D | fdt.c | 233 const char *fdt_find_string_(const char *strtab, int tabsize, const char *s) in fdt_find_string_() argument 236 const char *last = strtab + tabsize - len; in fdt_find_string_() 239 for (p = strtab; p <= last; p++) in fdt_find_string_()
|
| H A D | fdt_rw.c | 154 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt); in fdt_find_add_string_() local 160 p = fdt_find_string_(strtab, fdt_size_dt_strings(fdt), s); in fdt_find_add_string_() 163 return (p - strtab); in fdt_find_add_string_() 165 new = strtab + fdt_size_dt_strings(fdt); in fdt_find_add_string_() 171 return (new - strtab); in fdt_find_add_string_()
|
| /freebsd-12.1/usr.sbin/kgzip/ |
| H A D | elfhdr.h | 56 char strtab[sizeof(KGZ_SHSTR_STRTAB)]; member 83 struct kgz_strtab strtab; member
|
| H A D | elfhdr.c | 101 htole32(offsetof(struct kgz_shstrtab, strtab)), /* sh_name */ 105 htole32(offsetof(struct kgz_elfhdr, strtab)), /* sh_offset */
|
| /freebsd-12.1/cddl/contrib/opensolaris/cmd/lockstat/ |
| H A D | sym.c | 172 char *strtab; in symtab_init() local 207 strtab = (char *)elf_getdata(scn, NULL)->d_buf; in symtab_init() 215 add_symbol(symp->st_name + strtab, in symtab_init()
|
| /freebsd-12.1/sys/compat/linux/ |
| H A D | linux_vdso.c | 224 vm_offset_t strtab, symname; in __elfN() local 231 strtab = (vm_offset_t)((caddr_t)ehdr + in __elfN() 238 symname = strtab + sym->st_name; in __elfN()
|
| /freebsd-12.1/contrib/binutils/binutils/ |
| H A D | readelf.c | 841 char *strtab, in dump_relocations() argument 4403 char *strtab; in process_section_groups() local 4460 strtab = NULL; in process_section_groups() 4506 free (strtab); in process_section_groups() 4517 if (strtab) in process_section_groups() 4526 if (strtab) in process_section_groups() 4624 if (strtab) in process_section_groups() 4771 if (strtab) in process_relocs() 5185 if (aux.strtab) in ia64_process_unwind() 6667 free (strtab); in process_version_sections() [all …]
|
| /freebsd-12.1/sys/kern/ |
| H A D | link_elf.c | 91 caddr_t strtab; /* DT_STRTAB */ member 481 caddr_t strtab; in link_elf_preload_parse_symbols() local 513 strtab = base; in link_elf_preload_parse_symbols() 523 ef->ddbstrtab = strtab; in link_elf_preload_parse_symbols() 612 ef->ddbstrtab = ef->strtab; in parse_dynamic() 1196 return (ef->strtab + ref->st_name); in symbol_name() 1311 strp = ef->strtab + symp->st_name; in link_elf_lookup_symbol() 1540 return (ef->strtab + sym->st_name); in elf_get_symname() 1587 symbol = ef->strtab + sym->st_name; in elf_lookup() 1660 *strtab = ef->ddbstrtab; in link_elf_strtab_get() [all …]
|