Bug#548842: Apt alignment trap.

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Bug#548842: Apt alignment trap.

by martinwguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A patch has turned up for glibc-2.9. I'm trying it on eglibc-2.10...
See http://sourceware.org/ml/crossgcc/2009-11/msg00008.html

--- glibc-ports-2.9/sysdeps/arm/dl-machine.h.orig 2009-11-03
22:03:57.000000000 +0100
+++ glibc-ports-2.9/sysdeps/arm/dl-machine.h 2009-11-03 22:11:45.000000000 +0100
@@ -568,13 +568,22 @@
 }
 # endif

+union arm_unaligned_data {
+  Elf32_Addr l_addr;
+} __attribute__ ((packed));
+
 auto inline void
 __attribute__ ((always_inline))
 elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
   void *const reloc_addr_arg)
 {
-  Elf32_Addr *const reloc_addr = reloc_addr_arg;
-  *reloc_addr += l_addr;
+  if (((long)reloc_addr_arg) & 0x3) {
+    union arm_unaligned_data *const lpdata = reloc_addr_arg;
+    lpdata->l_addr += l_addr;
+  } else {
+    Elf32_Addr *const reloc_addr = reloc_addr_arg;
+    *reloc_addr += l_addr;
+  }
 }

 # ifndef RTLD_BOOTSTRAP



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#548842: Apt alignment trap.

by martinwguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/4/09, Martin Guy <martinwguy@...> wrote:
> A patch has turned up for glibc-2.9. I'm trying it on eglibc-2.10...
>  See http://sourceware.org/ml/crossgcc/2009-11/msg00008.html
>
>  --- glibc-ports-2.9/sysdeps/arm/dl-machine.h.orig

Nope. That doesn't fix this problem



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...