1 |
vapier 12/01/01 09:44:31 |
2 |
|
3 |
Added: 6250_all_glibc-2.14-arm-unaligned-reloc.patch |
4 |
Log: |
5 |
try to fix arm unaligned reloc issues #394237 |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 src/patchsets/glibc/2.14.1/6250_all_glibc-2.14-arm-unaligned-reloc.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14.1/6250_all_glibc-2.14-arm-unaligned-reloc.patch?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14.1/6250_all_glibc-2.14-arm-unaligned-reloc.patch?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: 6250_all_glibc-2.14-arm-unaligned-reloc.patch |
14 |
=================================================================== |
15 |
https://bugs.gentoo.org/394237 |
16 |
|
17 |
--- a/ports/sysdeps/arm/dl-machine.h |
18 |
+++ b/ports/sysdeps/arm/dl-machine.h |
19 |
@@ -413,6 +413,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, |
20 |
break; |
21 |
case R_ARM_ABS32: |
22 |
{ |
23 |
+ struct unaligned |
24 |
+ { |
25 |
+ Elf32_Addr x; |
26 |
+ } __attribute__((packed, may_alias)); |
27 |
# ifndef RTLD_BOOTSTRAP |
28 |
/* This is defined in rtld.c, but nowhere in the static |
29 |
libc.a; make the reference weak so static programs can |
30 |
@@ -431,7 +436,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, |
31 |
used while loading those libraries. */ |
32 |
value -= map->l_addr + refsym->st_value; |
33 |
# endif |
34 |
- *reloc_addr += value; |
35 |
+ /* Support relocations on mis-aligned offsets. */ |
36 |
+ ((struct unaligned *) reloc_addr)->x += value; |
37 |
break; |
38 |
} |
39 |
case R_ARM_TLS_DESC: |