From: John Marino Date: Fri, 20 May 2011 11:17:03 +0000 (+0200) Subject: kernel ELF: Implement AT_OSRELDATE aux vector X-Git-Tag: v2.12.0~585^2 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/88303370a64a3788a27e8cda29e3193f9245cfb0 kernel ELF: Implement AT_OSRELDATE aux vector We have several unimplemented non-standard enumerations of the ELF aux vectors brought in with a recent sync with FreeBSD. In general they won't be implemented because of philosophical reasons or lack of necessity. In the case of AT_OSRELDATE, it makes sense to provide this simple update as the release date comes directly from the ELF binary and it's already available thanks to recent comments regarding osreldate. --- diff --git a/sys/cpu/i386/include/elf.h b/sys/cpu/i386/include/elf.h index d1e0724cd1..38ffaeba63 100644 --- a/sys/cpu/i386/include/elf.h +++ b/sys/cpu/i386/include/elf.h @@ -96,7 +96,7 @@ __ElfType(Auxinfo); /* * The following non-standard values are used in Linux ELF binaries. - * Types 16 - 23 are not implemented in the kernel + * Types 16-17 and 19-23 are not implemented in the kernel */ #define AT_NOTELF 10 /* Program is not ELF ?? */ #define AT_UID 11 /* Real uid. */ diff --git a/sys/cpu/x86_64/include/elf.h b/sys/cpu/x86_64/include/elf.h index 56a19711ba..1845539553 100644 --- a/sys/cpu/x86_64/include/elf.h +++ b/sys/cpu/x86_64/include/elf.h @@ -95,7 +95,7 @@ __ElfType(Auxinfo); /* * The following non-standard values are used in Linux ELF binaries. - * Types 16 - 23 are not implemented in the kernel + * Types 16-17 and 19-23 are not implemented in the kernel */ #define AT_NOTELF 10 /* Program is not ELF ?? */ #define AT_UID 11 /* Real uid. */ diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index f8298cfe29..287eb84970 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -875,6 +875,7 @@ __elfN(dragonfly_fixup)(register_t **stack_base, struct image_params *imgp) AUXARGS_ENTRY(pos, AT_BASE, args->base); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); + AUXARGS_ENTRY(pos, AT_OSRELDATE, osreldate); AUXARGS_ENTRY(pos, AT_NULL, 0); kfree(imgp->auxargs, M_TEMP);