rpms/dietlibc/devel dietlibc-0.31-no-stack-protector.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 dietlibc-0.28-setpriority.patch, 1.3, 1.4 dietlibc-0.29-scall.patch, 1.5, 1.6 dietlibc-0.30-longdouble.patch, 1.3, 1.4 dietlibc-0.31-defpath.patch, 1.3, 1.4 dietlibc-0.31-implicitfunc.patch, 1.6, 1.7 dietlibc-0.31-lcctime.patch, 1.3, 1.4 dietlibc-0.31-noreturn.patch, 1.3, 1.4 dietlibc-0.31-pagesize.patch, 1.11, 1.12 dietlibc-0.31-printFG.patch, 1.7, 1.8 dietlibc-0.31-stacksmash-dyn.patch, 1.3, 1.4 dietlibc-0.31-stacksmash.patch, 1.3, 1.4 dietlibc-0.31-testsuite.patch, 1.6, 1.7 dietlibc-0.31.20080212-teststdout.patch, 1.3, 1.4 dietlibc.spec, 1.60, 1.61 sources, 1.12, 1.13

Enrico Scholz ensc at fedoraproject.org
Sun Mar 1 11:53:57 UTC 2009


Author: ensc

Update of /cvs/extras/rpms/dietlibc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32275

Modified Files:
	.cvsignore dietlibc-0.28-setpriority.patch 
	dietlibc-0.29-scall.patch dietlibc-0.30-longdouble.patch 
	dietlibc-0.31-defpath.patch dietlibc-0.31-implicitfunc.patch 
	dietlibc-0.31-lcctime.patch dietlibc-0.31-noreturn.patch 
	dietlibc-0.31-pagesize.patch dietlibc-0.31-printFG.patch 
	dietlibc-0.31-stacksmash-dyn.patch 
	dietlibc-0.31-stacksmash.patch dietlibc-0.31-testsuite.patch 
	dietlibc-0.31.20080212-teststdout.patch dietlibc.spec sources 
Added Files:
	dietlibc-0.31-no-stack-protector.patch 
Log Message:
updated


dietlibc-0.31-no-stack-protector.patch:

--- NEW FILE dietlibc-0.31-no-stack-protector.patch ---
>From 3bbcb9a3a908d1aceb9f69118c1ed17a8d6d1871 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date: Sat, 28 Feb 2009 13:32:45 +0100
Subject: [PATCH] build some files without stack-protector

---
 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 0cd0105..46ef360 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,8 @@ LIBPTHREAD_OBJS=$(patsubst libpthread/%.c,$(OBJDIR)/%.o,$(shell ./threadsafe.sh)
 
 LIBGMON_OBJS=$(OBJDIR)/__mcount.o $(OBJDIR)/monitor.o $(OBJDIR)/profil.o
 
+NO_STACK_PROTECTOR=stackgap.o __get_elf_aux_value.o
+
 include $(ARCH)/Makefile.add
 
 LIBMATHOBJ=$(patsubst %,$(OBJDIR)/%,$(LIBMATH))
@@ -177,6 +179,8 @@ $(OBJDIR)/stack_smash_handler2.o:	XCFLAGS:=-fno-omit-frame-pointer
 $(OBJDIR)/%.o: %.c
 	$(CROSS)$(CC) $(INC) $(CFLAGS) $(XCFLAGS) -c $< -o $@ -D__dietlibc__
 	$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+
+$(addprefix $(OBJDIR)/,$(NO_STACK_PROTECTOR)):	XCFLAGS+=-fno-stack-protector
 endif
 
 ifeq ($(shell $(CC) -v 2>&1 | grep "gcc version"),gcc version 4.0.0)
-- 
1.6.0.6



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore	18 Oct 2008 17:06:02 -0000	1.6
+++ .cvsignore	1 Mar 2009 11:53:24 -0000	1.7
@@ -1 +1 @@
-dietlibc-0.31.20081017.tar.bz2
+dietlibc-0.31.20090228.tar.bz2

dietlibc-0.28-setpriority.patch:

Index: dietlibc-0.28-setpriority.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.28-setpriority.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.28-setpriority.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.28-setpriority.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 395ad1b292568821a8f6ad4398be2c9746a0133b Mon Sep 17 00:00:00 2001
+From 5ba671b7b8446645f31fcf7928908950573c53f5 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:49:05 +0200
 Subject: [PATCH] Return new nice value for nice(2)
@@ -29,5 +29,5 @@
  }
  #endif
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.29-scall.patch:

