This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hppa dynamic linker fix for g++ 3.0



With gcc 3.0's new exception handling mechanism, relocations can now be
placed at addresses which are not aligned at a multiple of 4.  This patch
allows that to work.

2001-06-17  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/hppa/dl-machine.h (elf_machine_rela): handle relocs
	at unaligned address.

--- glibc-223/sysdeps/hppa/dl-machine.h	Fri Jun 15 06:56:01 2001
+++ glibc/sysdeps/hppa/dl-machine.h	Sun Jun 17 07:08:45 2001
@@ -529,7 +536,16 @@
       if (map == &_dl_rtld_map)
 	return;
 #endif
-      /* Otherwise, nothing more to do here. */
+      /* .eh_frame can have unaligned relocs.  */
+      if (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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]