SOURCES: prelink-fsync.patch (NEW), prelink-init.patch (NEW), prel...

glen glen at pld-linux.org
Wed Feb 13 23:13:39 CET 2008


Author: glen                         Date: Wed Feb 13 22:13:39 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- patches from debian

---- Files affected:
SOURCES:
   prelink-fsync.patch (NONE -> 1.1)  (NEW), prelink-init.patch (NONE -> 1.1)  (NEW), prelink-md5sha.patch (NONE -> 1.1)  (NEW), prelink-prelink.h.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/prelink-fsync.patch
diff -u /dev/null SOURCES/prelink-fsync.patch:1.1
--- /dev/null	Wed Feb 13 23:13:39 2008
+++ SOURCES/prelink-fsync.patch	Wed Feb 13 23:13:34 2008
@@ -0,0 +1,23 @@
+diff -urN prelink-0.0.20060522.orig/src/cache.c prelink-0.0.20060522/src/cache.c
+--- prelink-0.0.20060522.orig/src/cache.c	2006-05-22 12:07:57.000000000 +0000
++++ prelink-0.0.20060522/src/cache.c	2006-05-24 15:18:40.000000000 +0000
+@@ -627,6 +627,7 @@
+   if (write (fd, &cache, sizeof (cache)) != sizeof (cache)
+       || write (fd, data, len) != len
+       || fchmod (fd, 0644)
++      || fsync (fd)
+       || close (fd)
+       || rename (prelink_cache_tmp, prelink_cache))
+     {
+diff -urN prelink-0.0.20060522.orig/src/dso.c prelink-0.0.20060522/src/dso.c
+--- prelink-0.0.20060522.orig/src/dso.c	2006-05-22 14:02:34.000000000 +0000
++++ prelink-0.0.20060522/src/dso.c	2006-05-24 15:19:09.000000000 +0000
+@@ -1601,6 +1601,8 @@
+     }
+ 
+   elf_end (dso->elf);
++  if (dso_is_rdwr (dso))
++    fsync (dso->fd);
+   close (dso->fd);
+   if (dso->elfro)
+     {

================================================================
Index: SOURCES/prelink-init.patch
diff -u /dev/null SOURCES/prelink-init.patch:1.1
--- /dev/null	Wed Feb 13 23:13:39 2008
+++ SOURCES/prelink-init.patch	Wed Feb 13 23:13:34 2008
@@ -0,0 +1,62 @@
+diff -urN prelink-0.0.20041012.orig/src/main.c prelink-0.0.20041012/src/main.c
+--- prelink-0.0.20041012.orig/src/main.c	2004-09-30 16:07:57.000000000 +0000
++++ prelink-0.0.20041012/src/main.c	2004-11-16 00:39:28.000000000 +0000
+@@ -58,6 +58,8 @@
+ const char *prelink_conf = PRELINK_CONF;
+ const char *prelink_cache = PRELINK_CACHE;
+ const char *undo_output;
++int noreexecinit;
++time_t initctime;
+ 
+ const char *argp_program_version = "prelink 1.0";
+ 
+@@ -111,6 +113,7 @@
+   {"mmap-region-end",	OPT_MMAP_REG_END, "BASE_ADDRESS", OPTION_HIDDEN, "" },
+   {"seed",		OPT_SEED, "SEED", OPTION_HIDDEN, "" },
+   {"compute-checksum",	OPT_COMPUTE_CHECKSUM, 0, OPTION_HIDDEN, "" },
++  {"init",             'i', 0, 0,  "Do not re-execute init" },
+   { 0 }
+ };
+ 
+@@ -222,12 +225,29 @@
+     case OPT_COMPUTE_CHECKSUM:
+       compute_checksum = 1;
+       break;
++    case 'i':
++      noreexecinit=1;
++      break;
+     default:
+       return ARGP_ERR_UNKNOWN;
+     }
+   return 0;
+ }
+ 
++time_t get_ctime(const char *file) {
++  struct stat st;
++  if(stat(file,&st) == 0)
++    return st.st_ctime;
++  return 0;
++}
++
++void checkinit() {
++    if(initctime != get_ctime("/sbin/init")) {
++      printf("Executing /sbin/init U\n");
++      system("/sbin/init U");
++       }
++}
++
+ static struct argp argp = { options, parse_opt, "[FILES]", argp_doc };
+ 
+ int
+@@ -247,6 +267,11 @@
+ 
+   argp_parse (&argp, argc, argv, 0, &remaining, 0);
+ 
++  if(!noreexecinit) {
++    initctime = get_ctime("/sbin/init");
++       atexit(checkinit);
++  }
++
+   if (ld_library_path == NULL)
+     ld_library_path = getenv ("LD_LIBRARY_PATH");
+ 