Index: dietlibc-0.29-scall.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.29-scall.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dietlibc-0.29-scall.patch	18 Oct 2008 17:04:19 -0000	1.5
+++ dietlibc-0.29-scall.patch	1 Mar 2009 11:53:24 -0000	1.6
@@ -1,4 +1,4 @@
-From 0ae5eb83091eee9cdef27eaadb5e2e8f58fa0ee9 Mon Sep 17 00:00:00 2001
+From 5dc478088a3358ba32ae2b4c104735eb966b62d1 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:50:24 +0200
 Subject: [PATCH] Sanity checks for syscall availability
@@ -10,7 +10,7 @@
  1 files changed, 7 insertions(+), 1 deletions(-)
 
 diff --git a/libcompat/syscall.S b/libcompat/syscall.S
-index c9f72bb..6e964b3 100644
+index c9f72bb..4188167 100644
 --- a/libcompat/syscall.S
 +++ b/libcompat/syscall.S
 @@ -130,6 +130,12 @@ syscall:
@@ -20,13 +20,13 @@
 -		/* arch not implemented yet */
 +#include <endian.h>
 +	.section	.comment
-+#if (__WORDSIZE == 64)	
++#if (__WORDSIZE == 64)
 +	.quad		__syscall_2_not_implemented_for_this_arch
-+#else	
++#else
 +	.long		__syscall_2_not_implemented_for_this_arch
 +#endif
  #endif
  .size	syscall, . - syscall
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.30-longdouble.patch:

Index: dietlibc-0.30-longdouble.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.30-longdouble.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.30-longdouble.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.30-longdouble.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 75feb30ea22b815f828c7854352007616c4393f0 Mon Sep 17 00:00:00 2001
+From e4be3aa68fdfb87c35378adc3b947e805b923fcf Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:54:03 +0200
 Subject: [PATCH] Workaround PPC build issues
@@ -47,5 +47,5 @@
  static const double  coeff[] = { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 };
  int                  signgam;
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-defpath.patch:

Index: dietlibc-0.31-defpath.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-defpath.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31-defpath.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31-defpath.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 2a265ce59a6e0187ca4b96feb86196d7816d271f Mon Sep 17 00:00:00 2001
+From 4fee9a2dc10208f639590cabc07e7f3b91cf0d17 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 18:00:19 +0200
 Subject: [PATCH] Security fix for proper $PATH
@@ -22,5 +22,5 @@
  #define _PATH_DEVNULL "/dev/null"
  
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-implicitfunc.patch:

Index: dietlibc-0.31-implicitfunc.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-implicitfunc.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dietlibc-0.31-implicitfunc.patch	18 Oct 2008 17:04:19 -0000	1.6
+++ dietlibc-0.31-implicitfunc.patch	1 Mar 2009 11:53:24 -0000	1.7
@@ -1,4 +1,4 @@
-From e1f4f15e4be4283a6ac6eee1e9393a5e09369d23 Mon Sep 17 00:00:00 2001
+From 50c65fce74b343c43161d8194d36aa52ebed51ec Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:43:08 +0200
 Subject: [PATCH] Fixes for -Werror-no-implicit-functions
@@ -46,5 +46,5 @@
  #include <limits.h>
  #include <malloc.h>
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-lcctime.patch:

Index: dietlibc-0.31-lcctime.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-lcctime.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31-lcctime.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31-lcctime.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 28fbb9c7844032fecb53ebdcc18190bf08e9b604 Mon Sep 17 00:00:00 2001
+From 7e9b745e0cca4916c29b40fac68cb98d91904b09 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:42:20 +0200
 Subject: [PATCH] Fixes/enhancements in str?time() functions
@@ -24,7 +24,7 @@
  	       _strf: p  += strftime (p, (size_t)(dst+max-p), src, tm); 	 break;
  	    case 'a': src = sweekdays [tm->tm_wday]; 		 goto _str;
 diff --git a/libugly/strptime.c b/libugly/strptime.c
