summaryrefslogtreecommitdiffstats
path: root/meta/packages/prelink/prelink-20061027/armfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/prelink/prelink-20061027/armfix.patch')
-rw-r--r--meta/packages/prelink/prelink-20061027/armfix.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/packages/prelink/prelink-20061027/armfix.patch b/meta/packages/prelink/prelink-20061027/armfix.patch
new file mode 100644
index 0000000000..87767b9cc7
--- /dev/null
+++ b/meta/packages/prelink/prelink-20061027/armfix.patch
@@ -0,0 +1,67 @@
1Index: prelink-0.0.20061027/src/arch-arm.c
2===================================================================
3--- prelink-0.0.20061027.orig/src/arch-arm.c 2008-06-04 19:41:07.000000000 +0100
4+++ prelink-0.0.20061027/src/arch-arm.c 2008-06-04 19:41:59.000000000 +0100
5@@ -145,13 +145,12 @@
6 error (0, 0, "%s: R_ARM_PC24 relocs with non-zero addend should not be present in prelinked REL sections",
7 dso->filename);
8 return 1;
9- /* DTPOFF32, DTPMOD32 and TPOFF32 is impossible to predict unless prelink
10- sets the rules. Also for DTPOFF32/TPOFF32 there is REL->RELA problem. */
11+ /* DTPMOD32 is impossible to predict unless prelink sets the rules.
12+ DTPOFF32/TPOFF32 are converted REL->RELA. */
13 case R_ARM_TLS_DTPOFF32:
14- if (dso->ehdr.e_type == ET_EXEC)
15- error (0, 0, "%s: R_ARM_TLS_DTPOFF32 relocs should not be present in prelinked ET_EXEC REL sections",
16+ error (0, 0, "%s: R_ARM_TLS_DTPOFF32 relocs should not be present in prelinked REL section",
17 dso->filename);
18- break;
19+ return 1;
20 case R_ARM_TLS_DTPMOD32:
21 if (dso->ehdr.e_type == ET_EXEC)
22 {
23@@ -161,9 +160,11 @@
24 }
25 break;
26 case R_ARM_TLS_TPOFF32:
27- if (dso->ehdr.e_type == ET_EXEC)
28+ if (dso->ehdr.e_type == ET_EXEC) {
29 error (0, 0, "%s: R_ARM_TLS_TPOFF32 relocs should not be present in prelinked ET_EXEC REL sections",
30 dso->filename);
31+ return 1;
32+ }
33 break;
34 case R_ARM_COPY:
35 if (dso->ehdr.e_type == ET_EXEC)
36@@ -216,8 +217,7 @@
37 (read_ule32 (dso, rela->r_offset) & 0xff000000) | val);
38 break;
39 case R_ARM_TLS_DTPOFF32:
40- if (dso->ehdr.e_type == ET_EXEC)
41- write_le32 (dso, rela->r_offset, value + rela->r_addend);
42+ write_le32 (dso, rela->r_offset, value + rela->r_addend);
43 break;
44 /* DTPMOD32 and TPOFF32 are impossible to predict unless prelink
45 sets the rules. */
46@@ -521,7 +521,7 @@
47 && (conflict->reloc_class != RTYPE_CLASS_TLS
48 || conflict->lookup.tls == NULL))
49 {
50- error (0, 0, "%s: R_386_TLS not resolving to STT_TLS symbol",
51+ error (0, 0, "%s: R_ARM_TLS not resolving to STT_TLS symbol",
52 dso->filename);
53 return 1;
54 }
55@@ -637,8 +637,11 @@
56 case R_ARM_PC24:
57 return 1;
58 case R_ARM_TLS_DTPOFF32:
59+ /* We can prelink these fields, and the addend is relative
60+ to the symbol value. A RELA entry is needed. */
61+ return 1;
62 case R_ARM_TLS_TPOFF32:
63- /* In shared libraries {D,}TPOFF32 is changed always into
64+ /* In shared libraries TPOFF32 is changed always into
65 conflicts, for executables we need to preserve
66 original addend. */
67 if (dso->ehdr.e_type == ET_EXEC) {