Author: schizo
Date: 2006-02-10 02:47:50 +0000 (Fri, 10 Feb 2006)
New Revision: 1165

Added:
   glibc-package/trunk/debian/patches/hppa-pie-relocs.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Add hppa-pie-relocs.diff, thanks to Aurelien Jarno.  This
    fixes nscd on hppa.  (Closes: #350501)


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2006-02-09 02:53:42 UTC (rev 
1164)
+++ glibc-package/trunk/debian/changelog        2006-02-10 02:47:50 UTC (rev 
1165)
@@ -82,11 +82,13 @@
     - Remove glibc235-gcc4-hurd.diff
     - Delete several hunks from glibc235-gcc4-arm-inline.diff
     - Remove glibc235-gcc4-s390-inline.diff
+  * Add hppa-pie-relocs.diff, thanks to Aurelien Jarno.  This
+    fixes nscd on hppa.  (Closes: #350501)
 
   [ Daniel Jacobowitz ]
   * Remove mips-bits-syscall.diff, merged.
 
- -- Daniel Jacobowitz <[EMAIL PROTECTED]>  Wed,  8 Feb 2006 10:00:24 -0500
+ -- Clint Adams <[EMAIL PROTECTED]>  Thu,  9 Feb 2006 21:45:45 -0500
 
 glibc (2.3.5-13) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/hppa-pie-relocs.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa-pie-relocs.diff     2006-02-09 
02:53:42 UTC (rev 1164)
+++ glibc-package/trunk/debian/patches/hppa-pie-relocs.diff     2006-02-10 
02:47:50 UTC (rev 1165)
@@ -0,0 +1,120 @@
+2005-06-10  Randolph Chung  <[EMAIL PROTECTED]>
+
+        * elf/elf.h (R_PARISC_PLABEL21L, R_PARISC_PLABEL14R): Define.
+        * sysdeps/hppa/dl-machine.h (reassemble_21, reassemble_14): Define.
+        (elf_machine_rela): Handle R_PARISC_DIR21L/14R and
+        R_PARISC_PLABEL21L/14R relocations.
+
+===================================================================
+RCS file: /var/lib/cvs/glibc/elf/elf.h,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- glibc/elf/elf.h    2005/06/09 01:14:04     1.3
++++ glibc/elf/elf.h    2005/06/10 23:41:20     1.4
+@@ -1703,6 +1703,8 @@
+ #define R_PARISC_LTOFF_FPTR14R        62      /* LT-rel. fct ptr, right 14 
bits. */
+ #define R_PARISC_FPTR64               64      /* 64 bits function address.  */
+ #define R_PARISC_PLABEL32     65      /* 32 bits function address.  */
++#define R_PARISC_PLABEL21L    66      /* Left 21 bits of fct ptr.  */
++#define R_PARISC_PLABEL14R    70      /* Left 21 bits of fct ptr.  */
+ #define R_PARISC_PCREL64      72      /* 64 bits PC-rel. address.  */
+ #define R_PARISC_PCREL22F     74      /* 22 bits PC-rel. address.  */
+ #define R_PARISC_PCREL14WR    75      /* PC-rel. address, right 14 bits.  */
+
+===================================================================
+RCS file: /var/lib/cvs/glibc/sysdeps/hppa/dl-machine.h,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- glibc/sysdeps/hppa/dl-machine.h    2005/06/09 04:27:13     1.3
++++ glibc/sysdeps/hppa/dl-machine.h    2005/06/10 23:41:20     1.4
+@@ -223,7 +223,8 @@
+                 }
+               else
+               {
+-                if (_dl_name_match_p (GLRO(dl_profile), l))
++                if (GLRO(dl_profile) != NULL
++                    && _dl_name_match_p (GLRO(dl_profile), l))
+                   {
+                     /* This is the object we are looking for.  Say that
+                        we really want profiling and the timers are
+@@ -514,6 +515,18 @@
+ /* These are only actually used where RESOLVE_MAP is defined, anyway. */
+ #ifdef RESOLVE_MAP
+ 
++
++#define reassemble_21(as21) \
++  (  (((as21) & 0x100000) >> 20) \
++   | (((as21) & 0x0ffe00) >> 8) \
++   | (((as21) & 0x000180) << 7) \
++   | (((as21) & 0x00007c) << 14) \
++   | (((as21) & 0x000003) << 12))
++
++#define reassemble_14(as14) \
++  (  (((as14) & 0x1fff) << 1) \
++   | (((as14) & 0x2000) >> 13))
++
+ auto void __attribute__((always_inline))
+ elf_machine_rela (struct link_map *map, 
+                 const Elf32_Rela *reloc,
+@@ -573,6 +586,27 @@
+       }
+       break;
+ 
++    case R_PARISC_DIR21L:
++      {
++      unsigned int insn = *(unsigned int *)reloc_addr;
++        value = sym_map->l_addr + sym->st_value 
++              + ((reloc->r_addend + 0x1000) & -0x2000);
++      value = value >> 11;
++      insn = (insn &~ 0x1fffff) | reassemble_21 (value);
++      *(unsigned int *)reloc_addr = insn;
++      }
++      return;
++
++    case R_PARISC_DIR14R:
++      {
++      unsigned int insn = *(unsigned int *)reloc_addr;
++      value = ((sym_map->l_addr + sym->st_value) & 0x7ff) 
++              + (((reloc->r_addend & 0x1fff) ^ 0x1000) - 0x1000);
++      insn = (insn &~ 0x3fff) | reassemble_14 (value);
++      *(unsigned int *)reloc_addr = insn;
++      }
++      return;
++
+     case R_PARISC_PLABEL32:
+       /* Easy rule: If there is a symbol and it is global, then we
+          need to make a dynamic function descriptor.  Otherwise we
+@@ -591,6 +625,31 @@
+       value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) 
| 2);
+       break;
+ 
++    case R_PARISC_PLABEL21L:
++    case R_PARISC_PLABEL14R:
++      {
++      unsigned int insn = *(unsigned int *)reloc_addr;
++
++        if (__builtin_expect (sym == NULL, 0))
++          break;
++
++        value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, 
value) | 2);
++
++        if (r_type == R_PARISC_PLABEL21L)
++        {
++          value >>= 11;
++          insn = (insn &~ 0x1fffff) | reassemble_21 (value);
++        }
++        else
++        {
++          value &= 0x7ff;
++          insn = (insn &~ 0x3fff) | reassemble_14 (value);
++        }
++
++      *(unsigned int *)reloc_addr = insn;
++      }
++      return;
++
+     case R_PARISC_IPLT:
+       if (__builtin_expect (sym_map != NULL, 1))
+         {

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2006-02-09 02:53:42 UTC (rev 
1164)
+++ glibc-package/trunk/debian/patches/series   2006-02-10 02:47:50 UTC (rev 
1165)
@@ -117,3 +117,4 @@
 localedata/fix-unknown-symbols.diff
 localedata/first_weekday.diff
 localedata/sort-UTF8-first.diff -p0
+hppa-pie-relocs.diff -p1


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to