[Glibc-bsd-commits] r3691 - in branches/squeeze/glibc-ports/kfreebsd: . i386 x86_64

Petr Salinger ps-guest at alioth.debian.org
Sun Aug 21 10:49:03 UTC 2011


Author: ps-guest
Date: 2011-08-21 10:49:03 +0000 (Sun, 21 Aug 2011)
New Revision: 3691

Modified:
   branches/squeeze/glibc-ports/kfreebsd/dl-sysdep.c
   branches/squeeze/glibc-ports/kfreebsd/i386/dl-machine.h
   branches/squeeze/glibc-ports/kfreebsd/x86_64/dl-machine.h
Log:
merge r3689 - restore AT_EXECPATH handling



Modified: branches/squeeze/glibc-ports/kfreebsd/dl-sysdep.c
===================================================================
--- branches/squeeze/glibc-ports/kfreebsd/dl-sysdep.c	2011-08-21 10:04:23 UTC (rev 3690)
+++ branches/squeeze/glibc-ports/kfreebsd/dl-sysdep.c	2011-08-21 10:49:03 UTC (rev 3691)
@@ -36,6 +36,8 @@
 # undef _dl_sysdep_start
 # undef _dl_show_auxv
 
+extern const char *_self_program_name_from_auxv attribute_hidden;
+
 ElfW(Addr)
 _dl_sysdep_start (void **start_argptr,
 		  void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
@@ -73,6 +75,9 @@
       case AT_ENTRY:
 	user_entry = av->a_un.a_val;
 	break;
+      case AT_EXECPATH:
+	_self_program_name_from_auxv = (char *) av->a_un.a_val;
+	break;
 #ifdef NEED_DL_BASE_ADDR
       case AT_BASE:
 	_dl_base_addr = av->a_un.a_val;

Modified: branches/squeeze/glibc-ports/kfreebsd/i386/dl-machine.h
===================================================================
--- branches/squeeze/glibc-ports/kfreebsd/i386/dl-machine.h	2011-08-21 10:04:23 UTC (rev 3690)
+++ branches/squeeze/glibc-ports/kfreebsd/i386/dl-machine.h	2011-08-21 10:49:03 UTC (rev 3691)
@@ -92,16 +92,12 @@
     );
 }
 
-extern const char *_self_program_name_from_auxv attribute_hidden;
-
 static inline void __attribute__ ((unused))
 dl_platform_kfreebsd_i386_init (void)
 {
 	/* we don't have reasonable AT_PLATFORM from kernel
 	   try to use cpuid to get one, also guess AT_HWCAP */
 
-        _self_program_name_from_auxv = GLRO(dl_platform);
-        
 	int val, hwcap;
 
 	val = try_flip_flags(X86_EFLAGS_AC | X86_EFLAGS_ID);

Modified: branches/squeeze/glibc-ports/kfreebsd/x86_64/dl-machine.h
===================================================================
--- branches/squeeze/glibc-ports/kfreebsd/x86_64/dl-machine.h	2011-08-21 10:04:23 UTC (rev 3690)
+++ branches/squeeze/glibc-ports/kfreebsd/x86_64/dl-machine.h	2011-08-21 10:49:03 UTC (rev 3691)
@@ -117,9 +117,6 @@
     );
 }
 
-extern const char *_self_program_name_from_auxv attribute_hidden;
-
-                           
 static inline void __attribute__ ((unused))
 dl_platform_kfreebsd_x86_64_init (void)
 {
@@ -130,7 +127,6 @@
 
 	cpuid(1, &val, &hwcap);
 	GLRO(dl_hwcap) = hwcap;
-	_self_program_name_from_auxv = GLRO(dl_platform);
 	GLRO(dl_platform) = ELF_MACHINE_NAME;
 }
 




More information about the Glibc-bsd-commits mailing list