This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Committed, sim/cris: a few updates to the AUX vector passing


Mostly simplifications: there's no use having TARGET_* macros
that are standard ELF definitions, duhm and I never used the
value-parameter to AUX_ENTF.  Also, I'd better pass AUX_SECURE
for new kernels, says the glibc source.  Unfortunately I don't
know a simple enough way to add a test-case for this...

Committed.  That's the last for now!

sim:
	* cris/sim-if.c (TARGET_AT_NULL, TARGET_AT_PHDR, TARGET_AT_PHENT)
	(TARGET_AT_PHNUM, TARGET_AT_PAGESZ, TARGET_AT_BASE)
	(TARGET_AT_FLAGS, TARGET_AT_ENTRY, TARGET_AT_UID, TARGET_AT_EUID)
	(TARGET_AT_GID, TARGET_AT_EGID, TARGET_AT_HWCAP)
	(TARGET_AT_CLKTCK): Remove redundant macros.
	(AUX_ENT): Adjust to use standard ELF AT_* macros.
	(AUX_ENTF): Ditto.  Remove always-0 middle argument.  Update all
	callers.
	(sim_open): Also pass AT_SECURE.

Index: cris/sim-if.c
===================================================================
RCS file: /cvs/src/src/sim/cris/sim-if.c,v
retrieving revision 1.8
diff -p -u -r1.8 sim-if.c
--- cris/sim-if.c	30 Dec 2008 18:52:44 -0000	1.8
+++ cris/sim-if.c	3 Jan 2009 21:19:26 -0000
@@ -41,22 +41,6 @@ char *missing_environ[] = { "SHELL=/bin/
 #define GET_ENVIRON() missing_environ
 #endif
 
-/* AUX vector entries.  */
-#define TARGET_AT_NULL 0
-#define TARGET_AT_PHDR 3
-#define TARGET_AT_PHENT 4
-#define TARGET_AT_PHNUM 5
-#define TARGET_AT_PAGESZ 6
-#define TARGET_AT_BASE 7
-#define TARGET_AT_FLAGS 8
-#define TARGET_AT_ENTRY 9
-#define TARGET_AT_UID 11
-#define TARGET_AT_EUID 12
-#define TARGET_AT_GID 13
-#define TARGET_AT_EGID 14
-#define TARGET_AT_HWCAP 16
-#define TARGET_AT_CLKTCK 17
-
 /* Used with get_progbounds to find out how much memory is needed for the
    program.  We don't want to allocate more, since that could mask
    invalid memory accesses program bugs.  */
@@ -628,23 +612,24 @@ sim_open (SIM_OPEN_KIND kind, host_callb
     USI val;
   } auxv_entries[] =
     {
-#define AUX_ENT(a, b) {TARGET_ ## a, NULL, b}
-#define AUX_ENTF(a, b, f) {TARGET_ ## a, f, b}
+#define AUX_ENT(a, b) {a, NULL, b}
+#define AUX_ENTF(a, f) {a, f, 0}
       AUX_ENT (AT_HWCAP, 0),
       AUX_ENT (AT_PAGESZ, 8192),
       AUX_ENT (AT_CLKTCK, 100),
-      AUX_ENTF (AT_PHDR, 0, aux_ent_phdr),
-      AUX_ENTF (AT_PHENT, 0, aux_ent_phent),
-      AUX_ENTF (AT_PHNUM, 0, aux_ent_phnum),
-      AUX_ENTF (AT_BASE, 0, aux_ent_base),
+      AUX_ENTF (AT_PHDR, aux_ent_phdr),
+      AUX_ENTF (AT_PHENT, aux_ent_phent),
+      AUX_ENTF (AT_PHNUM, aux_ent_phnum),
+      AUX_ENTF (AT_BASE, aux_ent_base),
       AUX_ENT (AT_FLAGS, 0),
-      AUX_ENTF (AT_ENTRY, 0, aux_ent_entry),
+      AUX_ENTF (AT_ENTRY, aux_ent_entry),
 
       /* Or is root better?  Maybe have it settable?  */
       AUX_ENT (AT_UID, 500),
       AUX_ENT (AT_EUID, 500),
       AUX_ENT (AT_GID, 500),
       AUX_ENT (AT_EGID, 500),
+      AUX_ENT (AT_SECURE, 0),
       AUX_ENT (AT_NULL, 0)
     };
 
brgds, H-P


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