public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Petr.Salinger at seznam dot cz" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15794] move AT_* constants definition from elf.h into sysdeps (bits) directory
Date: Sun, 28 Jul 2013 06:19:00 -0000	[thread overview]
Message-ID: <bug-15794-131-vqMmoGLIHj@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15794-131@http.sourceware.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.


  parent reply	other threads:[~2013-07-28  6:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27  8:21 [Bug libc/15794] New: " Petr.Salinger at seznam dot cz
2013-07-27  9:35 ` [Bug libc/15794] " neleai at seznam dot cz
2013-07-27  9:35 ` [Bug libc/15794] New: " Ondřej Bílka
2013-07-28  6:19 ` Petr.Salinger at seznam dot cz [this message]
2013-07-28 17:12 ` [Bug libc/15794] " joseph at codesourcery dot com
2013-07-29  7:28 ` Petr.Salinger at seznam dot cz
2013-07-29  7:32 ` Petr.Salinger at seznam dot cz
2013-11-25 19:44 ` adconrad at 0c3 dot net
2013-11-25 20:03 ` adconrad at 0c3 dot net
2013-11-25 20:58 ` carlos at redhat dot com
2013-11-25 21:34 ` adconrad at 0c3 dot net
2013-11-27  3:02 ` bugdal at aerifal dot cx
2014-06-13 13:18 ` fweimer at redhat dot com
2023-05-26 15:03 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15794-131-vqMmoGLIHj@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).