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

12

/freebsd-9.3-release/sys/mips/mips/
H A Delf_trampoline.c108 Elf64_Shdr shdr[64] /* XXX */; local
112 Elf32_Shdr shdr[64] /* XXX */;
131 memcpy(shdr, (void *)(kstart + eh->e_shoff),
132 sizeof(*shdr) * eh->e_shnum);
136 if (shdr[i].sh_type == SHT_SYMTAB) {
140 if (shdr[i].sh_offset != 0 &&
141 shdr[i].sh_size != 0) {
143 symstrindex = shdr[i].sh_link;
176 tmp = shdr[symtabindex].sh_size +
177 shdr[symstrinde
[all...]
/freebsd-9.3-release/sys/boot/common/
H A Dload_elf_obj.c199 Elf_Shdr *shdr, *cshdr, *lshdr; local
210 shdr = alloc_pread(ef->fd, (off_t)hdr->e_shoff, shdrbytes);
211 if (shdr == NULL) {
216 ef->e_shdr = shdr;
224 shdr[i].sh_addr = 0;
226 if (shdr[i].sh_size == 0)
228 switch (shdr[i].sh_type) {
231 lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
232 shdr[i].sh_addr = (Elf_Addr)lastaddr;
233 lastaddr += shdr[
433 Elf_Shdr *shdr; local
471 Elf_Shdr *shdr; local
[all...]
H A Dload_elf.c242 Elf_Shdr *shdr; local
258 shdr = NULL;
382 shdr = alloc_pread(ef->fd, ehdr->e_shoff, chunk);
383 if (shdr == NULL) {
391 if (shdr[i].sh_type != SHT_SYMTAB)
396 if (shdr[i].sh_offset >= phdr[j].p_offset &&
397 (shdr[i].sh_offset + shdr[i].sh_size <=
399 shdr[i].sh_offset = 0;
400 shdr[
[all...]
/freebsd-9.3-release/lib/libelf/
H A Dlibelf_checksum.c54 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 Delf_strptr.c47 GElf_Shdr shdr; local
55 gelf_getshdr(s, &shdr) == NULL)
58 if (/*shdr.sh_type != SHT_STRTAB || */
59 offset >= shdr.sh_size) {
/freebsd-9.3-release/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Doutput.c342 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 Dutil.c68 GElf_Shdr shdr; local
76 if (gelf_getshdr(scn, &shdr) == NULL) {
83 (size_t)shdr.sh_name)) == NULL) {
/freebsd-9.3-release/sys/arm/arm/
H A Delf_trampoline.c405 Elf32_Shdr shdr[64] /* XXX */; local
429 memcpy(shdr, (void *)(kstart + eh->e_shoff),
430 sizeof(*shdr) * eh->e_shnum);
434 if (shdr[i].sh_type == SHT_SYMTAB) {
437 shdr[i].sh_offset >=
439 (shdr[i].sh_offset +
440 shdr[i].sh_size <=
443 shdr[i].sh_offset = 0;
444 shdr[i].sh_size = 0;
448 if (shdr[
[all...]
/freebsd-9.3-release/usr.sbin/kldxref/
H A Def_obj.c333 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-9.3-release/sys/kern/
H A Dkern_ctf.c63 Elf_Shdr *shdr = NULL; local
151 if ((shdr = malloc(nbytes, M_LINKER, M_WAITOK)) == NULL) {
157 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shdr, nbytes,
167 if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB) {
170 shdr[hdr->e_shstrndx].sh_type);
176 if ((shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER,
184 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset,
191 if (strcmp(".SUNW_ctf", shstrtab + shdr[i].sh_name) == 0)
204 shdr[
[all...]
H A Dlink_elf_obj.c200 Elf_Shdr *shdr; local
219 shdr = (Elf_Shdr *)preload_search_info(modptr, MODINFO_METADATA |
227 shdr == NULL)
249 ef->e_shdr = shdr;
255 switch (shdr[i].sh_type) {
262 symstrindex = shdr[i].sh_link;
276 shdr[symstrindex].sh_type != SHT_STRTAB || shstrindex == 0 ||
278 shdr[shstrindex].sh_type != SHT_STRTAB) {
304 if (shdr[i].sh_addr != 0 && (off == 0 || shdr[
437 Elf_Shdr *shdr; local
[all...]
/freebsd-9.3-release/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c87 Elf_Shdr *shdr; member in struct:shlayout
314 layoutp[shnum].shdr = &shdrshdr;
323 xewtoh(layoutp[m].shdr->sh_offset))
334 layoutp[r].shdr = &shdrp[i];
354 if (layoutp[i].shdr == &shdrshdr) {
359 if (layoutp[i].shdr == shstrtabshdr) {
365 if (layoutp[i].shdr == strtabshdr)
367 if (layoutp[i].shdr == symtabshdr || i >= strtabidx) {
368 off = xewtoh(layoutp[i].shdr->sh_offset);
369 size = xewtoh(layoutp[i].shdr
[all...]
/freebsd-9.3-release/lib/libc/gen/
H A Dnlist.c249 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-9.3-release/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddrti.c156 GElf_Shdr shdr; local
202 gelf_getshdr(scn, &shdr);
203 if (shdr.sh_type == SHT_SYMTAB) {
204 symtabidx = shdr.sh_link;
206 } else if (shdr.sh_type == SHT_DYNSYM) {
207 dynsymidx = shdr.sh_link;
209 } else if (shdr.sh_type == SHT_PROGBITS) {
210 s = elf_strptr(e, shstridx, shdr.sh_name);
H A Ddt_link.c75 (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)
492 Elf32_Shdr shdr[ESHDR_NUM]; member in struct:__anon60
549 shp = &elf_file.shdr[ESHDR_SHSTRTAB];
557 shp = &elf_file.shdr[ESHDR_DOF];
566 shp = &elf_file.shdr[ESHDR_STRTAB];
575 shp = &elf_file.shdr[ESHDR_SYMTAB];
597 shp = &elf_file.shdr[ESHDR_RE
640 Elf64_Shdr shdr[ESHDR_NUM]; member in struct:__anon61
1607 GElf_Shdr shdr; local
[all...]
/freebsd-9.3-release/lib/libproc/
H A Dproc_sym.c207 GElf_Shdr shdr; local
237 gelf_getshdr(scn, &shdr);
238 switch (shdr.sh_type) {
241 symtabstridx = shdr.sh_link;
245 dynsymstridx = shdr.sh_link;
386 GElf_Shdr shdr; local
417 gelf_getshdr(scn, &shdr);
418 switch (shdr.sh_type) {
421 symtabstridx = shdr.sh_link;
425 dynsymstridx = shdr
488 GElf_Shdr shdr; local
[all...]
/freebsd-9.3-release/cddl/contrib/opensolaris/cmd/lockstat/
H A Dsym.c215 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-9.3-release/cddl/contrib/opensolaris/cmd/sgs/messages/
H A Dsgs.ident58 MSG_ID_ELFEDIT_SHDR 27 SUNW_OST_SGS /* shdr: */
/freebsd-9.3-release/lib/libdwarf/
H A Ddwarf_init.c291 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-9.3-release/sys/dev/ipw/
H A Dif_ipw.c525 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-9.3-release/sys/xen/interface/
H A Dlibelf.h156 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-9.3-release/sys/cddl/compat/opensolaris/sys/
H A Delf.h105 #define Elf_shdr __ElfN(shdr)
/freebsd-9.3-release/usr.bin/ar/
H A Dwrite.c696 GElf_Shdr shdr; local
723 if (gelf_getshdr(scn, &shdr) != &shdr) {
728 if ((name = elf_strptr(e, shstrndx, shdr.sh_name)) == NULL) {
750 if (gelf_getshdr(scn, &shdr) != &shdr) {
755 if (shdr.sh_type != SHT_SYMTAB)
760 while (n < shdr.sh_size &&
762 len = data->d_size / shdr.sh_entsize;
/freebsd-9.3-release/usr.sbin/pkg/
H A Dconfig.c167 GElf_Shdr shdr; local
199 if (gelf_getshdr(scn, &shdr) != &shdr) {
205 if (shdr.sh_type == SHT_NOTE)
/freebsd-9.3-release/cddl/contrib/opensolaris/tools/ctf/dump/
H A Ddump.c790 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;

Completed in 152 milliseconds

12