about summary refs log tree commit diff
path: root/sysdeps/hppa
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-28 05:28:44 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-28 05:28:44 +0000
commit0742e48e18a42177d1db91d7ef88967deb544051 (patch)
treebca5b8710203c602487926a8eb40fa1815c438b7 /sysdeps/hppa
parent0e312a828297d11d5eee354bbf8a564c6f12c0d4 (diff)
downloadglibc-0742e48e18a42177d1db91d7ef88967deb544051.tar.gz
glibc-0742e48e18a42177d1db91d7ef88967deb544051.tar.xz
glibc-0742e48e18a42177d1db91d7ef88967deb544051.zip
Update.
2002-09-27  Ulrich Drepper  <drepper@redhat.com>

	* locales/zh_TW: Use shorter forms for abday and day.
	Patch by Rex Tsai <chihchun@kalug.linux.org.tw>.
Diffstat (limited to 'sysdeps/hppa')
-rw-r--r--sysdeps/hppa/dl-machine.h48
1 files changed, 46 insertions, 2 deletions
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index f70b2b3e5e..9cc10c40f7 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -628,11 +628,55 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
   *reloc_addr = value;
 }
 
+#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
+  elf_machine_rel_relative (map, l_addr, relative,			      \
+			    (void *) (l_addr + relative->r_offset))
+
+/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with
+   ELF32_R_SYM (info) == 0 for a similar purpose.  */
 static inline void
-elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
+			   const Elf32_Rela *reloc,
 			   Elf32_Addr *const reloc_addr)
 {
-  /* XXX Nothing to do.  There is no relative relocation, right?  */
+  unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
+  Elf32_Addr value;
+
+  value = l_addr + reloc->r_addend;
+
+  if (ELF32_R_SYM (reloc->r_info) != 0)
+    asm volatile ("iitlbp	%r0,(%r0)");  /* Crash. */
+
+  switch (r_type)
+    {
+    case R_PARISC_DIR32:
+      /* .eh_frame can have unaligned relocs.  */
+      if ((unsigned long) reloc_addr & 3)
+	{
+	  char *rel_addr = (char *) reloc_addr;
+	  rel_addr[0] = value >> 24;
+	  rel_addr[1] = value >> 16;
+	  rel_addr[2] = value >> 8;
+	  rel_addr[3] = value;
+	  return;
+	}
+      break;
+
+    case R_PARISC_PLABEL32:
+      break;
+
+    case R_PARISC_IPLT:
+      elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
+      return;
+
+    case R_PARISC_NONE:
+      return;
+
+    default:
+      _dl_reloc_bad_type (map, r_type, 0);
+    }
+
+  *reloc_addr = value;
 }
 
 static inline void