diff options
Diffstat (limited to 'meta/recipes-devtools/prelink/prelink/0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch')
-rw-r--r-- | meta/recipes-devtools/prelink/prelink/0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/meta/recipes-devtools/prelink/prelink/0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch b/meta/recipes-devtools/prelink/prelink/0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch deleted file mode 100644 index d2cd1a70e2..0000000000 --- a/meta/recipes-devtools/prelink/prelink/0001-src-dso.c-use-ehdr.e_shstrndx-as-index.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 107290910ff846532d944ddb78edda436bb6ae63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 15 Aug 2018 17:53:43 +0800 | ||
4 | Subject: [PATCH] src/dso.c: use ehdr.e_shstrndx as index | ||
5 | |||
6 | According to struct elf32_hd, the e_shnum is section header number, and the | ||
7 | index is e_shstrndx, not e_shnum. | ||
8 | |||
9 | This can fix segmention fault when handle libqb.so.0.18.2 from libqb_1.0.3. | ||
10 | It fails to handle libqb.so.0.18.2 and get errors: | ||
11 | Symbol section index outside of section numbers | ||
12 | |||
13 | Then segmentation fault, this is because the e_shnum is 34, while e_shstrndx is | ||
14 | 27 (it would be 33 when no errors), I've checked several elf files to confirm | ||
15 | that the ones after e_shstrndx is NULL, so use e_shstrndx should be correct. | ||
16 | |||
17 | Upstream-Status: Submitted [https://lists.yoctoproject.org/pipermail/yocto/2018-August/042240.html] | ||
18 | |||
19 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
20 | --- | ||
21 | src/dso.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/src/dso.c b/src/dso.c | ||
25 | index ae5e04d..c59d81f 100644 | ||
26 | --- a/src/dso.c | ||
27 | +++ b/src/dso.c | ||
28 | @@ -1659,7 +1659,7 @@ close_dso_1 (DSO *dso) | ||
29 | { | ||
30 | int i; | ||
31 | |||
32 | - for (i = 1; i < dso->ehdr.e_shnum; ++i) | ||
33 | + for (i = 1; i < dso->ehdr.e_shstrndx; ++i) | ||
34 | { | ||
35 | Elf_Scn *scn = dso->scn[i]; | ||
36 | Elf_Data *data = NULL; | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||