summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-12-20 17:23:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 08:47:13 +0000
commitde46026b3aaee413a129a6cef6134edc49a4f4fa (patch)
tree822ea533cb2595b8c3fc99666ca835ee5ed32f73
parentfe9f6d01cfb0e0c0f30ac9351b6c3a6952edaa39 (diff)
downloadpoky-de46026b3aaee413a129a6cef6134edc49a4f4fa.tar.gz
prelink: upgrade to latest revision (in the cross_prelink branch)
(From OE-Core rev: 9cb9e9146506cc24916add986eac8b05db934546) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch51
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb5
2 files changed, 2 insertions, 54 deletions
diff --git a/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch b/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch
deleted file mode 100644
index b1688243af..0000000000
--- a/meta/recipes-devtools/prelink/prelink/0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 2136969e3e196b9cf7f4788340efa4b1d9b39565 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 11 Oct 2018 10:05:52 +0800
4Subject: [PATCH] src/arch-mips.c: check info->resolvetls before use its member
5
6The info->resolvetls might be NULL according to src/prelink.c:
7[snip]
8 /* Dynamic linker does not depend on any other library,
9 all symbols resolve to themselves with the exception
10 of SHN_UNDEF symbols which resolve to 0. */
11if (info->symtab[r_sym].st_shndx == SHN_UNDEF)
12 {
13 info->resolveent = NULL;
14 info->resolvetls = NULL;
15[snip]
16
17So we must check it before use its members, otherwise, there might be
18Segmentation fault error.
19
20Fixed:
21MACHINE = "qemumips"
22IMAGE_INSTALL_append = " qemu"
23$ bitbake core-image-minimal
24[snip]
25| /path/to/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/run.prelink_image.1000: line 111: 1010 Segmentation fault (core dumped)
26[snip]
27
28Upstream-Status: Submitted [https://lists.yoctoproject.org/pipermail/yocto/2018-October/042812.html]
29
30Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
31---
32 src/arch-mips.c | 3 ++-
33 1 file changed, 2 insertions(+), 1 deletion(-)
34
35diff --git a/src/arch-mips.c b/src/arch-mips.c
36index ccb1834..02c608f 100644
37--- a/src/arch-mips.c
38+++ b/src/arch-mips.c
39@@ -567,7 +567,8 @@ mips_prelink_reloc (struct prelink_info *info, GElf_Addr r_offset,
40 if (dso->ehdr.e_type == ET_EXEC)
41 {
42 value = info->resolve (info, r_sym, r_type);
43- value += info->resolvetls->offset - TLS_TP_OFFSET;
44+ if (info->resolvetls != NULL)
45+ value += info->resolvetls->offset - TLS_TP_OFFSET;
46 if (r_type == R_MIPS_TLS_TPREL32)
47 mips_prelink_32bit_reloc (dso, rela, value);
48 else
49--
502.7.4
51
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index f0946de2cc..674f815dbf 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -9,7 +9,7 @@ and executables, so that far fewer relocations need to be resolved at \
9runtime and thus programs come up faster." 9runtime and thus programs come up faster."
10LICENSE = "GPLv2" 10LICENSE = "GPLv2"
11LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" 11LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
12SRCREV = "a853a5d715d84eec93aa68e8f2df26b7d860f5b2" 12SRCREV = "f9975537dbfd9ade0fc813bd5cf5fcbe41753a37"
13PV = "1.0+git${SRCPV}" 13PV = "1.0+git${SRCPV}"
14 14
15# 15#
@@ -32,8 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink_sta
32 file://prelink.cron.daily \ 32 file://prelink.cron.daily \
33 file://prelink.default \ 33 file://prelink.default \
34 file://macros.prelink \ 34 file://macros.prelink \
35 file://0001-src-arch-mips.c-check-info-resolvetls-before-use-its.patch \ 35 "
36"
37UPSTREAM_CHECK_COMMITS = "1" 36UPSTREAM_CHECK_COMMITS = "1"
38 37
39# error: error.h: No such file or directory 38# error: error.h: No such file or directory