Searched refs:shdr (Results 1 - 25 of 42) sorted by relevance

12

/freebsd-11-stable/sys/mips/mips/
H A Delf_trampoline.c109 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-11-stable/stand/common/
H A Dload_elf_obj.c192 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 if ((shdr[i].sh_flags & SHF_ALLOC) == 0)
229 lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
230 shdr[
434 Elf_Shdr *shdr; local
472 Elf_Shdr *shdr; local
[all...]
H A Dload_elf.c175 static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) argument
189 CONVERT_SWITCH(ehdr, shdr, SECTION_HEADER_FIELDS);
428 Elf_Shdr *shdr; local
448 shdr = NULL;
600 shdr = alloc_pread(ef->fd, ehdr->e_shoff, chunk);
601 if (shdr == NULL) {
608 elf_section_header_convert(ehdr, &shdr[i]);
610 file_addmetadata(fp, MODINFOMD_SHDR, chunk, shdr);
617 chunk = shdr[ehdr->e_shstrndx].sh_size;
619 shstr = alloc_pread(ef->fd, shdr[ehd
906 Elf_Shdr *sh_meta, *shdr = NULL; local
[all...]
/freebsd-11-stable/contrib/elftoolchain/libelf/
H A Dlibelf_checksum.c53 GElf_Shdr shdr; local
81 if (gelf_getshdr(scn, &shdr) == NULL)
83 if ((shdr.sh_flags & SHF_ALLOC) == 0 ||
84 shdr.sh_type == SHT_DYNAMIC ||
85 shdr.sh_type == SHT_DYNSYM)
H A Delf_strptr.c45 GElf_Shdr shdr; local
54 gelf_getshdr(s, &shdr) == NULL)
57 if (shdr.sh_type != SHT_STRTAB ||
58 offset >= shdr.sh_size) {
/freebsd-11-stable/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Doutput.c340 GElf_Shdr shdr; local
354 gelf_getshdr(scn, &shdr);
355 nent = shdr.sh_size / shdr.sh_entsize;
357 scn = elf_getscn(elf, shdr.sh_link);
461 GElf_Shdr shdr; local
542 gelf_getshdr(sscn, &shdr);
559 pad = new_offset % shdr.sh_addralign;
562 new_offset += shdr.sh_addralign - pad;
563 shdr
[all...]
H A Dutil.c68 GElf_Shdr shdr; local
76 if (gelf_getshdr(scn, &shdr) == NULL) {
83 (size_t)shdr.sh_name)) == NULL) {
/freebsd-11-stable/sys/kern/
H A Dkern_ctf.c63 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 Dlink_elf_obj.c202 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) {
264 if (shdr[i].sh_addr == 0)
270 symstrindex = shdr[i].sh_link;
277 if (shdr[shdr[i].sh_info].sh_addr == 0)
282 if (shdr[shd
515 Elf_Shdr *shdr; local
[all...]
H A Dlink_elf.c796 Elf_Shdr *shdr; local
804 shdr = NULL;
1038 shdr = malloc(nbytes, M_LINKER, M_WAITOK | M_ZERO);
1040 (caddr_t)shdr, nbytes, hdr->e_shoff,
1048 if (shstrindex != 0 && shdr[shstrindex].sh_type == SHT_STRTAB &&
1049 shdr[shstrindex].sh_size != 0) {
1050 nbytes = shdr[shstrindex].sh_size;
1053 shdr[shstrindex].sh_offset, UIO_SYSSPACE, IO_NODELOCKED,
1062 if (shdr[i].sh_type == SHT_SYMTAB) {
1064 symstrindex = shdr[
[all...]
/freebsd-11-stable/sys/compat/linux/
H A Dlinux_vdso.c106 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 += sv->sv_shared_page_base;
201 if (shdr[
226 Elf_Shdr *shdr; local
[all...]
/freebsd-11-stable/usr.sbin/kldxref/
H A Def_obj.c357 Elf_Shdr *shdr; local
407 ef->e_shdr = shdr = vtmp;
414 switch (shdr[i].sh_type) {
422 symstrindex = shdr[i].sh_link;
444 shdr[symstrindex].sh_type != SHT_STRTAB) {
464 ef->ddbsymcnt = shdr[symtabindex].sh_size / sizeof(Elf_Sym);
465 if (ef_obj_read_entry(ef, shdr[symtabindex].sh_offset,
466 shdr[symtabindex].sh_size, (void**)&ef->ddbsymtab) != 0) {
471 ef->ddbstrcnt = shdr[symstrindex].sh_size;
472 if (ef_obj_read_entry(ef, shdr[symstrinde
[all...]
/freebsd-11-stable/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c93 Elf_Shdr *shdr; member in struct:shlayout
307 layoutp[shnum].shdr = &shdrshdr;
316 xewtoh(layoutp[m].shdr->sh_offset))
327 layoutp[r].shdr = &shdrp[i];
350 if (layoutp[i].shdr == &shdrshdr) {
355 if (layoutp[i].shdr == shstrtabshdr) {
361 if (layoutp[i].shdr == strtabshdr)
363 if (layoutp[i].shdr == symtabshdr || i >= strtabidx) {
364 off = xewtoh(layoutp[i].shdr->sh_offset);
365 if ((size = xewtoh(layoutp[i].shdr
[all...]
/freebsd-11-stable/sys/arm/arm/
H A Delf_trampoline.c500 Elf32_Shdr shdr[64] /* XXX */; local
525 memcpy(shdr, (void *)(kstart + eh->e_shoff),
526 sizeof(*shdr) * eh->e_shnum);
530 if (shdr[i].sh_type == SHT_SYMTAB) {
533 shdr[i].sh_offset >=
535 (shdr[i].sh_offset +
536 shdr[i].sh_size <=
539 shdr[i].sh_offset = 0;
540 shdr[i].sh_size = 0;
544 if (shdr[
[all...]
/freebsd-11-stable/lib/libc/gen/
H A Dnlist.c246 Elf_Shdr *shdr = NULL; local
272 shdr = (Elf_Shdr *)base;
281 if (shdr[i].sh_type == SHT_SYMTAB) {
282 symoff = shdr[i].sh_offset;
283 symsize = shdr[i].sh_size;
284 symstroff = shdr[shdr[i].sh_link].sh_offset;
285 symstrsize = shdr[shdr[i].sh_link].sh_size;
351 elf_sym_to_nlist(p, s, shdr,
374 elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum) argument
[all...]
/freebsd-11-stable/contrib/libexecinfo/
H A Dsymtab.c108 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-11-stable/sys/x86/xen/
H A Dpv.c314 Elf_Shdr *shdr; local
341 shdr = (Elf_Shdr *)((uint8_t *)ehdr + ehdr->e_shoff);
344 if (shdr[i].sh_type != SHT_SYMTAB)
346 if (shdr[i].sh_offset == 0)
348 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset);
349 ksymtab_size = shdr[i].sh_size;
350 j = shdr[i].sh_link;
351 if (shdr[j].sh_offset == 0)
353 kstrtab = (uintptr_t)((uint8_t *)ehdr + shdr[j].sh_offset);
/freebsd-11-stable/contrib/elftoolchain/size/
H A Dsize.c589 GElf_Shdr shdr; local
632 if (gelf_getshdr(scn, &shdr) != NULL)
633 berkeley_calc(&shdr);
639 if (gelf_getshdr(scn, &shdr) != NULL)
640 sysv_calc(elf, &elfhdr, &shdr);
682 sysv_calc(Elf *elf, GElf_Ehdr *elfhdr, GElf_Shdr *shdr) argument
687 (size_t) shdr->sh_name);
688 if ((shdr->sh_type == SHT_SYMTAB ||
689 shdr->sh_type == SHT_STRTAB || shdr
735 berkeley_calc(GElf_Shdr *shdr) argument
[all...]
/freebsd-11-stable/contrib/elftoolchain/strings/
H A Dstrings.c244 GElf_Shdr shdr; local
277 if (gelf_getshdr(scn, &shdr) == NULL)
279 if (shdr.sh_type != SHT_NOBITS &&
280 (shdr.sh_flags & SHF_ALLOC) != 0) {
281 rc = find_strings(name, pfile, shdr.sh_offset,
282 shdr.sh_size);
/freebsd-11-stable/lib/libproc/
H A Dproc_sym.c302 GElf_Shdr shdr; local
332 gelf_getshdr(scn, &shdr);
333 switch (shdr.sh_type) {
336 symtabstridx = shdr.sh_link;
340 dynsymstridx = shdr.sh_link;
450 GElf_Shdr shdr; local
479 gelf_getshdr(scn, &shdr);
480 switch (shdr.sh_type) {
483 symtabstridx = shdr.sh_link;
487 dynsymstridx = shdr
549 GElf_Shdr shdr; local
[all...]
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/lockstat/
H A Dsym.c197 Shdr *shdr = elf_getshdr(scn); local
198 if (shdr->sh_type == SHT_SYMTAB) {
200 nsyms = shdr->sh_size / shdr->sh_entsize;
201 strindex = shdr->sh_link;
/freebsd-11-stable/contrib/llvm-project/lld/ELF/
H A DOutputSections.cpp56 void OutputSection::writeHeaderTo(typename ELFT::Shdr *shdr) { argument
57 shdr->sh_entsize = entsize;
58 shdr->sh_addralign = alignment;
59 shdr->sh_type = type;
60 shdr->sh_offset = offset;
61 shdr->sh_flags = flags;
62 shdr->sh_info = info;
63 shdr->sh_link = link;
64 shdr->sh_addr = addr;
65 shdr
[all...]
/freebsd-11-stable/contrib/elftoolchain/elfcopy/
H A Darchive.c235 GElf_Shdr shdr; local
254 if (gelf_getshdr(scn, &shdr) != &shdr) {
258 if ((name = elf_strptr(ecp->eout, shstrndx, shdr.sh_name)) ==
278 if (gelf_getshdr(scn, &shdr) != &shdr) {
282 if (shdr.sh_type != SHT_SYMTAB)
287 while (n < shdr.sh_size &&
289 len = data->d_size / shdr.sh_entsize;
/freebsd-11-stable/sys/dev/ipw/
H A Dif_ipw.c488 struct ipw_soft_hdr *shdr; local
617 shdr = &sc->shdr_list[i];
618 error = bus_dmamap_create(sc->hdr_dmat, 0, &shdr->map);
624 SLIST_INSERT_HEAD(&sc->free_shdr, shdr, next);
1301 struct ipw_soft_hdr *shdr; local
1312 shdr = sbd->priv;
1313 bus_dmamap_sync(sc->hdr_dmat, shdr->map, BUS_DMASYNC_POSTWRITE);
1314 bus_dmamap_unload(sc->hdr_dmat, shdr->map);
1315 SLIST_INSERT_HEAD(&sc->free_shdr, shdr, next);
1549 struct ipw_soft_hdr *shdr; local
[all...]
/freebsd-11-stable/contrib/netbsd-tests/sbin/gpt/
H A Dt_gpt.sh34 shdr=34
217 zerodd seek="$((size - shdr))" count="$shdr"
229 zerodd seek=1 count="$shdr"

Completed in 209 milliseconds

12