diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-17 10:47:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-17 16:31:52 +0100 |
commit | 2fd754bed7516c4a698b04f0fdd429354d703eda (patch) | |
tree | 5fe0c37da96bd1615a1f3831946ee0afa2719e9a /meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch | |
parent | 59459ac93663a2bdabc42cb948f2cb5bc3eb2e4a (diff) | |
download | poky-2fd754bed7516c4a698b04f0fdd429354d703eda.tar.gz |
patchelf: Upgrade 0.10 -> 0.11
Two patches were merged upstream, the other needed refreshing.
(From OE-Core rev: 9a4547804f0a889dc583e84a00374085ecf7f361)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch')
-rw-r--r-- | meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch b/meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch deleted file mode 100644 index d087bd7855..0000000000 --- a/meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | When running patchelf on some existing patchelf'd binaries to change to longer | ||
2 | RPATHS, ldd would report the binaries as invalid. The output of objdump -x on | ||
3 | those libraryies should show the top of the .dynamic section is getting trashed, | ||
4 | something like: | ||
5 | |||
6 | 0x600000001 0x0000000000429000 | ||
7 | 0x335000 0x0000000000335000 | ||
8 | 0xc740 0x000000000000c740 | ||
9 | 0x1000 0x0000000000009098 | ||
10 | SONAME libglib-2.0.so.0 | ||
11 | |||
12 | (which should be RPATH and DT_NEEDED entries) | ||
13 | |||
14 | This was tracked down to the code which injects the PT_LOAD section. | ||
15 | |||
16 | The issue is that if the program headers were previously relocated to the end | ||
17 | of the file which was how patchelf operated previously, the relocation code | ||
18 | wouldn't work properly on a second run as it now assumes they're located after | ||
19 | the elf header. This change forces them back to immediately follow the elf | ||
20 | header which is where the code has made space for them. | ||
21 | |||
22 | Upstream-Status: Submitted [https://github.com/NixOS/patchelf/pull/202] | ||
23 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
24 | RP 2020/6/2 | ||
25 | |||
26 | Index: git/src/patchelf.cc | ||
27 | =================================================================== | ||
28 | --- git.orig/src/patchelf.cc | ||
29 | +++ git/src/patchelf.cc | ||
30 | @@ -762,6 +762,7 @@ void ElfFile<ElfFileParamNames>::rewrite | ||
31 | } | ||
32 | |||
33 | /* Add a segment that maps the replaced sections into memory. */ | ||
34 | + wri(hdr->e_phoff, sizeof(Elf_Ehdr)); | ||
35 | phdrs.resize(rdi(hdr->e_phnum) + 1); | ||
36 | wri(hdr->e_phnum, rdi(hdr->e_phnum) + 1); | ||
37 | Elf_Phdr & phdr = phdrs[rdi(hdr->e_phnum) - 1]; | ||