diff options
Diffstat (limited to 'meta/packages/prelink')
-rw-r--r-- | meta/packages/prelink/prelink-20061027/arm_eabi.patch | 300 | ||||
-rw-r--r-- | meta/packages/prelink/prelink/prelink.conf (renamed from meta/packages/prelink/prelink-20061027/prelink.conf) | 0 | ||||
-rw-r--r-- | meta/packages/prelink/prelink/prelink.cron.daily (renamed from meta/packages/prelink/prelink-20061027/prelink.cron.daily) | 0 | ||||
-rw-r--r-- | meta/packages/prelink/prelink/prelink.default (renamed from meta/packages/prelink/prelink-20061027/prelink.default) | 0 | ||||
-rw-r--r-- | meta/packages/prelink/prelink_20100106.bb (renamed from meta/packages/prelink/prelink_20061027.bb) | 7 |
5 files changed, 3 insertions, 304 deletions
diff --git a/meta/packages/prelink/prelink-20061027/arm_eabi.patch b/meta/packages/prelink/prelink-20061027/arm_eabi.patch deleted file mode 100644 index 768d82e74c..0000000000 --- a/meta/packages/prelink/prelink-20061027/arm_eabi.patch +++ /dev/null | |||
@@ -1,300 +0,0 @@ | |||
1 | --- | ||
2 | src/arch-arm.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- | ||
3 | 1 file changed, 172 insertions(+), 5 deletions(-) | ||
4 | |||
5 | Index: prelink-0.0.20061027/src/arch-arm.c | ||
6 | =================================================================== | ||
7 | --- prelink-0.0.20061027.orig/src/arch-arm.c 2006-08-13 16:18:17.000000000 +0100 | ||
8 | +++ prelink-0.0.20061027/src/arch-arm.c 2008-06-12 10:46:12.000000000 +0100 | ||
9 | @@ -145,6 +145,27 @@ | ||
10 | error (0, 0, "%s: R_ARM_PC24 relocs with non-zero addend should not be present in prelinked REL sections", | ||
11 | dso->filename); | ||
12 | return 1; | ||
13 | + /* DTPMOD32 is impossible to predict unless prelink sets the rules. | ||
14 | + DTPOFF32/TPOFF32 are converted REL->RELA. */ | ||
15 | + case R_ARM_TLS_DTPOFF32: | ||
16 | + error (0, 0, "%s: R_ARM_TLS_DTPOFF32 relocs should not be present in prelinked REL section", | ||
17 | + dso->filename); | ||
18 | + return 1; | ||
19 | + case R_ARM_TLS_DTPMOD32: | ||
20 | + if (dso->ehdr.e_type == ET_EXEC) | ||
21 | + { | ||
22 | + error (0, 0, "%s: R_ARM_TLS_DTPMOD32 reloc in executable?", | ||
23 | + dso->filename); | ||
24 | + return 1; | ||
25 | + } | ||
26 | + break; | ||
27 | + case R_ARM_TLS_TPOFF32: | ||
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 | /* COPY relocs are handled specially in generic code. */ | ||
37 | @@ -195,6 +216,24 @@ | ||
38 | write_le32 (dso, rela->r_offset, | ||
39 | (read_ule32 (dso, rela->r_offset) & 0xff000000) | val); | ||
40 | break; | ||
41 | + case R_ARM_TLS_DTPOFF32: | ||
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 | + case R_ARM_TLS_DTPMOD32: | ||
47 | + if (dso->ehdr.e_type == ET_EXEC) | ||
48 | + { | ||
49 | + error (0, 0, "%s: R_ARM_TLS_DTPMOD32 reloc in executable?", | ||
50 | + dso->filename); | ||
51 | + return 1; | ||
52 | + } | ||
53 | + break; | ||
54 | + case R_ARM_TLS_TPOFF32: | ||
55 | + if (dso->ehdr.e_type == ET_EXEC && info->resolvetls) | ||
56 | + write_le32 (dso, rela->r_offset, | ||
57 | + value + rela->r_addend + info->resolvetls->offset); | ||
58 | + break; | ||
59 | case R_ARM_COPY: | ||
60 | if (dso->ehdr.e_type == ET_EXEC) | ||
61 | /* COPY relocs are handled specially in generic code. */ | ||
62 | @@ -315,6 +354,7 @@ | ||
63 | { | ||
64 | GElf_Addr value; | ||
65 | struct prelink_conflict *conflict; | ||
66 | + struct prelink_tls *tls; | ||
67 | GElf_Rela *ret; | ||
68 | |||
69 | if (GELF_R_TYPE (rel->r_info) == R_ARM_RELATIVE | ||
70 | @@ -324,8 +364,32 @@ | ||
71 | conflict = prelink_conflict (info, GELF_R_SYM (rel->r_info), | ||
72 | GELF_R_TYPE (rel->r_info)); | ||
73 | if (conflict == NULL) | ||
74 | - return 0; | ||
75 | - value = conflict_lookup_value (conflict); | ||
76 | + { | ||
77 | + if (info->curtls == NULL) | ||
78 | + return 0; | ||
79 | + switch (GELF_R_TYPE (rel->r_info)) | ||
80 | + { | ||
81 | + /* Even local DTPMOD and {D,}TPOFF relocs need conflicts. */ | ||
82 | + case R_ARM_TLS_DTPMOD32: | ||
83 | + case R_ARM_TLS_DTPOFF32: | ||
84 | + case R_ARM_TLS_TPOFF32: | ||
85 | + break; | ||
86 | + default: | ||
87 | + return 0; | ||
88 | + } | ||
89 | + value = 0; | ||
90 | + } | ||
91 | + else | ||
92 | + { | ||
93 | + /* DTPOFF32 wants to see only real conflicts, not lookups | ||
94 | + with reloc_class RTYPE_CLASS_TLS. */ | ||
95 | + if (GELF_R_TYPE (rel->r_info) == R_ARM_TLS_DTPOFF32 | ||
96 | + && conflict->lookup.tls == conflict->conflict.tls | ||
97 | + && conflict->lookupval == conflict->conflictval) | ||
98 | + return 0; | ||
99 | + | ||
100 | + value = conflict_lookup_value (conflict); | ||
101 | + } | ||
102 | ret = prelink_conflict_add_rela (info); | ||
103 | if (ret == NULL) | ||
104 | return 1; | ||
105 | @@ -342,6 +406,33 @@ | ||
106 | error (0, 0, "%s: R_ARM_%s relocs should not be present in prelinked REL sections", | ||
107 | dso->filename, GELF_R_TYPE (rel->r_info) == R_ARM_ABS32 ? "ABS32" : "PC24"); | ||
108 | return 1; | ||
109 | + case R_ARM_TLS_DTPMOD32: | ||
110 | + case R_ARM_TLS_DTPOFF32: | ||
111 | + case R_ARM_TLS_TPOFF32: | ||
112 | + if (conflict != NULL | ||
113 | + && (conflict->reloc_class != RTYPE_CLASS_TLS | ||
114 | + || conflict->lookup.tls == NULL)) | ||
115 | + { | ||
116 | + error (0, 0, "%s: R_ARM_TLS not resolving to STT_TLS symbol", | ||
117 | + dso->filename); | ||
118 | + return 1; | ||
119 | + } | ||
120 | + tls = conflict ? conflict->lookup.tls : info->curtls; | ||
121 | + ret->r_info = GELF_R_INFO (0, R_ARM_ABS32); | ||
122 | + switch (GELF_R_TYPE (rel->r_info)) | ||
123 | + { | ||
124 | + case R_ARM_TLS_DTPMOD32: | ||
125 | + ret->r_addend = tls->modid; | ||
126 | + break; | ||
127 | + case R_ARM_TLS_DTPOFF32: | ||
128 | + ret->r_addend = value + read_ule32 (dso, rel->r_offset); | ||
129 | + break; | ||
130 | + case R_ARM_TLS_TPOFF32: | ||
131 | + ret->r_addend = value + read_ule32 (dso, rel->r_offset) | ||
132 | + + tls->offset; | ||
133 | + break; | ||
134 | + } | ||
135 | + break; | ||
136 | case R_ARM_COPY: | ||
137 | error (0, 0, "R_ARM_COPY should not be present in shared libraries"); | ||
138 | return 1; | ||
139 | @@ -359,6 +450,7 @@ | ||
140 | { | ||
141 | GElf_Addr value; | ||
142 | struct prelink_conflict *conflict; | ||
143 | + struct prelink_tls *tls; | ||
144 | GElf_Rela *ret; | ||
145 | Elf32_Sword val; | ||
146 | |||
147 | @@ -369,8 +461,32 @@ | ||
148 | conflict = prelink_conflict (info, GELF_R_SYM (rela->r_info), | ||
149 | GELF_R_TYPE (rela->r_info)); | ||
150 | if (conflict == NULL) | ||
151 | - return 0; | ||
152 | - value = conflict_lookup_value (conflict); | ||
153 | + { | ||
154 | + if (info->curtls == NULL) | ||
155 | + return 0; | ||
156 | + switch (GELF_R_TYPE (rela->r_info)) | ||
157 | + { | ||
158 | + /* Even local DTPMOD and {D,}TPOFF relocs need conflicts. */ | ||
159 | + case R_ARM_TLS_DTPMOD32: | ||
160 | + case R_ARM_TLS_DTPOFF32: | ||
161 | + case R_ARM_TLS_TPOFF32: | ||
162 | + break; | ||
163 | + default: | ||
164 | + return 0; | ||
165 | + } | ||
166 | + value = 0; | ||
167 | + } | ||
168 | + else | ||
169 | + { | ||
170 | + /* DTPOFF32 wants to see only real conflicts, not lookups | ||
171 | + with reloc_class RTYPE_CLASS_TLS. */ | ||
172 | + if (GELF_R_TYPE (rela->r_info) == R_ARM_TLS_DTPOFF32 | ||
173 | + && conflict->lookup.tls == conflict->conflict.tls | ||
174 | + && conflict->lookupval == conflict->conflictval) | ||
175 | + return 0; | ||
176 | + | ||
177 | + value = conflict_lookup_value (conflict); | ||
178 | + } | ||
179 | ret = prelink_conflict_add_rela (info); | ||
180 | if (ret == NULL) | ||
181 | return 1; | ||
182 | @@ -398,6 +514,32 @@ | ||
183 | case R_ARM_COPY: | ||
184 | error (0, 0, "R_ARM_COPY should not be present in shared libraries"); | ||
185 | return 1; | ||
186 | + case R_ARM_TLS_DTPMOD32: | ||
187 | + case R_ARM_TLS_DTPOFF32: | ||
188 | + case R_ARM_TLS_TPOFF32: | ||
189 | + if (conflict != NULL | ||
190 | + && (conflict->reloc_class != RTYPE_CLASS_TLS | ||
191 | + || conflict->lookup.tls == NULL)) | ||
192 | + { | ||
193 | + error (0, 0, "%s: R_ARM_TLS not resolving to STT_TLS symbol", | ||
194 | + dso->filename); | ||
195 | + return 1; | ||
196 | + } | ||
197 | + tls = conflict ? conflict->lookup.tls : info->curtls; | ||
198 | + ret->r_info = GELF_R_INFO (0, R_ARM_ABS32); | ||
199 | + switch (GELF_R_TYPE (rela->r_info)) | ||
200 | + { | ||
201 | + case R_ARM_TLS_DTPMOD32: | ||
202 | + ret->r_addend = tls->modid; | ||
203 | + break; | ||
204 | + case R_ARM_TLS_DTPOFF32: | ||
205 | + ret->r_addend = value + rela->r_addend; | ||
206 | + break; | ||
207 | + case R_ARM_TLS_TPOFF32: | ||
208 | + ret->r_addend = value + rela->r_addend + tls->offset; | ||
209 | + break; | ||
210 | + } | ||
211 | + break; | ||
212 | default: | ||
213 | error (0, 0, "%s: Unknown arm relocation type %d", dso->filename, | ||
214 | (int) GELF_R_TYPE (rela->r_info)); | ||
215 | @@ -418,6 +560,8 @@ | ||
216 | abort (); | ||
217 | case R_ARM_RELATIVE: | ||
218 | case R_ARM_ABS32: | ||
219 | + case R_ARM_TLS_TPOFF32: | ||
220 | + case R_ARM_TLS_DTPOFF32: | ||
221 | rela->r_addend = (Elf32_Sword) read_ule32 (dso, rel->r_offset); | ||
222 | break; | ||
223 | case R_ARM_PC24: | ||
224 | @@ -426,6 +570,7 @@ | ||
225 | break; | ||
226 | case R_ARM_COPY: | ||
227 | case R_ARM_GLOB_DAT: | ||
228 | + case R_ARM_TLS_DTPMOD32: | ||
229 | rela->r_addend = 0; | ||
230 | break; | ||
231 | } | ||
232 | @@ -445,6 +590,8 @@ | ||
233 | abort (); | ||
234 | case R_ARM_RELATIVE: | ||
235 | case R_ARM_ABS32: | ||
236 | + case R_ARM_TLS_TPOFF32: | ||
237 | + case R_ARM_TLS_DTPOFF32: | ||
238 | write_le32 (dso, rela->r_offset, rela->r_addend); | ||
239 | break; | ||
240 | case R_ARM_PC24: | ||
241 | @@ -453,6 +600,7 @@ | ||
242 | | ((rela->r_addend >> 2) & 0xffffff)); | ||
243 | break; | ||
244 | case R_ARM_GLOB_DAT: | ||
245 | + case R_ARM_TLS_DTPMOD32: | ||
246 | write_le32 (dso, rela->r_offset, 0); | ||
247 | break; | ||
248 | } | ||
249 | @@ -488,6 +636,18 @@ | ||
250 | /* FALLTHROUGH */ | ||
251 | case R_ARM_PC24: | ||
252 | return 1; | ||
253 | + case R_ARM_TLS_DTPOFF32: | ||
254 | + /* We can prelink these fields, and the addend is relative | ||
255 | + to the symbol value. A RELA entry is needed. */ | ||
256 | + return 1; | ||
257 | + case R_ARM_TLS_TPOFF32: | ||
258 | + /* In shared libraries TPOFF32 is changed always into | ||
259 | + conflicts, for executables we need to preserve | ||
260 | + original addend. */ | ||
261 | + if (dso->ehdr.e_type == ET_EXEC) { | ||
262 | + return 1; | ||
263 | + } | ||
264 | + break; | ||
265 | } | ||
266 | } | ||
267 | } | ||
268 | @@ -612,6 +772,12 @@ | ||
269 | return 0; | ||
270 | error (0, 0, "%s: R_ARM_COPY reloc in shared library?", dso->filename); | ||
271 | return 1; | ||
272 | + case R_ARM_TLS_DTPMOD32: | ||
273 | + write_le32 (dso, rel->r_offset, 0); | ||
274 | + break; | ||
275 | + case R_ARM_TLS_DTPOFF32: | ||
276 | + case R_ARM_TLS_TPOFF32: | ||
277 | + break; | ||
278 | default: | ||
279 | error (0, 0, "%s: Unknown arm relocation type %d", dso->filename, | ||
280 | (int) GELF_R_TYPE (rel->r_info)); | ||
281 | @@ -634,6 +800,10 @@ | ||
282 | { | ||
283 | case R_ARM_COPY: return RTYPE_CLASS_COPY; | ||
284 | case R_ARM_JUMP_SLOT: return RTYPE_CLASS_PLT; | ||
285 | + case R_ARM_TLS_DTPMOD32: | ||
286 | + case R_ARM_TLS_DTPOFF32: | ||
287 | + case R_ARM_TLS_TPOFF32: | ||
288 | + return RTYPE_CLASS_TLS; | ||
289 | default: return RTYPE_CLASS_VALID; | ||
290 | } | ||
291 | } | ||
292 | @@ -646,7 +816,7 @@ | ||
293 | .R_JMP_SLOT = R_ARM_JUMP_SLOT, | ||
294 | .R_COPY = R_ARM_COPY, | ||
295 | .R_RELATIVE = R_ARM_RELATIVE, | ||
296 | - .dynamic_linker = "/lib/ld-linux.so.2", | ||
297 | + .dynamic_linker = "/lib/ld-linux.so.3", | ||
298 | .adjust_dyn = arm_adjust_dyn, | ||
299 | .adjust_rel = arm_adjust_rel, | ||
300 | .adjust_rela = arm_adjust_rela, | ||
diff --git a/meta/packages/prelink/prelink-20061027/prelink.conf b/meta/packages/prelink/prelink/prelink.conf index c5a4f4adc3..c5a4f4adc3 100644 --- a/meta/packages/prelink/prelink-20061027/prelink.conf +++ b/meta/packages/prelink/prelink/prelink.conf | |||
diff --git a/meta/packages/prelink/prelink-20061027/prelink.cron.daily b/meta/packages/prelink/prelink/prelink.cron.daily index 0b3c07322c..0b3c07322c 100644 --- a/meta/packages/prelink/prelink-20061027/prelink.cron.daily +++ b/meta/packages/prelink/prelink/prelink.cron.daily | |||
diff --git a/meta/packages/prelink/prelink-20061027/prelink.default b/meta/packages/prelink/prelink/prelink.default index 901258ed2a..901258ed2a 100644 --- a/meta/packages/prelink/prelink-20061027/prelink.default +++ b/meta/packages/prelink/prelink/prelink.default | |||
diff --git a/meta/packages/prelink/prelink_20061027.bb b/meta/packages/prelink/prelink_20100106.bb index 21c538d5c2..a84aaa267a 100644 --- a/meta/packages/prelink/prelink_20061027.bb +++ b/meta/packages/prelink/prelink_20100106.bb | |||
@@ -4,18 +4,17 @@ DESCRIPTION = " The prelink package contains a utility which modifies ELF shared | |||
4 | and executables, so that far fewer relocations need to be resolved at \ | 4 | and executables, so that far fewer relocations need to be resolved at \ |
5 | runtime and thus programs come up faster." | 5 | runtime and thus programs come up faster." |
6 | LICENSE = "GPL" | 6 | LICENSE = "GPL" |
7 | PR = "r9" | 7 | PR = "r0" |
8 | 8 | ||
9 | SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ | 9 | SRC_URI = "http://people.redhat.com/jakub/prelink/prelink-${PV}.tar.bz2 \ |
10 | file://prelink.conf \ | 10 | file://prelink.conf \ |
11 | file://prelink.cron.daily \ | 11 | file://prelink.cron.daily \ |
12 | file://prelink.default" | 12 | file://prelink.default" |
13 | 13 | ||
14 | TARGET_OS_ORIG := "${TARGET_OS}" | 14 | TARGET_OS_ORIG := "${TARGET_OS}" |
15 | OVERRIDES_append = ":${TARGET_OS_ORIG}" | 15 | OVERRIDES_append = ":${TARGET_OS_ORIG}" |
16 | SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch;patch=1" | ||
17 | 16 | ||
18 | S = "${WORKDIR}/prelink-0.0.${PV}" | 17 | S = "${WORKDIR}/prelink" |
19 | 18 | ||
20 | EXTRA_OECONF = "--disable-64bit" | 19 | EXTRA_OECONF = "--disable-64bit" |
21 | 20 | ||