This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15794] move AT_* constants definition from elf.h into sysdeps (bits) directory
- From: "Petr.Salinger at seznam dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 28 Jul 2013 06:19:03 +0000
- Subject: [Bug libc/15794] move AT_* constants definition from elf.h into sysdeps (bits) directory
- Auto-submitted: auto-generated
- References: <bug-15794-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15794
--- Comment #3 from Petr.Salinger at seznam dot cz ---
I would rather consider the AT_* constants as constants in errno.h
There is a common base, with the same numbers (0-9).
But there are also some constants with same meaning and different numbers
and constants with same number but completely different meaning.
The original problem is
http://bugs.debian.org//cgi-bin/bugreport.cgi?bug=717912
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/include/uapi/linux/auxvec.h
#define AT_NULL 0 /* end of vector */
#define AT_IGNORE 1 /* entry should be ignored */
#define AT_EXECFD 2 /* file descriptor of program */
#define AT_PHDR 3 /* program headers for program */
#define AT_PHENT 4 /* size of program header entry */
#define AT_PHNUM 5 /* number of program headers */
#define AT_PAGESZ 6 /* system page size */
#define AT_BASE 7 /* base address of interpreter */
#define AT_FLAGS 8 /* flags */
#define AT_ENTRY 9 /* entry point of program */
#define AT_NOTELF 10 /* program is not ELF */
#define AT_UID 11 /* real uid */
#define AT_EUID 12 /* effective uid */
#define AT_GID 13 /* real gid */
#define AT_EGID 14 /* effective gid */
#define AT_PLATFORM 15 /* string identifying CPU for optimizations */
#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
#define AT_CLKTCK 17 /* frequency at which times() increments */
/* AT_* values 18 through 22 are reserved */
#define AT_SECURE 23 /* secure mode boolean */
#define AT_BASE_PLATFORM 24 /* string identifying real platform, may
* differ from AT_PLATFORM. */
#define AT_RANDOM 25 /* address of 16 random bytes */
#define AT_HWCAP2 26 /* extension of AT_HWCAP */
#define AT_EXECFN 31 /* filename of program */
http://svnweb.freebsd.org/base/head/sys/x86/include/elf.h:
/* Values for a_type. */
#define AT_NULL 0 /* Terminates the vector. */
#define AT_IGNORE 1 /* Ignored entry. */
#define AT_EXECFD 2 /* File descriptor of program to load. */
#define AT_PHDR 3 /* Program header of program already loaded. */
#define AT_PHENT 4 /* Size of each program header entry. */
#define AT_PHNUM 5 /* Number of program header entries. */
#define AT_PAGESZ 6 /* Page size in bytes. */
#define AT_BASE 7 /* Interpreter's base address. */
#define AT_FLAGS 8 /* Flags (unused for i386). */
#define AT_ENTRY 9 /* Where interpreter should transfer control. */
#define AT_NOTELF 10 /* Program is not ELF ?? */
#define AT_UID 11 /* Real uid. */
#define AT_EUID 12 /* Effective uid. */
#define AT_GID 13 /* Real gid. */
#define AT_EGID 14 /* Effective gid. */
#define AT_EXECPATH 15 /* Path to the executable. */
#define AT_CANARY 16 /* Canary for SSP. */
#define AT_CANARYLEN 17 /* Length of the canary. */
#define AT_OSRELDATE 18 /* OSRELDATE. */
#define AT_NCPUS 19 /* Number of CPUs. */
#define AT_PAGESIZES 20 /* Pagesizes. */
#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */
#define AT_TIMEKEEP 22 /* Pointer to timehands. */
#define AT_STACKPROT 23 /* Initial stack protection. */
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/exec_elf.h
enum AuxID {
AUX_null = 0,
AUX_ignore = 1,
AUX_execfd = 2,
AUX_phdr = 3, /* &phdr[0] */
AUX_phent = 4, /* sizeof(phdr[0]) */
AUX_phnum = 5, /* # phdr entries */
AUX_pagesz = 6, /* PAGESIZE */
AUX_base = 7, /* ld.so base addr */
AUX_flags = 8, /* processor flags */
AUX_entry = 9, /* a.out entry */
AUX_sun_uid = 2000, /* euid */
AUX_sun_ruid = 2001, /* ruid */
AUX_sun_gid = 2002, /* egid */
AUX_sun_rgid = 2003 /* rgid */
};
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/exec_elf.h
/* a_type */
#define AT_NULL 0 /* Marks end of array */
#define AT_IGNORE 1 /* No meaning, a_un is undefined */
#define AT_EXECFD 2 /* Open file descriptor of object file */
#define AT_PHDR 3 /* &phdr[0] */
#define AT_PHENT 4 /* sizeof(phdr[0]) */
#define AT_PHNUM 5 /* # phdr entries */
#define AT_PAGESZ 6 /* PAGESIZE */
#define AT_BASE 7 /* Interpreter base addr */
#define AT_FLAGS 8 /* Processor flags */
#define AT_ENTRY 9 /* Entry address of executable */
#define AT_DCACHEBSIZE 10 /* Data cache block size */
#define AT_ICACHEBSIZE 11 /* Instruction cache block size */
#define AT_UCACHEBSIZE 12 /* Unified cache block size */
#define AT_STACKBASE 13 /* Base address of the main thread */
/* Vendor specific */
#define AT_MIPS_NOTELF 10 /* XXX a_val != 0 -> MIPS XCOFF executable */
#define AT_EUID 2000 /* euid (solaris compatible numbers) */
#define AT_RUID 2001 /* ruid (solaris compatible numbers) */
#define AT_EGID 2002 /* egid (solaris compatible numbers) */
#define AT_RGID 2003 /* rgid (solaris compatible numbers) */
/* Solaris kernel specific */
#define AT_SUN_LDELF 2004 /* dynamic linker's ELF header */
#define AT_SUN_LDSHDR 2005 /* dynamic linker's section header */
#define AT_SUN_LDNAME 2006 /* dynamic linker's name */
#define AT_SUN_LPGSIZE 2007 /* large pagesize */
/* Other information */
#define AT_SUN_PLATFORM 2008 /* sysinfo(SI_PLATFORM) */
#define AT_SUN_HWCAP 2009 /* process hardware capabilities */
#define AT_SUN_IFLUSH 2010 /* do we need to flush the instruction cache?
*/
#define AT_SUN_CPU 2011 /* CPU name */
/* ibcs2 emulation band aid */
#define AT_SUN_EMUL_ENTRY 2012 /* coff entry point */
#define AT_SUN_EMUL_EXECFD 2013 /* coff file descriptor */
/* Executable's fully resolved name */
#define AT_SUN_EXECNAME 2014
--
You are receiving this mail because:
You are on the CC list for the bug.