summaryrefslogtreecommitdiffstats
path: root/meta/packages/prelink
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-06-11 19:24:14 +0000
committerRichard Purdie <richard@openedhand.com>2008-06-11 19:24:14 +0000
commit5d40cb0d53331abc7c8b2ec0b9923e16a2f3d2fd (patch)
treea35beef190a692b3dbd04137ac833b74577803bb /meta/packages/prelink
parent7f0ef9ed2df2b74fa7ea0e2355b9de7b2328993d (diff)
downloadpoky-5d40cb0d53331abc7c8b2ec0b9923e16a2f3d2fd.tar.gz
prelink: Add fix to correctly handle R_ARM_TLS_DTPOFF32 symbols
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4622 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/prelink')
-rw-r--r--meta/packages/prelink/prelink-20061027/armfix.patch67
-rw-r--r--meta/packages/prelink/prelink_20061027.bb5
2 files changed, 70 insertions, 2 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) {
diff --git a/meta/packages/prelink/prelink_20061027.bb b/meta/packages/prelink/prelink_20061027.bb
index 9ef0fd2e38..22c6c72400 100644
--- a/meta/packages/prelink/prelink_20061027.bb
+++ b/meta/packages/prelink/prelink_20061027.bb
@@ -4,7 +4,7 @@ DESCRIPTION = " The prelink package contains a utility which modifies ELF shared
4and executables, so that far fewer relocations need to be resolved at \ 4and executables, so that far fewer relocations need to be resolved at \
5runtime and thus programs come up faster." 5runtime and thus programs come up faster."
6LICENSE = "GPL" 6LICENSE = "GPL"
7PR = "r7" 7PR = "r8"
8 8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 9SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \
10 file://prelink.conf \ 10 file://prelink.conf \
@@ -13,7 +13,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \
13 13
14TARGET_OS_ORIG := "${TARGET_OS}" 14TARGET_OS_ORIG := "${TARGET_OS}"
15OVERRIDES_append = ":${TARGET_OS_ORIG}" 15OVERRIDES_append = ":${TARGET_OS_ORIG}"
16SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch;patch=1" 16SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch;patch=1 \
17 file://armfix.patch;patch=1 "
17 18
18S = "${WORKDIR}/prelink-0.0.${PV}" 19S = "${WORKDIR}/prelink-0.0.${PV}"
19 20