Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 2009 12:50:16 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189926 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/include
Message-ID:  <200903171250.n2HCoG0i095280@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Mar 17 12:50:16 2009
New Revision: 189926
URL: http://svn.freebsd.org/changeset/base/189926

Log:
  Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointer
  to the full path of the image that is being executed.
  Increase AT_COUNT.
  
  Remove no longer true comment about types used in Linux ELF binaries,
  listed types contain FreeBSD-specific entries.
  
  Reviewed by:	kan

Modified:
  head/sys/amd64/include/elf.h
  head/sys/arm/include/elf.h
  head/sys/i386/include/elf.h
  head/sys/ia64/include/elf.h
  head/sys/mips/include/elf.h
  head/sys/powerpc/include/elf.h
  head/sys/sparc64/include/elf.h
  head/sys/sun4v/include/elf.h

Modified: head/sys/amd64/include/elf.h
==============================================================================
--- head/sys/amd64/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/amd64/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -81,16 +81,14 @@ __ElfType(Auxinfo);
 #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. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 /*
  * Relocation types.

Modified: head/sys/arm/include/elf.h
==============================================================================
--- head/sys/arm/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/arm/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -75,8 +75,9 @@ __ElfType(Auxinfo);
 #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_COUNT        15      /* Count of defined aux entry types. */
+#define AT_COUNT        16      /* Count of defined aux entry types. */
 
 #define	R_ARM_COUNT		33	/* Count of defined relocation types. */
 

Modified: head/sys/i386/include/elf.h
==============================================================================
--- head/sys/i386/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/i386/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -84,16 +84,14 @@ __ElfType(Auxinfo);
 #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. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 /*
  * Relocation types.

Modified: head/sys/ia64/include/elf.h
==============================================================================
--- head/sys/ia64/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/ia64/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -82,16 +82,14 @@ __ElfType(Auxinfo);
 #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. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 /*
  * Values for e_flags.

Modified: head/sys/mips/include/elf.h
==============================================================================
--- head/sys/mips/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/mips/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -241,15 +241,13 @@ __ElfType(Auxinfo);
 #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. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 #endif /* !_MACHINE_ELF_H_ */

Modified: head/sys/powerpc/include/elf.h
==============================================================================
--- head/sys/powerpc/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/powerpc/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -77,8 +77,9 @@ __ElfType(Auxinfo);
 #define	AT_DCACHEBSIZE	10	/* Data cache block size for the processor. */
 #define	AT_ICACHEBSIZE	11	/* Instruction cache block size for the uP. */
 #define	AT_UCACHEBSIZE	12	/* Cache block size, or `0' if cache not unified. */
+#define	AT_EXECPATH	13	/* Path to the executable. */
 
-#define	AT_COUNT	13	/* Count of defined aux entry types. */
+#define	AT_COUNT	14	/* Count of defined aux entry types. */
 
 /*
  * Relocation types.

Modified: head/sys/sparc64/include/elf.h
==============================================================================
--- head/sys/sparc64/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/sparc64/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -78,16 +78,14 @@ __ElfType(Auxinfo);
 #define	AT_BASE		7	/* Interpreter's base address. */
 #define	AT_FLAGS	8	/* Flags (unused). */
 #define	AT_ENTRY	9	/* Where interpreter should transfer control. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 /* Define "machine" characteristics */
 #if __ELF_WORD_SIZE == 32

Modified: head/sys/sun4v/include/elf.h
==============================================================================
--- head/sys/sun4v/include/elf.h	Tue Mar 17 12:47:40 2009	(r189925)
+++ head/sys/sun4v/include/elf.h	Tue Mar 17 12:50:16 2009	(r189926)
@@ -78,16 +78,14 @@ __ElfType(Auxinfo);
 #define	AT_BASE		7	/* Interpreter's base address. */
 #define	AT_FLAGS	8	/* Flags (unused). */
 #define	AT_ENTRY	9	/* Where interpreter should transfer control. */
-/*
- * The following non-standard values are used in Linux ELF binaries.
- */
 #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_COUNT	15	/* Count of defined aux entry types. */
+#define	AT_COUNT	16	/* Count of defined aux entry types. */
 
 /* Define "machine" characteristics */
 #if __ELF_WORD_SIZE == 32



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903171250.n2HCoG0i095280>