================================================================
Index: SOURCES/prelink-md5sha.patch
diff -u /dev/null SOURCES/prelink-md5sha.patch:1.1
--- /dev/null	Wed Feb 13 23:13:39 2008
+++ SOURCES/prelink-md5sha.patch	Wed Feb 13 23:13:34 2008
@@ -0,0 +1,21 @@
+diff -urN prelink-0.0.20040908.orig/doc/prelink.8 prelink-0.0.20040908/doc/prelink.8
+--- prelink-0.0.20040908.orig/doc/prelink.8	2003-08-05 08:27:59.000000000 +0000
++++ prelink-0.0.20040908/doc/prelink.8	2004-10-01 14:43:24.000000000 +0000
+@@ -173,7 +173,7 @@
+ unprobable case of modified file and original file having the same digest
+ or checksum).
+ .TP
+-.B \-\-md5
++.B \-y \-\-md5
+ This is similar to
+ .I \-\-verify
+ option, except instead of outputing the content of the binary or library
+@@ -181,7 +181,7 @@
+ See
+ .BR md5sum (1).
+ .TP
+-.B \-\-sha
++.B \-y \-\-sha
+ This is similar to
+ .I \-\-verify
+ option, except instead of outputing the content of the binary or library

================================================================
Index: SOURCES/prelink-prelink.h.patch
diff -u /dev/null SOURCES/prelink-prelink.h.patch:1.1
--- /dev/null	Wed Feb 13 23:13:39 2008
+++ SOURCES/prelink-prelink.h.patch	Wed Feb 13 23:13:34 2008
@@ -0,0 +1,48 @@
+--- prelink-0.0.20030902.orig/src/prelink.h	2003-08-11 11:54:01.000000000 +0000
++++ prelink-0.0.20030902/src/prelink.h	2003-09-16 23:26:16.000000000 +0000
+@@ -26,6 +26,45 @@
+ #include <stdio.h>
+ #include <sys/stat.h>
+ 
++/* http://gcc.gnu.org/ml/gcc/2003-01/msg00922.html */
++#ifndef R_390_TLS_DTPMOD
++#define R_390_TLS_DTPMOD 54
++#define R_390_TLS_DTPOFF 55
++#define R_390_TLS_TPOFF  56
++#endif
++
++/* from http://www.cygwin.com/ml/libc-alpha/2003-02/msg00241.html */
++#ifndef R_PPC_TLS
++#define R_PPC_TLS		67
++#define R_PPC_DTPMOD32		68
++#define R_PPC_TPREL16		69
++#define R_PPC_TPREL16_LO	70
++#define R_PPC_TPREL16_HI	71
++#define R_PPC_TPREL16_HA	72
++#define R_PPC_TPREL32		73
++#define R_PPC_DTPREL16		74
++#define R_PPC_DTPREL16_LO	75
++#define R_PPC_DTPREL16_HI	76
++#define R_PPC_DTPREL16_HA	77
++#define R_PPC_DTPREL32		78
++#define R_PPC_GOT_TLSGD16	79
++#define R_PPC_GOT_TLSGD16_LO	80
++#define R_PPC_GOT_TLSGD16_HI	81
++#define R_PPC_GOT_TLSGD16_HA	82
++#define R_PPC_GOT_TLSLD16	83
++#define R_PPC_GOT_TLSLD16_LO	84
++#define R_PPC_GOT_TLSLD16_HI	85
++#define R_PPC_GOT_TLSLD16_HA	86
++#define R_PPC_GOT_TPREL16	87
++#define R_PPC_GOT_TPREL16_LO	88
++#define R_PPC_GOT_TPREL16_HI	89
++#define R_PPC_GOT_TPREL16_HA	90
++#define R_PPC_GOT_DTPREL16	91
++#define R_PPC_GOT_DTPREL16_LO	92
++#define R_PPC_GOT_DTPREL16_HI	93
++#define R_PPC_GOT_DTPREL16_HA	94
++#endif
++
+ #ifndef DT_GNU_LIBLIST
+ #define DT_GNU_LIBLIST		0x6ffffef9
+ #define DT_GNU_LIBLISTSZ	0x6ffffdf7
================================================================


More information about the pld-cvs-commit mailing list