summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/prelink/prelink_git.bb
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-08-16 10:25:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-16 10:44:07 +0100
commitb7c291ee6532cba845ee6bfbbaa21076a2b2cbe5 (patch)
tree3c1f19e7128d4da4ab40f77a3a6cf9196b664439 /meta/recipes-devtools/prelink/prelink_git.bb
parent83cb0938b90bab9ba727f883b8955b0b40d49a01 (diff)
downloadopenembedded-core-b7c291ee6532cba845ee6bfbbaa21076a2b2cbe5.tar.gz
prelink: use ehdr.e_shstrndx as index rather than ehdr.e_shnum
[YOCTO #12791] According to struct elf32_hd, the e_shnum is section header number, and the index is e_shstrndx, not e_shnum. This can fix segmention fault when handle libqb.so.0.18.2 from libqb_1.0.3. It fails to handle libqb.so.0.18.2 and get errors: Symbol section index outside of section numbers Then segmentation fault, this is because the e_shnum is 34, while e_shstrndx is 27 (it would be 33 when no errors), I've checked several elf files to confirm that the ones after e_shstrndx is NULL, so use e_shstrndx should be correct. Fixed: MACHINE="qemux86-64" IMAGE_INSTALL_append = " libqb" #libqp is from meta-openembedded $ bitbake core-image-minimal Segmention fault Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/prelink/prelink_git.bb')
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 0f6d16e005..c5eaedd4d9 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -31,7 +31,9 @@ SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \
file://prelink.conf \
file://prelink.cron.daily \
file://prelink.default \
- file://macros.prelink"
+ file://macros.prelink \
+ file://0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch \
+"
UPSTREAM_CHECK_COMMITS = "1"
TARGET_OS_ORIG := "${TARGET_OS}"