/freebsd-10.3-release/sys/mips/mips/ |
H A D | elf_trampoline.c | 109 Elf64_Shdr shdr[64] /* XXX */; local 113 Elf32_Shdr shdr[64] /* XXX */; 132 memcpy(shdr, (void *)(kstart + eh->e_shoff), 133 sizeof(*shdr) * eh->e_shnum); 137 if (shdr[i].sh_type == SHT_SYMTAB) { 141 if (shdr[i].sh_offset != 0 && 142 shdr[i].sh_size != 0) { 144 symstrindex = shdr[i].sh_link; 177 tmp = shdr[symtabindex].sh_size + 178 shdr[symstrinde [all...] |
/freebsd-10.3-release/sys/boot/common/ |
H A D | load_elf_obj.c | 192 Elf_Shdr *shdr, *cshdr, *lshdr; local 203 shdr = alloc_pread(ef->fd, (off_t)hdr->e_shoff, shdrbytes); 204 if (shdr == NULL) { 209 ef->e_shdr = shdr; 217 shdr[i].sh_addr = 0; 219 if (shdr[i].sh_size == 0) 221 switch (shdr[i].sh_type) { 227 lastaddr = roundup(lastaddr, shdr[i].sh_addralign); 228 shdr[i].sh_addr = (Elf_Addr)lastaddr; 229 lastaddr += shdr[ 429 Elf_Shdr *shdr; local 467 Elf_Shdr *shdr; local [all...] |
H A D | load_elf.c | 302 Elf_Shdr *shdr; local 320 shdr = NULL; 454 shdr = alloc_pread(ef->fd, ehdr->e_shoff, chunk); 455 if (shdr == NULL) { 460 file_addmetadata(fp, MODINFOMD_SHDR, chunk, shdr); 465 if (shdr[i].sh_type != SHT_SYMTAB) 470 if (shdr[i].sh_offset >= phdr[j].p_offset && 471 (shdr[i].sh_offset + shdr[i].sh_size <= 473 shdr[ 695 Elf_Shdr *sh_meta, *shdr = NULL; local [all...] |
/freebsd-10.3-release/lib/libelf/ |
H A D | libelf_checksum.c | 54 GElf_Shdr shdr; local 82 if (gelf_getshdr(scn, &shdr) == NULL) 84 if ((shdr.sh_flags & SHF_ALLOC) == 0 || 85 shdr.sh_type == SHT_DYNAMIC || 86 shdr.sh_type == SHT_DYNSYM)
|
H A D | elf_strptr.c | 47 GElf_Shdr shdr; local 55 gelf_getshdr(s, &shdr) == NULL) 58 if (/*shdr.sh_type != SHT_STRTAB || */ 59 offset >= shdr.sh_size) {
|
/freebsd-10.3-release/cddl/contrib/opensolaris/tools/ctf/cvt/ |
H A D | output.c | 342 GElf_Shdr shdr; local 356 gelf_getshdr(scn, &shdr); 357 nent = shdr.sh_size / shdr.sh_entsize; 359 scn = elf_getscn(elf, shdr.sh_link); 463 GElf_Shdr shdr; local 544 gelf_getshdr(sscn, &shdr); 561 pad = new_offset % shdr.sh_addralign; 564 new_offset += shdr.sh_addralign - pad; 565 shdr [all...] |
H A D | util.c | 68 GElf_Shdr shdr; local 76 if (gelf_getshdr(scn, &shdr) == NULL) { 83 (size_t)shdr.sh_name)) == NULL) {
|
/freebsd-10.3-release/sys/kern/ |
H A D | kern_ctf.c | 63 Elf_Shdr *shdr = NULL; local 145 shdr = malloc(nbytes, M_LINKER, M_WAITOK); 148 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shdr, nbytes, 158 if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB) { 161 shdr[hdr->e_shstrndx].sh_type); 167 shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER, M_WAITOK); 171 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, 177 if (strcmp(".SUNW_ctf", shstrtab + shdr[i].sh_name) == 0) 190 shdr[ [all...] |
H A D | link_elf_obj.c | 202 Elf_Shdr *shdr; local 221 shdr = (Elf_Shdr *)preload_search_info(modptr, MODINFO_METADATA | 229 shdr == NULL) 251 ef->e_shdr = shdr; 257 switch (shdr[i].sh_type) { 267 symstrindex = shdr[i].sh_link; 281 shdr[symstrindex].sh_type != SHT_STRTAB || shstrindex == 0 || 283 shdr[shstrindex].sh_type != SHT_STRTAB) { 309 if (shdr[i].sh_addr != 0 && (off == 0 || shdr[ 449 Elf_Shdr *shdr; local [all...] |
/freebsd-10.3-release/sys/compat/linux/ |
H A D | linux_vdso.c | 106 Elf_Shdr *shdr; local 122 shdr = (Elf_Shdr *) ((caddr_t)ehdr + ehdr->e_shoff); 127 if (shdr[i].sh_size == 0) 129 if (shdr[i].sh_type == SHT_DYNSYM) { 131 __elfN(symstrindex) = shdr[i].sh_link; 147 Elf_Shdr *shdr; local 196 shdr = (Elf_Shdr *)((caddr_t)ehdr + ehdr->e_shoff); 198 if (!(shdr[i].sh_flags & SHF_ALLOC)) 200 shdr[i].sh_addr += vdso_adjust; 201 if (shdr[ 226 Elf_Shdr *shdr; local [all...] |
/freebsd-10.3-release/usr.sbin/kldxref/ |
H A D | ef_obj.c | 333 Elf_Shdr *shdr; local 383 ef->e_shdr = shdr = vtmp; 390 switch (shdr[i].sh_type) { 398 symstrindex = shdr[i].sh_link; 420 shdr[symstrindex].sh_type != SHT_STRTAB) { 440 ef->ddbsymcnt = shdr[symtabindex].sh_size / sizeof(Elf_Sym); 441 if (ef_obj_read_entry(ef, shdr[symtabindex].sh_offset, 442 shdr[symtabindex].sh_size, (void**)&ef->ddbsymtab) != 0) { 447 ef->ddbstrcnt = shdr[symstrindex].sh_size; 448 if (ef_obj_read_entry(ef, shdr[symstrinde [all...] |
/freebsd-10.3-release/usr.sbin/crunch/crunchide/ |
H A D | exec_elf32.c | 91 Elf_Shdr *shdr; member in struct:shlayout 302 layoutp[shnum].shdr = &shdrshdr; 311 xewtoh(layoutp[m].shdr->sh_offset)) 322 layoutp[r].shdr = &shdrp[i]; 345 if (layoutp[i].shdr == &shdrshdr) { 350 if (layoutp[i].shdr == shstrtabshdr) { 356 if (layoutp[i].shdr == strtabshdr) 358 if (layoutp[i].shdr == symtabshdr || i >= strtabidx) { 359 off = xewtoh(layoutp[i].shdr->sh_offset); 360 if ((size = xewtoh(layoutp[i].shdr [all...] |
/freebsd-10.3-release/sys/arm/arm/ |
H A D | elf_trampoline.c | 488 Elf32_Shdr shdr[64] /* XXX */; local 512 memcpy(shdr, (void *)(kstart + eh->e_shoff), 513 sizeof(*shdr) * eh->e_shnum); 517 if (shdr[i].sh_type == SHT_SYMTAB) { 520 shdr[i].sh_offset >= 522 (shdr[i].sh_offset + 523 shdr[i].sh_size <= 526 shdr[i].sh_offset = 0; 527 shdr[i].sh_size = 0; 531 if (shdr[ [all...] |
/freebsd-10.3-release/lib/libc/gen/ |
H A D | nlist.c | 249 Elf_Shdr *shdr = NULL; local 275 shdr = (Elf_Shdr *)base; 284 if (shdr[i].sh_type == SHT_SYMTAB) { 285 symoff = shdr[i].sh_offset; 286 symsize = shdr[i].sh_size; 287 symstroff = shdr[shdr[i].sh_link].sh_offset; 288 symstrsize = shdr[shdr[i].sh_link].sh_size; 354 elf_sym_to_nlist(p, s, shdr, [all...] |
/freebsd-10.3-release/contrib/libexecinfo/ |
H A D | symtab.c | 108 GElf_Shdr shdr; local 113 gelf_getshdr(scn, &shdr); 114 if(shdr.sh_type != SHT_SYMTAB) 118 ns = shdr.sh_size / shdr.sh_entsize; 141 elf_strptr(elf, shdr.sh_link, sym.st_name));
|
/freebsd-10.3-release/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | drti.c | 159 GElf_Shdr shdr; local 206 gelf_getshdr(scn, &shdr); 207 if (shdr.sh_type == SHT_SYMTAB) { 208 symtabidx = shdr.sh_link; 210 } else if (shdr.sh_type == SHT_DYNSYM) { 211 dynsymidx = shdr.sh_link; 213 } else if (shdr.sh_type == SHT_PROGBITS) { 214 s = elf_strptr(e, shstridx, shdr.sh_name); 230 aligned_filesz = (shdr.sh_addralign == 0 ? dof->dofh_filesz : 231 roundup2(dof->dofh_filesz, shdr [all...] |
H A D | dt_link.c | 75 (lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \ 76 (off64_t)elf_file.shdr[(index)].sh_offset || \ 77 dt_write(dtp, fd, (data), elf_file.shdr[(index)].sh_size) != \ 78 elf_file.shdr[(index)].sh_size) 501 Elf32_Shdr shdr[ESHDR_NUM]; member in struct:__anon51 558 shp = &elf_file.shdr[ESHDR_SHSTRTAB]; 566 shp = &elf_file.shdr[ESHDR_DOF]; 575 shp = &elf_file.shdr[ESHDR_STRTAB]; 584 shp = &elf_file.shdr[ESHDR_SYMTAB]; 606 shp = &elf_file.shdr[ESHDR_RE 649 Elf64_Shdr shdr[ESHDR_NUM]; member in struct:__anon52 1688 GElf_Shdr shdr; local [all...] |
/freebsd-10.3-release/lib/libproc/ |
H A D | proc_sym.c | 253 GElf_Shdr shdr; local 283 gelf_getshdr(scn, &shdr); 284 switch (shdr.sh_type) { 287 symtabstridx = shdr.sh_link; 291 dynsymstridx = shdr.sh_link; 433 GElf_Shdr shdr; local 464 gelf_getshdr(scn, &shdr); 465 switch (shdr.sh_type) { 468 symtabstridx = shdr.sh_link; 472 dynsymstridx = shdr 535 GElf_Shdr shdr; local [all...] |
/freebsd-10.3-release/cddl/contrib/opensolaris/cmd/lockstat/ |
H A D | sym.c | 215 Shdr *shdr = elf_getshdr(scn); local 216 if (shdr->sh_type == SHT_SYMTAB) { 218 nsyms = shdr->sh_size / shdr->sh_entsize; 219 strindex = shdr->sh_link;
|
/freebsd-10.3-release/lib/libdwarf/ |
H A D | dwarf_init.c | 291 GElf_Shdr shdr; local 297 if (gelf_getshdr(scn, &shdr) == NULL) { 302 if (shdr.sh_type != SHT_RELA || shdr.sh_size == 0) 306 if (dbg->dbg_s[i].s_shnum == shdr.sh_info && 307 dbg->dbg_s[DWARF_symtab].s_shnum == shdr.sh_link) { 594 GElf_Shdr shdr; local 630 if (gelf_getshdr(scn, &shdr) == NULL) { 636 if ((sname = elf_strptr(dbg->dbg_elf, dbg->dbg_stnum, shdr.sh_name)) == NULL) { 650 memcpy(&dbg->dbg_s[i].s_shdr, &shdr, sizeo [all...] |
/freebsd-10.3-release/sys/dev/ipw/ |
H A D | if_ipw.c | 525 struct ipw_soft_hdr *shdr; local 654 shdr = &sc->shdr_list[i]; 655 error = bus_dmamap_create(sc->hdr_dmat, 0, &shdr->map); 661 SLIST_INSERT_HEAD(&sc->free_shdr, shdr, next); 1336 struct ipw_soft_hdr *shdr; local 1347 shdr = sbd->priv; 1348 bus_dmamap_sync(sc->hdr_dmat, shdr->map, BUS_DMASYNC_POSTWRITE); 1349 bus_dmamap_unload(sc->hdr_dmat, shdr->map); 1350 SLIST_INSERT_HEAD(&sc->free_shdr, shdr, next); 1597 struct ipw_soft_hdr *shdr; local [all...] |
/freebsd-10.3-release/sys/xen/interface/ |
H A D | libelf.h | 156 const char *elf_section_name(struct elf_binary *elf, const elf_shdr * shdr); 157 const void *elf_section_start(struct elf_binary *elf, const elf_shdr * shdr); 158 const void *elf_section_end(struct elf_binary *elf, const elf_shdr * shdr);
|
/freebsd-10.3-release/sys/cddl/compat/opensolaris/sys/ |
H A D | elf.h | 105 #define Elf_shdr __ElfN(shdr)
|
/freebsd-10.3-release/usr.bin/ar/ |
H A D | write.c | 720 GElf_Shdr shdr; local 747 if (gelf_getshdr(scn, &shdr) != &shdr) { 752 if ((name = elf_strptr(e, shstrndx, shdr.sh_name)) == NULL) { 774 if (gelf_getshdr(scn, &shdr) != &shdr) { 779 if (shdr.sh_type != SHT_SYMTAB) 784 while (n < shdr.sh_size && 786 len = data->d_size / shdr.sh_entsize;
|
/freebsd-10.3-release/cddl/contrib/opensolaris/tools/ctf/dump/ |
H A D | dump.c | 790 GElf_Shdr shdr; local 795 if (gelf_getshdr(scn, &shdr) != NULL && (name = 796 elf_strptr(elf, ehdr->e_shstrndx, shdr.sh_name)) != NULL && 900 GElf_Shdr shdr; local 903 if (gelf_getshdr(symscn, &shdr) != NULL) { 904 symstrscn = elf_getscn(elf, shdr.sh_link); 906 cd.cd_nsyms = shdr.sh_size / shdr.sh_entsize;
|