-index 6ac5340..32dc2a7 100644
+index 9d7f530..d19f309 100644
 --- a/libugly/strptime.c
 +++ b/libugly/strptime.c
 @@ -119,10 +119,11 @@ char* strptime(const char* s,const char* format, struct tm* tm) {
@@ -42,5 +42,5 @@
        case 'y':
  	i=getint(&s,2);
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-noreturn.patch:

Index: dietlibc-0.31-noreturn.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-noreturn.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31-noreturn.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31-noreturn.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From d17d4d4c6dbdb1e608208860cec304bab8044885 Mon Sep 17 00:00:00 2001
+From c895c51d84b36cf649764193f33f296728b27bdc Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:43:42 +0200
 Subject: [PATCH] __noreturn__ annotation for abort(3)
@@ -27,5 +27,5 @@
  extern int rand(void) __THROW;
  extern int rand_r(unsigned int *seed) __THROW;
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-pagesize.patch:

Index: dietlibc-0.31-pagesize.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-pagesize.patch,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dietlibc-0.31-pagesize.patch	18 Oct 2008 17:02:52 -0000	1.11
+++ dietlibc-0.31-pagesize.patch	1 Mar 2009 11:53:24 -0000	1.12
@@ -1,4 +1,4 @@
-From 6160ca8256603d1f1a929f01238bf43866552dee Mon Sep 17 00:00:00 2001
+From 2f762bc732fef1c0e91b7e920c025783d204100e Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:35:14 +0200
 Subject: [PATCH] Support for dynamic PAGE_SIZE
@@ -65,43 +65,44 @@
 auxilary elf-info table. Now, this is not available anymore and I
 use a type derived from __WORD_SIZE.
 ---
- alpha/start.S                  |    9 ++++
- arm/start.S                    |   13 ++++++-
- dietdirent.h                   |    6 ++-
- dietelfinfo.h                  |   20 ++++++++++
- dietfeatures.h                 |   14 +++++++
- dietpagesize.h                 |   31 +++++++++++++++
- dynlinker/ldso_start.S         |    9 ++++
- i386/start.S                   |    7 +++
- ia64/start.S                   |   10 +++++
- include/sys/shm.h              |    9 ----
- lib/alloc.c                    |    9 ++--
- lib/closedir.c                 |    4 +-
- lib/mmap64.c                   |    6 ++-
- lib/opendir.c                  |    4 +-
- lib/readdir.c                  |    2 +-
- lib/readdir64.c                |    6 +-
- libcruft/__get_elf_aux_value.c |   14 +++++++
- libcruft/getpagesize.c         |   20 +++++++---
- libcruft/sysconf.c             |   17 ++++++--
- mips/start.S                   |    9 ++++
- parisc/start.S                 |   10 +++++
- ppc/start.S                    |    9 ++++
- ppc64/start.S                  |    9 ++++
- s390/start.S                   |   11 +++++
- s390x/start.S                  |   11 +++++
- sparc/shmat.c                  |    8 +--
- sparc/start.S                  |   11 +++++
- sparc64/start.S                |   11 +++++
- syscalls.s/environ.S           |   20 ++++++++++
- test/Makefile                  |    2 +-
- test/runtests.sh               |    2 +-
- test/sysconf.c                 |   80 ++++++++++++++++++++++++++++++++++++++++
- x86_64/start.S                 |   16 ++++++++
- 33 files changed, 378 insertions(+), 41 deletions(-)
+ alpha/start.S             |    9 +++++
+ arm/start.S               |   13 +++++++-
+ dietdirent.h              |    6 +++-
+ dietelfinfo.h             |   20 +++++++++++
+ dietfeatures.h            |   14 ++++++++
+ dietpagesize.h            |   31 +++++++++++++++++
+ dynlinker/ldso_start.S    |    9 +++++
+ i386/start.S              |    7 ++++
+ ia64/start.S              |   10 ++++++
+ include/sys/shm.h         |    9 -----
+ lib/__get_elf_aux_value.c |   14 ++++++++
+ lib/alloc.c               |    9 +++--
+ lib/closedir.c            |    4 ++-
+ lib/mmap64.c              |    6 ++-
+ lib/opendir.c             |    4 ++-
+ lib/readdir.c             |    2 +-
+ lib/readdir64.c           |    6 ++--
+ lib/stackgap.c            |   20 +++++++++++-
+ libcruft/getpagesize.c    |   28 +++++++--------
+ libcruft/sysconf.c        |   17 +++++++---
+ mips/start.S              |    9 +++++
+ parisc/start.S            |   10 ++++++
+ ppc/start.S               |    9 +++++
+ ppc64/start.S             |    9 +++++
+ s390/start.S              |   11 ++++++
+ s390x/start.S             |   11 ++++++
+ sparc/shmat.c             |    8 ++---
+ sparc/start.S             |   11 ++++++
+ sparc64/start.S           |   11 ++++++
+ syscalls.s/environ.S      |   16 +++++++++
+ test/Makefile             |    2 +-
+ test/runtests.sh          |    2 +-
+ test/sysconf.c            |   80 +++++++++++++++++++++++++++++++++++++++++++++
+ x86_64/start.S            |   16 +++++++++
+ 34 files changed, 392 insertions(+), 51 deletions(-)
  create mode 100644 dietelfinfo.h
  create mode 100644 dietpagesize.h
- create mode 100644 libcruft/__get_elf_aux_value.c
+ create mode 100644 lib/__get_elf_aux_value.c
  create mode 100644 test/sysconf.c
 
 diff --git a/alpha/start.S b/alpha/start.S
@@ -197,12 +198,12 @@
 +	__attribute__((__visibility__("hidden"),__const__)) __pure;
 +#endif
 diff --git a/dietfeatures.h b/dietfeatures.h
-index 5ad8f38..2993b9e 100644
+index 7ba02ec..ab892d6 100644
 --- a/dietfeatures.h
 +++ b/dietfeatures.h
-@@ -126,6 +126,16 @@
- /* #define WANT_SSP_XOR */
- 
+@@ -119,6 +119,16 @@
+ #define WANT_SSP
+ #endif
  
 +/* Some platforms like x86_64, ppc* or mips do not have a fixed PAGE_SIZE.
 + * Select WANT_DYN_PAGESIZE to detect the current PAGE_SIZE at runtime. Else,
@@ -217,7 +218,7 @@
  
  
  /* stop uncommenting here ;-) */
-@@ -157,4 +167,8 @@
+@@ -150,4 +160,8 @@
  #endif
  #endif
  
@@ -264,14 +265,14 @@
 +
 +#endif	/* H_DIETLIBC_DIETPAGESIZE_H */
 diff --git a/dynlinker/ldso_start.S b/dynlinker/ldso_start.S
-index ca278d7..7234f69 100644
+index ca278d7..da36845 100644
 --- a/dynlinker/ldso_start.S
 +++ b/dynlinker/ldso_start.S
 @@ -86,6 +86,15 @@ __environ:
  	.long 0
  #endif
  
-+/* __elfinfo must follow __environ immediately */	
++/* __elfinfo must follow __environ immediately */
 +.global __elfinfo
 +__elfinfo:
 +#if __WORDSIZE == 64
@@ -284,7 +285,7 @@
  fini_entry:
  	.long 0
 diff --git a/i386/start.S b/i386/start.S
-index 94a4f73..0c2c71d 100644
+index 94a4f73..9ad41ff 100644
 --- a/i386/start.S
 +++ b/i386/start.S
 @@ -25,6 +25,13 @@ _start:
@@ -295,14 +296,14 @@
 +1:	add	$4, %eax		/* increment envp */
 +	cmpl	$0, -4(%eax)		/* load envp[-1] */
 +	jne	1b			/* ... until envp[-1]==NULL */
-+        PUT_VAR %eax, __elfinfo, %ecx
++	PUT_VAR %eax, __elfinfo, %ecx
 +#endif
 +
  #ifdef PROFILING
  	pushl	$_etext
  	pushl	$.text
 diff --git a/ia64/start.S b/ia64/start.S
-index 50fd015..5389a4f 100644
+index 50fd015..c917721 100644
 --- a/ia64/start.S
 +++ b/ia64/start.S
 @@ -40,6 +40,16 @@ _start:
@@ -312,10 +313,10 @@
 +#ifdef WANT_ELFINFO
 +#  warning "MAKE ME IE64 CODE!"
 +1:	ld8	r9 = [out2], 8	    /* load *envp and increment it */
-+	orr	r9 = r9, r9	    /* test for NULL */ 
++	orr	r9 = r9, r9	    /* test for NULL */
 +	bne	1b
 +
-+	adds r14 = 8, r14	    /* __elfinfo = environ + 8 */ 
++	adds r14 = 8, r14	    /* __elfinfo = environ + 8 */
 +	st8  [r14] = out2           /* store envp in __elfinfo */
 +#endif
 +
@@ -342,6 +343,26 @@
  extern int shmget(key_t key, int size, int shmflg) __THROW;
  extern void *shmat(int shmid, const void *shmaddr, int shmflg) __THROW;
  extern int shmdt (const void *shmaddr) __THROW;
+diff --git a/lib/__get_elf_aux_value.c b/lib/__get_elf_aux_value.c
+new file mode 100644
+index 0000000..6ddddb4
+--- /dev/null
++++ b/lib/__get_elf_aux_value.c
+@@ -0,0 +1,14 @@
++#include <stdlib.h>
++#include "../dietelfinfo.h"
++
++__diet_elf_addr_t *__get_elf_aux_value(unsigned int tag)
++{
++  extern __diet_elf_addr_t const * const	__elfinfo;
++  __diet_elf_addr_t				*aux_ptr;
++
++  for (aux_ptr = __elfinfo; aux_ptr[0]!=AT_NULL; aux_ptr += 2)
++    if (aux_ptr[0]==tag)
++      return aux_ptr+1;
++
++  return NULL;
++}
 diff --git a/lib/alloc.c b/lib/alloc.c
 index 9690565..3f0cedb 100644
 --- a/lib/alloc.c
@@ -418,7 +439,7 @@
  
  void*mmap64(void*addr,size_t len,int prot,int flags,int fd,off64_t offset)
 diff --git a/lib/opendir.c b/lib/opendir.c
-index 2530d1a..0b49638 100644
+index 2530d1a..847685e 100644
 --- a/lib/opendir.c
 +++ b/lib/opendir.c
 @@ -5,6 +5,8 @@
@@ -435,7 +456,7 @@
      if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0)
        goto lose;
 -    t = (DIR *) mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, 
