This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfa] Support new AT_BASE_PLATFORM and AT_EXECFN auxv entries


Hello,

recent Linux kernels provide two new auxiliary vector entries that
GDB does not yet support, leading to error messages in "info auxv".
The AT_BASE_PLATFORM and AT_EXECFN values are not even present in
include/elf/common.h at this point.

This patch adds those defines (mirroring comments from Linux
kernel / glibc headers), and code to handle those entries in GDB.

Are the include/elf/ changes OK?

GDB tested on powerpc64-linux (on a 2.6.27 kernel).

Bye,
Ulrich


gdb/ChangeLog:

	* auxv.c (fprint_target_auxv): Handle AT_BASE_PLATFORM and
	AT_EXECFN.  Re-sort AT_SECURE.

include/elf/ChangeLog:

	* common.h (AT_BASE_PLATFORM, AT_EXECFN): Define.


Index: gdb/auxv.c
===================================================================
RCS file: /cvs/src/src/gdb/auxv.c,v
retrieving revision 1.15
diff -c -p -r1.15 auxv.c
*** gdb/auxv.c	28 Oct 2008 17:19:56 -0000	1.15
--- gdb/auxv.c	12 Nov 2008 17:19:37 -0000
*************** fprint_target_auxv (struct ui_file *file
*** 203,211 ****
  	  TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
  	  TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
  	  TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
  	  TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
  	  TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
- 	  TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
  	  TAG (AT_SUN_UID, _("Effective user ID"), dec);
  	  TAG (AT_SUN_RUID, _("Real user ID"), dec);
  	  TAG (AT_SUN_GID, _("Effective group ID"), dec);
--- 203,213 ----
  	  TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
  	  TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
  	  TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
+ 	  TAG (AT_BASE_PLATFORM, _("String identifying base platform"), str);
+ 	  TAG (AT_EXECFN, _("File name of executable"), str);
+ 	  TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
  	  TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
  	  TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
  	  TAG (AT_SUN_UID, _("Effective user ID"), dec);
  	  TAG (AT_SUN_RUID, _("Real user ID"), dec);
  	  TAG (AT_SUN_GID, _("Effective group ID"), dec);
Index: include/elf/common.h
===================================================================
RCS file: /cvs/src/src/include/elf/common.h,v
retrieving revision 1.99
diff -c -p -r1.99 common.h
*** include/elf/common.h	3 Aug 2008 23:20:42 -0000	1.99
--- include/elf/common.h	12 Nov 2008 17:19:41 -0000
***************
*** 798,803 ****
--- 798,806 ----
  #define AT_UCACHEBSIZE	21		/* Unified cache block size.  */
  #define AT_IGNOREPPC	22		/* Entry should be ignored */
  #define	AT_SECURE	23		/* Boolean, was exec setuid-like?  */
+ #define AT_BASE_PLATFORM 24		/* String identifying real platform,
+ 					   may differ from AT_PLATFORM.  */
+ #define AT_EXECFN	31		/* Filename of executable.  */
  /* Pointer to the global system page used for system calls and other
     nice things.  */
  #define AT_SYSINFO	32
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]