/titanic_44/usr/src/cmd/nscd/ |
H A D | nscd_frontend.c | 381 nss_pheader_t *phdr = (nss_pheader_t *)buf; in N2N_check_priv() local 393 NSCD_SET_STATUS(phdr, NSS_ERROR, errnum); in N2N_check_priv() 410 NSCD_SET_STATUS(phdr, NSS_ERROR, EACCES); in N2N_check_priv() 421 NSCD_SET_STATUS_SUCCESS(phdr); in N2N_check_priv() 432 nss_pheader_t *phdr = (nss_pheader_t *)buf; in _nscd_APP_check_cred() local 445 NSCD_SET_STATUS(phdr, NSS_ERROR, errnum); in _nscd_APP_check_cred() 449 NSCD_SET_STATUS_SUCCESS(phdr); in _nscd_APP_check_cred() 457 NSCD_SET_STATUS(phdr, NSS_ERROR, EACCES); in _nscd_APP_check_cred() 461 NSCD_SET_STATUS(phdr, NSS_ERROR, EACCES); in _nscd_APP_check_cred() 466 if (NSCD_STATUS_IS_NOT_OK(phdr)) { in _nscd_APP_check_cred() [all …]
|
H A D | nscd_door.c | 42 nss_pheader_t *phdr = (nss_pheader_t *)buf; in initdoor() local 53 NSCD_SET_STATUS(phdr, NSS_ERROR, errno); in initdoor() 69 NSCD_SET_STATUS(phdr, NSS_ERROR, ECONNREFUSED); in initdoor() 73 NSCD_SET_STATUS_SUCCESS(phdr); in initdoor() 80 nss_pheader_t *phdr, nss_pheader_t *outphdr) in copy_output() argument 86 if (outdata != NULL && phdr->data_off > 0 && phdr->data_len > 0) { in copy_output() 87 if (phdr->data_len <= outdlen) { in copy_output() 88 dp = (char *)phdr + phdr->data_off; in copy_output() 89 (void) memmove(outdata, dp, phdr->data_len); in copy_output() 95 phdr->data_len, outdlen); in copy_output() [all …]
|
H A D | nscd_selfcred.c | 511 nss_pheader_t *phdr = (nss_pheader_t *)buf; in _nscd_proc_iamhere() local 523 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, errnum, in _nscd_proc_iamhere() 541 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() 556 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() 564 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() 575 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() 585 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() 602 NSCD_SET_STATUS_SUCCESS(phdr); in _nscd_proc_iamhere() 604 NSCD_SET_STATUS(phdr, NSS_ALTRETRY, 0); in _nscd_proc_iamhere() 620 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, in _nscd_proc_iamhere() [all …]
|
H A D | nscd_admin.c | 48 nss_pheader_t *phdr = (nss_pheader_t *)outbuf; in _nscd_door_getadmin() local 55 if (phdr->pbufsiz < data_size) in _nscd_door_getadmin() 58 NSCD_SET_STATUS_SUCCESS(phdr); in _nscd_door_getadmin() 59 phdr->data_off = sizeof (nss_pheader_t); in _nscd_door_getadmin() 60 phdr->data_len = sizeof (admin_c); in _nscd_door_getadmin() 77 (void) memcpy(((char *)outbuf) + phdr->data_off, in _nscd_door_getadmin() 242 nss_pheader_t *phdr = (nss_pheader_t *)buf; in _nscd_door_setadmin() local 250 NSCD_SET_N2N_STATUS(phdr, NSS_NSCD_PRIV, 0, rc); in _nscd_door_setadmin() 252 NSCD_SET_STATUS_SUCCESS(phdr); in _nscd_door_setadmin() 387 nss_pheader_t phdr; in _nscd_client_getadmin() local [all …]
|
/titanic_44/usr/src/psm/stand/boot/common/ |
H A D | readfile.c | 328 Elf32_Phdr *phdr; /* program header */ in read_elf32() local 386 phdr = (Elf32_Phdr *)(allphdrs + elfhdrp->e_phentsize * i); in read_elf32() 387 if (phdr->p_type != PT_NOTE) in read_elf32() 391 phdr->p_filesz); in read_elf32() 393 if ((note_buf = kmem_alloc(phdr->p_filesz, 0)) == NULL) in read_elf32() 396 dprintf("seeking to 0x%x\n", phdr->p_offset); in read_elf32() 397 if (lseek(fd, phdr->p_offset, 0) == -1) in read_elf32() 401 phdr->p_filesz, (void *)nhdr); in read_elf32() 404 if (xread(fd, (caddr_t)nhdr, phdr->p_filesz) != phdr->p_filesz) in read_elf32() 432 } while (offset < phdr->p_filesz); in read_elf32() [all …]
|
/titanic_44/usr/src/uts/i86pc/dboot/ |
H A D | dboot_elfload.c | 76 Elf64_Phdr *phdr; in dboot_elfload64() local 119 phdr = (Elf64_Phdr *)(allphdrs + eh->e_phentsize * i); in dboot_elfload64() 125 if (phdr->p_type == PT_INTERP) { in dboot_elfload64() 133 if (phdr->p_type != PT_LOAD) in dboot_elfload64() 136 if (phdr->p_flags == (PF_R | PF_W) && phdr->p_vaddr == 0) { in dboot_elfload64() 144 if (phdr->p_memsz == 0) in dboot_elfload64() 150 if (phdr->p_paddr == phdr->p_vaddr) { in dboot_elfload64() 153 "paddr = 0x%lx\n", (ulong_t)phdr->p_paddr); in dboot_elfload64() 160 if (phdr->p_paddr != FOUR_MEG && phdr->p_paddr != 2 * FOUR_MEG) in dboot_elfload64() 162 src = (uintptr_t)PGETBYTES(phdr->p_offset); in dboot_elfload64() [all …]
|
/titanic_44/usr/src/cmd/sgs/elfedit/modules/common/ |
H A D | phdr.c | 73 Phdr *phdr; /* PT_INTERP header */ member 230 Phdr *phdr; in process_args() local 234 phdr = obj_state->os_phdr; in process_args() 235 for (i = 0; i < obj_state->os_phnum; i++, phdr++) { in process_args() 236 if (phdr->p_type == argstate->ndx) { in process_args() 242 mach, phdr->p_type, 0, &inv_buf)); in process_args() 276 Phdr *phdr; /* Program header array */ in locate_interp() local 284 phdr = obj_state->os_phdr; in locate_interp() 287 if (phdr[phndx].p_type == PT_INTERP) { in locate_interp() 289 interp->phdr = phdr + phndx; in locate_interp() [all …]
|
H A D | phdr.msg | 30 # Message file for elfedit 'phdr' module 39 @ MSG_DEBUG_PHDR "phdr[%d]: Program header: %s\n" 41 @ MSG_DEBUG_SETPHINTERP "phdr[%d]: update PT_INTERP program header: \ 47 @ MSG_DEBUG_S_OK "phdr[%d].%s: value unchanged: %s\n" 48 @ MSG_DEBUG_S_CHG "phdr[%d].%s: change from %s to %s\n" 49 @ MSG_DEBUG_LLX_OK "phdr[%d].%s: value unchanged: %#llx\n" 50 @ MSG_DEBUG_LLX_CHG "phdr[%d].%s: change from %#llx to %#llx\n" 158 The phdr:dump command is used to display program headers\n\ 161 If phdr:dump is called without an argument, information for\n\ 167 The phdr:p_type command is used to display or alter the\n\ [all …]
|
/titanic_44/usr/src/cmd/sgs/liblddbg/common/ |
H A D | phdr.c | 33 Elf_phdr(Lm_list *lml, uchar_t osabi, Half mach, Phdr *phdr) in Elf_phdr() argument 38 dbg_print(lml, MSG_ORIG(MSG_PHD_VADDR), EC_ADDR(phdr->p_vaddr), in Elf_phdr() 39 conv_phdr_flags(osabi, phdr->p_flags, 0, &phdr_flags_buf)); in Elf_phdr() 40 dbg_print(lml, MSG_ORIG(MSG_PHD_PADDR), EC_ADDR(phdr->p_paddr), in Elf_phdr() 41 conv_phdr_type(osabi, mach, phdr->p_type, 0, &inv_buf)); in Elf_phdr() 42 dbg_print(lml, MSG_ORIG(MSG_PHD_FILESZ), EC_XWORD(phdr->p_filesz), in Elf_phdr() 43 EC_XWORD(phdr->p_memsz)); in Elf_phdr() 44 dbg_print(lml, MSG_ORIG(MSG_PHD_OFFSET), EC_OFF(phdr->p_offset), in Elf_phdr() 45 EC_XWORD(phdr->p_align)); in Elf_phdr()
|
/titanic_44/usr/src/tools/mbh_patch/ |
H A D | mbh_patch.c | 107 Elf64_Phdr *phdr; in patch64() local 182 phdr = (Elf64_Phdr *)(phdrs + eh->e_phentsize * ndx); in patch64() 187 if (phdr->p_type != PT_LOAD) in patch64() 190 if (phdr->p_memsz == 0) in patch64() 193 if (phdr->p_paddr != phdr->p_vaddr) in patch64() 201 if ((mem < phdr->p_offset) || in patch64() 202 (mem >= (phdr->p_offset + phdr->p_filesz))) { in patch64() 207 if (eh->e_entry != phdr->p_paddr) { in patch64() 213 if (mbh2 != NULL && ((mem2 < phdr->p_offset) || in patch64() 214 (mem2 >= (phdr->p_offset + phdr->p_filesz)))) { in patch64() [all …]
|
/titanic_44/usr/src/tools/elfextract/ |
H A D | elfextract.c | 54 Elf32_Phdr *phdr; in extract32() local 88 phdr = (Elf32_Phdr *)(allphdrs + eh->e_phentsize * i); in extract32() 90 if (phdr->p_type != PT_LOAD) in extract32() 93 if (phdr->p_memsz == 0) in extract32() 96 bytes = ELFSEEK(phdr->p_offset); in extract32() 97 for (c = 0; c < phdr->p_filesz; ++c) { in extract32() 104 for (; c < phdr->p_memsz; ++c) { in extract32() 124 Elf64_Phdr *phdr; in extract64() local 158 phdr = (Elf64_Phdr *)(allphdrs + eh->e_phentsize * i); in extract64() 160 if (phdr->p_type != PT_LOAD) in extract64() [all …]
|
/titanic_44/usr/src/lib/libsip/common/ |
H A D | sip_parse_generic.c | 359 sip_parse_hdr_empty(_sip_header_t *hdr, sip_parsed_header_t **phdr) in sip_parse_hdr_empty() argument 363 if (hdr == NULL || phdr == NULL) in sip_parse_hdr_empty() 370 *phdr = hdr->sip_hdr_parsed; in sip_parse_hdr_empty() 374 *phdr = NULL; in sip_parse_hdr_empty() 383 *phdr = parsed_header; in sip_parse_hdr_empty() 496 sip_parse_hdr_parser1(_sip_header_t *hdr, sip_parsed_header_t **phdr, char sep) in sip_parse_hdr_parser1() argument 503 if ((ret = sip_prim_parsers(hdr, phdr)) != 0) in sip_parse_hdr_parser1() 509 if (*phdr != NULL) { in sip_parse_hdr_parser1() 510 hdr->sip_hdr_parsed = *phdr; in sip_parse_hdr_parser1() 654 *phdr = parsed_header; in sip_parse_hdr_parser1() [all …]
|
/titanic_44/usr/src/lib/libproc/common/ |
H A D | Pgcore.c | 835 Elf64_Phdr phdr; in dump_map() local 837 Elf32_Phdr phdr; in dump_map() local 841 bzero(&phdr, sizeof (phdr)); in dump_map() 842 phdr.p_type = PT_LOAD; in dump_map() 843 phdr.p_vaddr = pmp->pr_vaddr; in dump_map() 844 phdr.p_memsz = pmp->pr_size; in dump_map() 846 phdr.p_flags |= PF_R; in dump_map() 848 phdr.p_flags |= PF_W; in dump_map() 850 phdr.p_flags |= PF_X; in dump_map() 889 } else if (phdr.p_flags == (PF_R | PF_X)) { in dump_map() [all …]
|
H A D | Psymtab.c | 105 Elf32_Phdr phdr; in get_saddrs() local 114 if (Pread(P, &phdr, sizeof (phdr), a) != in get_saddrs() 115 sizeof (phdr)) { in get_saddrs() 119 if (phdr.p_type != PT_LOAD || phdr.p_memsz == 0) in get_saddrs() 122 addr = phdr.p_vaddr; in get_saddrs() 128 addrs[naddrs++] = last = addr + phdr.p_memsz - 1; in get_saddrs() 133 Elf64_Phdr phdr; in get_saddrs() local 142 if (Pread(P, &phdr, sizeof (phdr), a) != in get_saddrs() 143 sizeof (phdr)) { in get_saddrs() 147 if (phdr.p_type != PT_LOAD || phdr.p_memsz == 0) in get_saddrs() [all …]
|
H A D | Psymtab_machelf32.c | 211 Ehdr *ehdr, uint_t phnum, Phdr *phdr) in fake_elf64() argument 215 Ehdr *ehdr, uint_t phnum, Phdr *phdr) in fake_elf64() 261 phdr->p_vaddr += addr; in fake_elf64() 267 if ((dp = malloc(phdr->p_filesz)) == NULL) in fake_elf64() 269 if (Pread(P, dp, phdr->p_filesz, phdr->p_vaddr) != in fake_elf64() 270 phdr->p_filesz) in fake_elf64() 278 for (i = 0; i < phdr->p_filesz / sizeof (Dyn); i++) { in fake_elf64() 401 size += roundup(phdr->p_filesz, SH_ADDRALIGN); in fake_elf64() 591 sp->sh_addr = phdr->p_vaddr; in fake_elf64() 595 sp->sh_size = phdr->p_filesz; in fake_elf64()
|
/titanic_44/usr/src/cmd/sgs/gprof/common/ |
H A D | readelf.c | 143 GElf_Phdr phdr; in get_txtorigin() local 152 if (gelf_getphdr(elf, ndx, &phdr) == NULL) in get_txtorigin() 155 if ((phdr.p_type == PT_LOAD) && !(phdr.p_flags & PF_W)) { in get_txtorigin() 156 if (first_load_seg || phdr.p_vaddr < txt_origin) in get_txtorigin() 157 txt_origin = phdr.p_vaddr; in get_txtorigin() 243 GElf_Phdr phdr; in get_textseg() local 251 if (gelf_getphdr(elf, i, &phdr) == NULL) in get_textseg() 254 if (!(phdr.p_flags & PF_W) && (phdr.p_filesz > textsize)) { in get_textseg() 268 chk = (size_t)phdr.p_vaddr + (size_t)phdr.p_filesz; in get_textseg() 269 if (phdr.p_vaddr + phdr.p_filesz != (GElf_Xword)chk) in get_textseg() [all …]
|
/titanic_44/usr/src/cmd/sgs/librtld_db/i386/ |
H A D | plt32_resolution.c | 55 Phdr phdr; in rli_func() local 84 if (ps_pread(rap->rd_psp, off, (char *)&phdr, in rli_func() 91 if (phdr.p_type == PT_LOAD) { in rli_func() 92 if ((pltaddr >= (phdr.p_vaddr + baseaddr)) && in rli_func() 93 (pltaddr < (phdr.p_vaddr + baseaddr + in rli_func() 94 phdr.p_memsz))) { in rli_func() 97 } else if (phdr.p_type == PT_DYNAMIC) { in rli_func() 98 dynbase = phdr.p_vaddr + baseaddr; in rli_func()
|
/titanic_44/usr/src/cmd/sgs/elfdump/common/ |
H A D | fake_shdr.c | 83 Phdr *phdr; member 425 Phdr *phdr = fstate->phdr; in map_addr_to_offset() local 428 for (; phnum--; phdr++) { in map_addr_to_offset() 429 if (phdr->p_type != PT_LOAD) in map_addr_to_offset() 432 if ((addr >= phdr->p_vaddr) && in map_addr_to_offset() 433 (end_addr <= (phdr->p_vaddr + phdr->p_memsz))) { in map_addr_to_offset() 438 offset = addr - phdr->p_vaddr; in map_addr_to_offset() 439 avail_file = phdr->p_filesz - offset; in map_addr_to_offset() 457 *phdr_ret = phdr; in map_addr_to_offset() 460 return (phdr->p_offset + offset); in map_addr_to_offset() [all …]
|
/titanic_44/usr/src/cmd/sgs/libld/common/ |
H A D | update.c | 3647 Phdr *phdr = &(sgp->sg_phdr); in ld_update_outfile() local 3664 if (phdr->p_type == PT_PHDR) { in ld_update_outfile() 3666 phdr->p_offset = ehdr->e_phoff; in ld_update_outfile() 3667 phdr->p_filesz = phdr->p_memsz = phdrsz; in ld_update_outfile() 3670 ofl->ofl_phdr[phdrndx++] = *phdr; in ld_update_outfile() 3674 if (phdr->p_type == PT_INTERP) { in ld_update_outfile() 3689 if (phdr->p_type == PT_SUNWDTRACE) { in ld_update_outfile() 3705 if (phdr->p_type == PT_SUNWCAP) { in ld_update_outfile() 3721 if (phdr->p_type == PT_DYNAMIC) { in ld_update_outfile() 3725 phdr->p_vaddr = shdr->sh_addr; in ld_update_outfile() [all …]
|
/titanic_44/usr/src/cmd/smbsrv/smbd/ |
H A D | smbd_pipesvc.c | 260 smb_pipehdr_t phdr; in pipesvc_worker() local 290 rc = pipe_recv(np, &phdr, sizeof (phdr)); in pipesvc_worker() 295 if (phdr.ph_magic != SMB_PIPE_HDR_MAGIC || in pipesvc_worker() 296 phdr.ph_uilen > 8192) { in pipesvc_worker() 300 buf = malloc(phdr.ph_uilen); in pipesvc_worker() 305 rc = pipe_recv(np, buf, phdr.ph_uilen); in pipesvc_worker() 311 xdrmem_create(&xdrs, buf, phdr.ph_uilen, XDR_DECODE); in pipesvc_worker()
|
/titanic_44/usr/src/uts/common/fs/smbsrv/ |
H A D | smb_opipe.c | 142 smb_pipehdr_t phdr; in smb_opipe_send_userinfo() local 155 phdr.ph_magic = SMB_PIPE_HDR_MAGIC; in smb_opipe_send_userinfo() 156 phdr.ph_uilen = xdr_sizeof(smb_netuserinfo_xdr, &nui); in smb_opipe_send_userinfo() 158 buflen = sizeof (phdr) + phdr.ph_uilen; in smb_opipe_send_userinfo() 161 bcopy(&phdr, buf, sizeof (phdr)); in smb_opipe_send_userinfo() 162 xdrmem_create(&xdrs, buf + sizeof (phdr), in smb_opipe_send_userinfo() 163 buflen - (sizeof (phdr)), XDR_ENCODE); in smb_opipe_send_userinfo()
|
/titanic_44/usr/src/uts/i86pc/os/ |
H A D | fastboot.c | 370 Elf64_Phdr *phdr; in fastboot_elf64_find_dboot_load_offset() local 380 phdr = (Elf64_Phdr *)(phdrbase + ehdr->e_phentsize * i); in fastboot_elf64_find_dboot_load_offset() 382 if (phdr->p_type == PT_LOAD) { in fastboot_elf64_find_dboot_load_offset() 383 if (phdr->p_vaddr == phdr->p_paddr && in fastboot_elf64_find_dboot_load_offset() 384 phdr->p_vaddr == DBOOT_ENTRY_ADDRESS) { in fastboot_elf64_find_dboot_load_offset() 385 ASSERT(phdr->p_offset <= UINT32_MAX); in fastboot_elf64_find_dboot_load_offset() 386 *offp = (uint32_t)phdr->p_offset; in fastboot_elf64_find_dboot_load_offset() 407 Elf32_Phdr *phdr; in fastboot_elf32_find_loadables() local 419 phdr = (Elf32_Phdr *)(phdrbase + ehdr->e_phentsize * i); in fastboot_elf32_find_loadables() 421 if (phdr->p_type == PT_INTERP) in fastboot_elf32_find_loadables() [all …]
|
/titanic_44/usr/src/lib/libbc/csu/common/ |
H A D | mon.c | 95 + sizeof(struct phdr) + cntsiz * sizeof(struct cnt); in monstartup() 116 struct phdr *php; in monitor() 154 countbase = (struct cnt *)(buf + sizeof(struct phdr)); in monitor() 156 o = sizeof(struct phdr) + cntsiz * sizeof(struct cnt); in monitor() 177 php = (struct phdr *)&buf[0]; in monitor()
|
/titanic_44/usr/src/uts/common/exec/elf/ |
H A D | elf.c | 1216 Phdr *phdr; in mapelfexec() local 1243 phdr = (Phdr *)phdrbase; in mapelfexec() 1245 if (phdr->p_type == PT_LOAD) { in mapelfexec() 1246 *voffset -= (uintptr_t)phdr->p_vaddr; in mapelfexec() 1249 phdr = (Phdr *)((caddr_t)phdr + hsize); in mapelfexec() 1255 phdr = (Phdr *)phdrbase; in mapelfexec() 1257 switch (phdr->p_type) { in mapelfexec() 1264 if (phdr->p_flags & PF_R) in mapelfexec() 1266 if (phdr->p_flags & PF_W) in mapelfexec() 1268 if (phdr->p_flags & PF_X) in mapelfexec() [all …]
|
/titanic_44/usr/src/cmd/sgs/librtld_db/common/ |
H A D | rd_elf.c | 416 Phdr phdr; in _rd_get_dyns32() local 426 if (ps_pread(php, a, &phdr, sizeof (phdr)) != PS_OK) { in _rd_get_dyns32() 430 if (phdr.p_type == PT_DYNAMIC) in _rd_get_dyns32() 436 if ((dynp = malloc(phdr.p_filesz)) == NULL) in _rd_get_dyns32() 439 phdr.p_vaddr += addr; in _rd_get_dyns32() 440 if (ps_pread(php, phdr.p_vaddr, dynp, phdr.p_filesz) != PS_OK) { in _rd_get_dyns32() 443 EC_ADDR(phdr.p_vaddr))); in _rd_get_dyns32() 449 *dynpp_sz = phdr.p_filesz; in _rd_get_dyns32() 561 Phdr phdr; in iter_map() local 641 if (ps_pread(rap->rd_psp, off, (char *)&phdr, in iter_map() [all …]
|