Lines Matching refs:__elfN

87 static int __elfN(check_header)(const Elf_Ehdr *hdr);
88 static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp,
90 static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
92 static int __elfN(load_section)(const struct image_params *imgp,
95 static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp);
96 static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note,
99 static bool __elfN(check_note)(struct image_params *imgp,
102 static vm_prot_t __elfN(trans_prot)(Elf_Word);
103 static Elf_Word __elfN(untrans_prot)(vm_prot_t);
104 static size_t __elfN(prepare_register_notes)(struct thread *td,
111 int __elfN(fallback_brand) = -1;
113 fallback_brand, CTLFLAG_RWTUN, &__elfN(fallback_brand), 0,
117 SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,
121 int __elfN(nxstack) =
130 nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
134 static int __elfN(vdso) = 1;
136 vdso, CTLFLAG_RWTUN, &__elfN(vdso), 0,
139 static int __elfN(vdso) = 0;
148 static u_long __elfN(pie_base) = ET_DYN_LOAD_ADDR;
155 val = __elfN(pie_base); in sysctl_pie_base()
161 __elfN(pie_base) = val; in sysctl_pie_base()
179 static int __elfN(aslr_enabled) = __ELF_WORD_SIZE == 64;
181 &__elfN(aslr_enabled), 0,
188 static int __elfN(pie_aslr_enabled) = __ELF_WORD_SIZE == 64;
190 &__elfN(pie_aslr_enabled), 0,
199 static int __elfN(aslr_honor_sbrk) = 0;
201 &__elfN(aslr_honor_sbrk), 0,
204 static int __elfN(aslr_stack) = __ELF_WORD_SIZE == 64;
206 &__elfN(aslr_stack), 0,
210 static int __elfN(aslr_shared_page) = __ELF_WORD_SIZE == 64;
212 &__elfN(aslr_shared_page), 0,
216 static int __elfN(sigfastblock) = 1;
218 CTLFLAG_RWTUN, &__elfN(sigfastblock), 0,
221 static bool __elfN(allow_wx) = true;
223 CTLFLAG_RWTUN, &__elfN(allow_wx), 0,
230 Elf_Brandnote __elfN(freebsd_brandnote) = {
236 .trans_osrel = __elfN(freebsd_trans_osrel)
240 __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel) in __elfN() function
253 Elf_Brandnote __elfN(kfreebsd_brandnote) = {
285 __elfN(insert_brand_entry)(Elf_Brandinfo *entry) in __elfN() function
304 __elfN(remove_brand_entry)(Elf_Brandinfo *entry) in __elfN() function
320 __elfN(brand_inuse)(Elf_Brandinfo *entry) in __elfN() function
338 __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, in __elfN() function
368 ret = __elfN(check_note)(imgp, bi->brand_note, osrel, in __elfN()
473 __elfN(fallback_brand) == bi->brand && in __elfN()
482 __elfN(phdr_in_zero_page)(const Elf_Ehdr *hdr) in __elfN() function
489 __elfN(check_header)(const Elf_Ehdr *hdr) in __elfN() function
518 __elfN(map_partial)(vm_map_t map, vm_object_t object, vm_ooffset_t offset, in __elfN() function
550 __elfN(map_insert)(const struct image_params *imgp, vm_map_t map, in __elfN() function
560 rv = __elfN(map_partial)(map, object, offset, start, in __elfN()
568 rv = __elfN(map_partial)(map, object, offset + in __elfN()
622 __elfN(load_section)(const struct image_params *imgp, vm_ooffset_t offset, in __elfN() function
672 rv = __elfN(map_insert)(imgp, map, object, file_addr, in __elfN()
695 rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr, in __elfN()
726 __elfN(load_sections)(const struct image_params *imgp, const Elf_Ehdr *hdr, in __elfN() function
744 prot = __elfN(trans_prot)(phdr[i].p_flags); in __elfN()
745 error = __elfN(load_section)(imgp, phdr[i].p_offset, in __elfN()
779 __elfN(load_file)(struct proc *p, const char *file, u_long *addr, in __elfN() function
839 if ((error = __elfN(check_header)(hdr)) != 0) in __elfN()
851 if (!__elfN(phdr_in_zero_page)(hdr)) { in __elfN()
862 error = __elfN(load_sections)(imgp, hdr, phdr, rbase, &base_addr); in __elfN()
897 __CONCAT(rnd_, __elfN(base))(vm_map_t map, u_long minv, u_long maxv, in __CONCAT()
927 __elfN(enforce_limits)(struct image_params *imgp, const Elf_Ehdr *hdr, in __elfN() function
1004 __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr, in __elfN() function
1070 __elfN(load_interp)(struct image_params *imgp, const Elf_Brandinfo *brand_info, in __elfN() function
1078 error = __elfN(load_file)(imgp->proc, in __elfN()
1084 error = __elfN(load_file)(imgp->proc, interp, addr, entry); in __elfN()
1099 __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) in __CONCAT()
1125 if (__elfN(check_header)(hdr) != 0 || in __CONCAT()
1134 if (!__elfN(phdr_in_zero_page)(hdr)) { in __CONCAT()
1209 error = __elfN(get_interp)(imgp, &phdr[i], &interp, in __CONCAT()
1215 if (__elfN(nxstack)) { in __CONCAT()
1217 __elfN(trans_prot)(phdr[i].p_flags); in __CONCAT()
1233 brand_info = __elfN(get_brandinfo)(imgp, interp, &osrel, &fctl0); in __CONCAT()
1254 imgp->et_dyn_addr = __elfN(pie_base); in __CONCAT()
1255 else if ((__elfN(pie_aslr_enabled) && in __CONCAT()
1260 imgp->et_dyn_addr = __elfN(pie_base); in __CONCAT()
1296 (__elfN(aslr_enabled) && hdr->e_type == ET_EXEC) || in __CONCAT()
1305 if (!__elfN(aslr_honor_sbrk) || in __CONCAT()
1308 if (__elfN(aslr_stack)) in __CONCAT()
1310 if (__elfN(aslr_shared_page)) in __CONCAT()
1314 if ((!__elfN(allow_wx) && (fctl0 & NT_FREEBSD_FCTL_WXNEEDED) == 0 && in __CONCAT()
1337 error = __CONCAT(rnd_, __elfN(base))(map, in __CONCAT()
1347 error = __elfN(load_sections)(imgp, hdr, phdr, imgp->et_dyn_addr, NULL); in __CONCAT()
1351 error = __elfN(enforce_limits)(imgp, hdr, phdr); in __CONCAT()
1365 error = __CONCAT(rnd_, __elfN(base))(map, addr, maxv1, in __CONCAT()
1390 error = __CONCAT(rnd_, __elfN(base))(map, addr, in __CONCAT()
1394 error = __elfN(load_interp)(imgp, brand_info, interp, in __CONCAT()
1443 __elfN(freebsd_copyout_auxargs)(struct image_params *imgp, uintptr_t base) in __elfN() function
1496 bsdflags |= __elfN(sigfastblock) ? ELF_BSDF_SIGFASTBLK : 0; in __elfN()
1512 if ((imgp->sysent->sv_flags & SV_DSO_SIG) != 0 && __elfN(vdso) != 0) { in __elfN()
1531 __elfN(freebsd_fixup)(uintptr_t *stack_base, struct image_params *imgp) in __elfN() function
1570 static int __elfN(corehdr)(struct coredump_params *, int, void *, size_t,
1572 static void __elfN(putnote)(struct thread *td, struct note_info *, struct sbuf *);
1574 static void __elfN(note_prpsinfo)(void *, struct sbuf *, size_t *);
1575 static void __elfN(note_threadmd)(void *, struct sbuf *, size_t *);
1576 static void __elfN(note_procstat_auxv)(void *, struct sbuf *, size_t *);
1577 static void __elfN(note_procstat_proc)(void *, struct sbuf *, size_t *);
1578 static void __elfN(note_procstat_psstrings)(void *, struct sbuf *, size_t *);
1579 static void __elfN(note_procstat_kqueues)(void *, struct sbuf *, size_t *);
1596 __elfN(coredump)(struct thread *td, struct coredump_writer *cdw, off_t limit, int flags) in __elfN() function
1612 __elfN(size_segments)(td, &seginfo, flags); in __elfN()
1673 error = __elfN(corehdr)(&params, seginfo.count, hdr, hdrsize, &notelst, in __elfN()
1733 phdr->p_flags = __elfN(untrans_prot)(entry->protection); in cb_put_phdr()
1753 __elfN(size_segments)(struct thread *td, struct sseg_closure *seginfo, in __elfN() function
1834 __elfN(corehdr)(struct coredump_params *p, int numsegs, void *hdr, in __elfN() function
1844 __elfN(puthdr)(p->td, hdr, hdrsize, numsegs, notesz, flags); in __elfN()
1851 __elfN(putnote)(p->td, ninfo, sb); in __elfN()
1861 __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, in __elfN() function
1871 size += __elfN(register_note)(td, list, NT_PRPSINFO, in __elfN()
1872 __elfN(note_prpsinfo), p); in __elfN()
1882 size += __elfN(prepare_register_notes)(td, list, thr); in __elfN()
1883 size += __elfN(register_note)(td, list, -1, in __elfN()
1884 __elfN(note_threadmd), thr); in __elfN()
1892 size += __elfN(register_note)(td, list, NT_PROCSTAT_PROC, in __elfN()
1893 __elfN(note_procstat_proc), p); in __elfN()
1894 size += __elfN(register_note)(td, list, NT_PROCSTAT_FILES, in __elfN()
1896 size += __elfN(register_note)(td, list, NT_PROCSTAT_VMMAP, in __elfN()
1898 size += __elfN(register_note)(td, list, NT_PROCSTAT_GROUPS, in __elfN()
1900 size += __elfN(register_note)(td, list, NT_PROCSTAT_UMASK, in __elfN()
1902 size += __elfN(register_note)(td, list, NT_PROCSTAT_RLIMIT, in __elfN()
1904 size += __elfN(register_note)(td, list, NT_PROCSTAT_OSREL, in __elfN()
1906 size += __elfN(register_note)(td, list, NT_PROCSTAT_PSSTRINGS, in __elfN()
1907 __elfN(note_procstat_psstrings), p); in __elfN()
1908 size += __elfN(register_note)(td, list, NT_PROCSTAT_AUXV, in __elfN()
1909 __elfN(note_procstat_auxv), p); in __elfN()
1910 size += __elfN(register_note)(td, list, NT_PROCSTAT_KQUEUES, in __elfN()
1911 __elfN(note_procstat_kqueues), p); in __elfN()
1917 __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, in __elfN() function
2003 __elfN(register_regset_note)(struct thread *td, struct note_info_list *list, in __elfN() function
2031 __elfN(register_note)(struct thread *td, struct note_info_list *list, in __elfN() function
2073 __elfN(populate_note)(int type, void *src, void *dst, size_t size, void **descp) in __elfN() function
2102 __elfN(putnote)(struct thread *td, struct note_info *ninfo, struct sbuf *sb) in __elfN() function
2199 __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2263 __elfN(get_prstatus)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2291 __elfN(set_prstatus)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2306 static struct regset __elfN(regset_prstatus) = {
2309 .get = __elfN(get_prstatus),
2310 .set = __elfN(set_prstatus),
2312 ELF_REGSET(__elfN(regset_prstatus));
2315 __elfN(get_fpregset)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2335 __elfN(set_fpregset)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2350 static struct regset __elfN(regset_fpregset) = {
2353 .get = __elfN(get_fpregset),
2354 .set = __elfN(set_fpregset),
2356 ELF_REGSET(__elfN(regset_fpregset));
2359 __elfN(get_thrmisc)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2375 static struct regset __elfN(regset_thrmisc) = {
2378 .get = __elfN(get_thrmisc),
2380 ELF_REGSET(__elfN(regset_thrmisc));
2383 __elfN(get_lwpinfo)(struct regset *rs, struct thread *td, void *buf, in __elfN() function
2417 static struct regset __elfN(regset_lwpinfo) = {
2420 .get = __elfN(get_lwpinfo),
2422 ELF_REGSET(__elfN(regset_lwpinfo));
2425 __elfN(prepare_register_notes)(struct thread *td, struct note_info_list *list, in __elfN() function
2438 size += __elfN(register_regset_note)(td, list, &__elfN(regset_prstatus), in __elfN()
2444 size += __elfN(register_regset_note)(td, list, in __elfN()
2445 &__elfN(regset_fpregset), target_td); in __elfN()
2454 size += __elfN(register_regset_note)(td, list, regset, in __elfN()
2465 __elfN(note_threadmd)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2478 __elfN(dump_thread)(td, buf, &size); in __elfN()
2491 __elfN(note_procstat_proc)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2680 __elfN(note_procstat_psstrings)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2704 __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2733 __elfN(note_procstat_kqueues)(void *arg, struct sbuf *sb, size_t *sizep) in __elfN() function
2782 __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, in __elfN() function
2915 __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, in __elfN() function
2932 if (phdr[i].p_type == PT_NOTE && __elfN(parse_notes)(imgp, in __elfN()
2937 __elfN(parse_notes)(imgp, &fctl_note, in __elfN()
2952 static struct execsw __elfN(execsw) = {
2953 .ex_imgact = __CONCAT(exec_, __elfN(imgact)),
2956 EXEC_SET(__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw));
2959 __elfN(trans_prot)(Elf_Word flags) in __elfN() function
2978 __elfN(untrans_prot)(vm_prot_t prot) in __elfN() function