ooo-build r11230 - trunk/patches/test



Author: michael
Date: Wed Jan  9 12:45:57 2008
New Revision: 11230
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11230&view=rev

Log:
backup initial work.


Added:
   trunk/patches/test/glibc-vt-reloc.diff

Added: trunk/patches/test/glibc-vt-reloc.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/glibc-vt-reloc.diff	Wed Jan  9 12:45:57 2008
@@ -0,0 +1,110 @@
+diff -u -r -x cc-nptl -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' /usr/src/packages/BUILD/glibc-2.6.1/elf/dl-reloc.c glibc-2.6.1/elf/dl-reloc.c
+--- /usr/src/packages/BUILD/glibc-2.6.1/elf/dl-reloc.c	2007-05-18 09:37:39.000000000 +0100
++++ glibc-2.6.1/elf/dl-reloc.c	2008-01-09 12:30:34.000000000 +0000
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include "dynamic-link.h"
+ 
++#define SUSEIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + \
++			 DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSE_TAGIDX (sym))
++
+ /* Statistics function.  */
+ #ifdef SHARED
+ # define bump_num_cache_relocations() ++GL(dl_num_cache_relocations)
+@@ -133,6 +136,25 @@
+ 	  '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
+ }
+ 
++/* process vtable / block copy relocations */
++static void
++_dl_perform_vtrelocs (struct link_map *map, struct r_scope_elem *scope[])
++{
++  u_int32_t *ptr;
++
++  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
++    _dl_debug_printf ("new vtcopy-reloc processing\n");
++
++  ptr = map->l_info[SUSEIDX(DT_SUSE_VTRELOC)];
++  if (ptr == NULL) {
++      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
++          _dl_debug_printf ("no vtreloc section in '%s'\n", map->l_name);
++      return;
++  }
++  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
++      _dl_debug_printf ("vtreloc section found in '%s' at %p (%p)\n",
++                        map->l_name, ptr, (ptr - map->l_addr));
++}
+ 
+ void
+ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
+@@ -293,6 +315,8 @@
+ #endif
+   }
+ 
++  _dl_perform_vtrelocs (l, scope);
++
+   /* Mark the object so we know this work has been done.  */
+   l->l_relocated = 1;
+ 
+diff -u -r -x cc-nptl -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' /usr/src/packages/BUILD/glibc-2.6.1/elf/dynamic-link.h glibc-2.6.1/elf/dynamic-link.h
+--- /usr/src/packages/BUILD/glibc-2.6.1/elf/dynamic-link.h	2006-07-10 22:52:18.000000000 +0100
++++ glibc-2.6.1/elf/dynamic-link.h	2008-01-09 12:19:55.000000000 +0000
+@@ -65,6 +65,10 @@
+ #ifndef VERSYMIDX
+ # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
+ #endif
++#ifndef SUSEIDX
++# define SUSEIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + \
++        DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSE_TAGIDX (sym))
++#endif
+ 
+ 
+ /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
+@@ -104,6 +108,9 @@
+       else if ((Elf32_Word) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
+ 	info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ 	     + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
++      else if (dyn->d_tag >= DT_SUSE_LO &&
++	       dyn->d_tag < DT_SUSE_LO + DT_SUSENUM)
++        info[SUSEIDX(dyn->d_tag)] = dyn;
+       ++dyn;
+     }
+ 
+@@ -143,6 +150,7 @@
+ # endif
+       ADJUST_DYN_INFO (DT_JMPREL);
+       ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM));
++      ADJUST_DYN_INFO (SUSEIDX(DT_SUSE_VTRELOC));
+       ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM
+ 		       + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM);
+ # undef ADJUST_DYN_INFO
+diff -u -r -x cc-nptl -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' /usr/src/packages/BUILD/glibc-2.6.1/elf/elf.h glibc-2.6.1/elf/elf.h
+--- /usr/src/packages/BUILD/glibc-2.6.1/elf/elf.h	2007-05-18 09:37:39.000000000 +0100
++++ glibc-2.6.1/elf/elf.h	2008-01-09 12:28:45.000000000 +0000
+@@ -734,6 +734,14 @@
+ #define DT_VERSIONTAGIDX(tag)	(DT_VERNEEDNUM - (tag))	/* Reverse order! */
+ #define DT_VERSIONTAGNUM 16
+ 
++/* SUSE specific pieces - at a random OS specific address, after
++   previous 2 (direct/hashvals) development sections  */
++#define DT_SUSE_LO 0x6cbdd030 + 2
++#define DT_SUSE_VTRELOC   DT_SUSE_LO
++#define DT_SUSE_HI 0x6cbdd040
++#define DT_SUSE_TAGIDX(tag) (tag - DT_SUSE_LO)
++#define DT_SUSENUM 1
++
+ /* Sun added these machine-independent extensions in the "processor-specific"
+    range.  Be compatible.  */
+ #define DT_AUXILIARY    0x7ffffffd      /* Shared object to load before self */
+diff -u -r -x cc-nptl -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' /usr/src/packages/BUILD/glibc-2.6.1/include/link.h glibc-2.6.1/include/link.h
+--- /usr/src/packages/BUILD/glibc-2.6.1/include/link.h	2007-08-03 14:57:06.000000000 +0100
++++ glibc-2.6.1/include/link.h	2008-01-09 12:30:17.000000000 +0000
+@@ -121,7 +121,7 @@
+        are indexed by DT_ADDRTAGIDX(tagvalue), see <elf.h>.  */
+ 
+     ElfW(Dyn) *l_info[DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM
+-		      + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM];
++		      + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSENUM];
+     const ElfW(Phdr) *l_phdr;	/* Pointer to program header table in core.  */
+     ElfW(Addr) l_entry;		/* Entry point location.  */
+     ElfW(Half) l_phnum;		/* Number of program header entries.  */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]