-+    t = (DIR *) mmap (NULL, __DIET_PAGE_SIZE, PROT_READ | PROT_WRITE, 
++    t = (DIR *) mmap (NULL, __DIET_PAGE_SIZE, PROT_READ | PROT_WRITE,
  		MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
      if (t == MAP_FAILED)
  lose:
@@ -483,33 +504,96 @@
      if (res<=0) {
        if (errno==ENOSYS) {
  	trygetdents64=0;
-diff --git a/libcruft/__get_elf_aux_value.c b/libcruft/__get_elf_aux_value.c
-new file mode 100644
-index 0000000..6ddddb4
---- /dev/null
-+++ b/libcruft/__get_elf_aux_value.c
-@@ -0,0 +1,14 @@
-+#include <stdlib.h>
-+#include "../dietelfinfo.h"
-+
-+__diet_elf_addr_t *__get_elf_aux_value(unsigned int tag)
-+{
-+  extern __diet_elf_addr_t const * const	__elfinfo;
-+  __diet_elf_addr_t				*aux_ptr;
-+
-+  for (aux_ptr = __elfinfo; aux_ptr[0]!=AT_NULL; aux_ptr += 2)
-+    if (aux_ptr[0]==tag)
-+      return aux_ptr+1;
-+
-+  return NULL;
-+}
+diff --git a/lib/stackgap.c b/lib/stackgap.c
+index 0149bbe..49ad489 100644
+--- a/lib/stackgap.c
++++ b/lib/stackgap.c
+@@ -6,6 +6,7 @@
+ #include <endian.h>
+ #include <elf.h>
+ #include "dietfeatures.h"
++#include "dietelfinfo.h"
+ 
+ extern int main(int argc,char* argv[],char* envp[]);
+ 
+@@ -30,6 +31,7 @@ static void findtlsdata(long* auxvec) {
+   Elf32_Phdr* x=0;
+ #endif
+   size_t i,n;
++#ifndef WANT_ELFINFO
+   while (*auxvec) {
+     if (auxvec[0]==3) {
+       x=(void*)auxvec[1];
+@@ -37,6 +39,10 @@ static void findtlsdata(long* auxvec) {
+     }
+     auxvec+=2;
+   } /* if we don't find the entry, the kernel let us down */
++#else
++  (void)auxvec;
++  x = __get_elf_aux_value(AT_PHDR);
++#endif
+   if (!x) return;	/* a kernel this old does not support thread local storage anyway */
+   n=x->p_memsz/sizeof(*x);
+   for (i=1; i<n; ++i)
+@@ -90,6 +96,7 @@ static void setup_tls(tcbhead_t* mainthread) {
+ }
+ #endif
+ 
++#ifndef WANT_ELFINFO
+ static void* find_rand(long* x) {
+   while (*x) {
+     if (*x==25)
+@@ -98,20 +105,27 @@ static void* find_rand(long* x) {
+   }
+   return NULL;
+ }
++#endif
+ 
+ int stackgap(int argc,char* argv[],char* envp[]);
+ int stackgap(int argc,char* argv[],char* envp[]) {
+ #if defined(WANT_STACKGAP) || defined(WANT_SSP) || defined(WANT_TLS)
+-  long* auxvec=(long*)envp;
+   char* rand;
+   char* tlsdata;
++#ifndef WANT_ELFINFO
++  long* auxvec=(long*)envp;
+   while (*auxvec) ++auxvec; ++auxvec;	/* skip envp to get to auxvec */
++#endif
+ #ifdef WANT_STACKGAP
+   unsigned short s;
+ #endif
+ #if defined(WANT_STACKGAP) || defined(WANT_SSP)
+   volatile char* gap;
++#ifndef WANT_ELFINFO
+   rand=find_rand(auxvec);
++#else
++  rand = __get_elf_aux_value(25);
++#endif
+   if (!rand) {
+     char myrand[10];
+     int fd=open("/dev/urandom",O_RDONLY);
+@@ -132,7 +146,11 @@ int stackgap(int argc,char* argv[],char* envp[]) {
+ #endif
+ 
+ #if defined(WANT_SSP) || defined(WANT_TLS)
++#ifndef WANT_ELFINFO
+   findtlsdata(auxvec);
++#else
++  findtlsdata(NULL);
++#endif
+   tlsdata=alloca(__tmemsize+sizeof(tcbhead_t));
+   memcpy(tlsdata,__tdataptr,__tdatasize);
+   memset(tlsdata+__tdatasize,0,__tmemsize-__tdatasize);
 diff --git a/libcruft/getpagesize.c b/libcruft/getpagesize.c
-index 536d3dc..80f476b 100644
+index 5ff8973..80f476b 100644
 --- a/libcruft/getpagesize.c
 +++ b/libcruft/getpagesize.c
-@@ -2,14 +2,22 @@
+@@ -1,25 +1,23 @@
+ #include <sys/types.h>
  #include <sys/ipc.h>
  #include <sys/shm.h>
+-/* for environ: */
+-#include <stdlib.h>
  
 -#ifndef PAGE_SIZE
 -#define PAGE_SIZE 4096
@@ -519,14 +603,21 @@
  
 -size_t __libc_getpagesize(void);
  size_t __libc_getpagesize(void) {
--  return PAGE_SIZE;
+-  long* x=(long*)environ;
+-  int fd;
+-  while (*x) ++x; ++x;	/* skip envp to get to auxvec */
+-  while (*x) {
+-    if (*x==6)
+-      return x[1];
+-    x+=2;
 +#ifdef WANT_DYN_PAGESIZE
 +  static size_t	pgsz;
 +
 +  if (__unlikely(pgsz==0)) {
 +    __diet_elf_addr_t	*v = __get_elf_aux_value(AT_PAGESZ);
 +    pgsz = *v;	/* causes segfault when 'v==NULL' */
-+  }
+   }
+-  return PAGE_SIZE;
 +
 +  return pgsz;
 +#else
@@ -579,7 +670,7 @@
    case _SC_ARG_MAX:
      return ARG_MAX;
 diff --git a/mips/start.S b/mips/start.S
-index 57144b3..4c659a6 100644
+index 57144b3..3cf3433 100644
 --- a/mips/start.S
 +++ b/mips/start.S
 @@ -47,6 +47,15 @@ __start:
@@ -589,9 +680,9 @@
 +#ifdef WANT_ELFINFO
 +#  warning "MAKE ME MIPS CODE!"
 +1:	addu	$a2, $a2, 4	/* increment envp */
-+	lw	$4, -4($a2)     /* load envp[-1]; TODO: is $4 a proper 
++	lw	$4, -4($a2)     /* load envp[-1]; TODO: is $4 a proper
 +				   temporary register? */
-+	bnz	1b		/* ... until envp[-1]==NULL 
++	bnz	1b		/* ... until envp[-1]==NULL
 +				   TODO: use proper 'bnz' operation */
 +	sw	$a2, __elfinfo
 +#endif
@@ -599,7 +690,7 @@
  	la	$25, exit
  	move	$4,$2
 diff --git a/parisc/start.S b/parisc/start.S
-index 69d9cce..b5d8793 100644
+index 69d9cce..894255c 100644
 --- a/parisc/start.S
 +++ b/parisc/start.S
 @@ -34,6 +34,16 @@ _start:
@@ -611,16 +702,16 @@
 +1:	add %r20, %r19, %r19		; envp += 4
 +	ldw -4(0,%r19), %r21		; load envp[-4] into %r21
 +	comibf =,0, 0,%21,1b		; compare %21 with 0 without nullification
-+ 
++
 +	ldil LP%__elfinfo, %r19
 +	ldo RP%__elfinfo(%r19), %r19
-+#endif	
++#endif
 +
  	/* Expand the stack to store the 5th through 7th args */
  	ldo 64(%sp), %sp
  
 diff --git a/ppc/start.S b/ppc/start.S
-index 771f1ad..eb62efb 100644
+index 771f1ad..3b5cab1 100644
 --- a/ppc/start.S
 +++ b/ppc/start.S
 @@ -31,6 +31,15 @@ _start:
@@ -632,7 +723,7 @@
 +	addi	5, 5, 4
 +	cmpwi	15,0
 +	bne	1b
-+	
++
 +	stw	5,__elfinfo at l(14)
 +#endif
 +
@@ -660,7 +751,7 @@
  /* #warning dynamic */
  	mr	6,7
 diff --git a/s390/start.S b/s390/start.S
-index c0f971f..1d9106a 100644
+index c0f971f..585faf7 100644
 --- a/s390/start.S
 +++ b/s390/start.S
 @@ -30,6 +30,17 @@ _start:
@@ -673,7 +764,7 @@
 +	l	%r12, -4(0,%r4)	# load envp[-1] into %r12
 +	or	%r12, %r12	# test %r12 for NULL
 +	brc	1, 1b
-+  
++
 +	ahi	%r1, 4
 +	st	%r4,0(%r1)
 +#endif
@@ -682,7 +773,7 @@
  	l	%r1,0(%r13)
  	basr	%r14,%r1
 diff --git a/s390x/start.S b/s390x/start.S
-index 25895a6..51d4604 100644
+index 25895a6..15ad1f9 100644
 --- a/s390x/start.S
 +++ b/s390x/start.S
 @@ -26,6 +26,17 @@ _start:
@@ -698,7 +789,7 @@
 +
 +	aghi	%r13, 8
 +	stg	%r4,0(%r13)
-+#endif	
++#endif
 +
  /* call main or _dyn_start */
  #ifdef WANT_DYNAMIC
@@ -773,7 +864,7 @@
     address of the shared library termination function, which will be
     registered with atexit(). If we are statically linked, this will
 diff --git a/syscalls.s/environ.S b/syscalls.s/environ.S
-index a4dd95e..78a17de 100644
+index a4dd95e..294f2d4 100644
 --- a/syscalls.s/environ.S
 +++ b/syscalls.s/environ.S
 @@ -1,6 +1,7 @@
@@ -784,17 +875,13 @@
  
  .type environ,object
  .weak environ
-@@ -15,3 +16,22 @@ environ:
+@@ -15,3 +16,18 @@ environ:
  #endif
  .size environ,.-environ
  .size __environ,.-__environ
 +
-+/* __elfinfo will be a copy of __environ after startup.  Later, it will be
-+   updated by __get_elf_aux_value() to point to the terminating NULL of the
-+   environment.
-+	
-+   Startup code assumes that __elfinfo is located immediately after
-+   __environ. */
++/* __elfinfo will be initialized in start.S to point to the
++   terminating NULL of the environment. */
 +
 +#ifdef WANT_ELFINFO
 +.type __elfinfo,object
@@ -919,7 +1006,7 @@
 +  return err;
 +}
 diff --git a/x86_64/start.S b/x86_64/start.S
-index adc461a..3915e33 100644
+index adc461a..8b4f3c9 100644
 --- a/x86_64/start.S
 +++ b/x86_64/start.S
 @@ -12,12 +12,28 @@ _start:
@@ -933,7 +1020,7 @@
 +#else
 +	leaq	environ(%rip), %rax
 +#endif
-+  	movq	%rdx, (%rax)	/* environ */
++	movq	%rdx, (%rax)	/* environ */
 +
 +1:	add	$8, %rdx	/* increment envp */
 +	cmpq	$0, -8(%rdx)	/* load envp[-1] */
@@ -952,5 +1039,5 @@
  #ifdef PROFILING
  	pushq	%rdi			/* save reg args */
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-printFG.patch:

Index: dietlibc-0.31-printFG.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-printFG.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dietlibc-0.31-printFG.patch	18 Oct 2008 17:04:19 -0000	1.7
+++ dietlibc-0.31-printFG.patch	1 Mar 2009 11:53:24 -0000	1.8
@@ -1,4 +1,4 @@
-From cd0eb2c9f17cbc1b70c7c60aa5b046cd2cc041c9 Mon Sep 17 00:00:00 2001
+From a38148e35b746f3325d39aca189a38e808c5585e Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:39:23 +0200
 Subject: [PATCH] Fixes/enhancements for INF/NAN handling in printf()
@@ -271,5 +271,5 @@
    return EXIT_SUCCESS;
  }
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-stacksmash-dyn.patch:

Index: dietlibc-0.31-stacksmash-dyn.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-stacksmash-dyn.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31-stacksmash-dyn.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31-stacksmash-dyn.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 9ae9c692418d33761d6affa5bbf1784c157955cb Mon Sep 17 00:00:00 2001
+From 62f02d841ea2fb19e365af01892e793ed923ce06 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:57:09 +0200
 Subject: [PATCH] __stack_chk_fail_local function
@@ -22,5 +22,5 @@
  /* earlier versions of ProPolice actually gave the address and function
   * name as arguments to the handler, so it could print some useful
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-stacksmash.patch:

Index: dietlibc-0.31-stacksmash.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-stacksmash.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31-stacksmash.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31-stacksmash.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From 25487e3bafa653890f2fb36f5615a420cd0c46b8 Mon Sep 17 00:00:00 2001
+From f8b1f860c0038613c31b800ff0466fc1c4e25823 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:56:07 +0200
 Subject: [PATCH] Enhanced __stack_chk_fail
@@ -50,5 +50,5 @@
 +	  *(char *)0 = 0;
  }
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31-testsuite.patch:

Index: dietlibc-0.31-testsuite.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31-testsuite.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dietlibc-0.31-testsuite.patch	18 Oct 2008 17:04:19 -0000	1.6
+++ dietlibc-0.31-testsuite.patch	1 Mar 2009 11:53:24 -0000	1.7
@@ -1,4 +1,4 @@
-From 103eca647519cfafcc7a125bd21b0413b3e81f5a Mon Sep 17 00:00:00 2001
+From 02a0efbc861696460826282e5d0c1e706644991a Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:41:23 +0200
 Subject: [PATCH] Several testsuite fixes/enhancments
@@ -457,5 +457,5 @@
  	  printf ("not all of `%s' read\n", day_tests[i].input);
  	  result = 1;
 -- 
-1.5.5.1
+1.6.0.6
 

dietlibc-0.31.20080212-teststdout.patch:

Index: dietlibc-0.31.20080212-teststdout.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc-0.31.20080212-teststdout.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dietlibc-0.31.20080212-teststdout.patch	18 Oct 2008 17:04:19 -0000	1.3
+++ dietlibc-0.31.20080212-teststdout.patch	1 Mar 2009 11:53:24 -0000	1.4
@@ -1,4 +1,4 @@
-From c86767c4a29b74a1e9bafb5e62048304afc475a2 Mon Sep 17 00:00:00 2001
+From fd63f368885bbb3e637866a2651348cfce7f69d2 Mon Sep 17 00:00:00 2001
 From: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
 Date: Sat, 19 Apr 2008 17:45:11 +0200
 Subject: [PATCH] Use stdout instead of stderr in testsuite
@@ -63,5 +63,5 @@
      _exit(23);
    }
 -- 
-1.5.5.1
+1.6.0.6
 


Index: dietlibc.spec
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/dietlibc.spec,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- dietlibc.spec	24 Feb 2009 11:46:39 -0000	1.60
+++ dietlibc.spec	1 Mar 2009 11:53:24 -0000	1.61
@@ -4,10 +4,10 @@
 ## --with dynamic   ...  enable dynamic lib support
 
 
-%global snapshot	20081017
+%global snapshot	20090228
 %global pkglibdir	%_prefix/lib/dietlibc
 
-%ifarch %ix86 x86_64
+%ifarch %ix86 x86_64 ppc ppc64
 %bcond_without		ssp
 %else
 %bcond_with		ssp
@@ -54,6 +54,7 @@
 Patch47:	dietlibc-0.31-lcctime.patch
 Patch48:	dietlibc-0.31-implicitfunc.patch
 Patch49:	dietlibc-0.31-noreturn.patch
+Patch50:	dietlibc-0.31-no-stack-protector.patch
 BuildRoot:	%_tmppath/%name-%version-%release-buildroot
 %{?with_dynamic:Requires:	dietlibc-lib = %version-%release}
 %{!?with_dynamic:Obsoletes:	dietlibc-lib < %version-%release}
@@ -109,7 +110,7 @@
 %patch47 -p1 -b .lcctime
 %patch48 -p1 -b .implicitfunc
 %patch49 -p1 -b .noreturn
-
+%patch50 -p1 -b .no-stack-protector
 
 %if %{without ssp}
 %patch20 -p1 -b .nostackprotector
@@ -197,6 +198,11 @@
 
 
 %changelog
+* Sun Mar  1 2009 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.31-7.20090228
+- updated to 20090228
+- updated patches
+- enabled SSP for ppc + ppc64
+
 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.31-7.20081017
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/devel/sources,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sources	18 Oct 2008 17:06:02 -0000	1.12
+++ sources	1 Mar 2009 11:53:24 -0000	1.13
@@ -1 +1 @@
-103646fc6bfdfa0865cd18d7d4ec3d28  dietlibc-0.31.20081017.tar.bz2
+e627aa62e21a812add91bd7a2b7d9e05  dietlibc-0.31.20090228.tar.bz2




More information about the fedora-extras-commits mailing list