Author: brooks Date: Wed Apr 15 20:19:59 2020 New Revision: 359986 URL: https://svnweb.freebsd.org/changeset/base/359986
Log: Introduce an AUXARGS_ENTRY_PTR() macro. As the name implys, it uses the a_ptr member of the auxarg entry (except in compat32 where it uses a_val). This is more correct and required for systems where a_val is not the same size or hardware type as a_ptr (e.g. CHERI). This is a prepratory commit for D24407. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Wed Apr 15 19:47:19 2020 (r359985) +++ head/sys/sys/imgact_elf.h Wed Apr 15 20:19:59 2020 (r359986) @@ -39,6 +39,13 @@ #define AUXARGS_ENTRY(pos, id, val) \ {(pos)->a_type = (id); (pos)->a_un.a_val = (val); (pos)++;} +#if (defined(__LP64__) && __ELF_WORD_SIZE == 32) +#define AUXARGS_ENTRY_PTR(pos, id, ptr) \ + {(pos)->a_type = (id); (pos)->a_un.a_val = (uintptr_t)(ptr); (pos)++;} +#else +#define AUXARGS_ENTRY_PTR(pos, id, ptr) \ + {(pos)->a_type = (id); (pos)->a_un.a_ptr = (ptr); (pos)++;} +#endif struct image_params; struct thread; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"