diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-08-22 14:50:33 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-23 08:25:50 +0100 |
commit | 9fdfa49ac11eff7215fab8540114535b2c652b83 (patch) | |
tree | 1507107b1d6996f8afd7958b193627ec5de8c72a /meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch | |
parent | aab57ed58b28309a34735ec1fb5a4192a03acea3 (diff) | |
download | openembedded-core-9fdfa49ac11eff7215fab8540114535b2c652b83.tar.gz |
patchelf: upgrade 0.12 -> 0.13
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch')
-rw-r--r-- | meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch b/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch deleted file mode 100644 index a06876e50a..0000000000 --- a/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch +++ /dev/null @@ -1,44 +0,0 @@ -If a binary has multiple SHT_NOTE sections and corresponding PT_NOTE -headers, we can see the error: - -patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections - -if the SHT_NOTE sections aren't sized to end on aligned boundaries. An example -would be a binary with: - - [ 2] .note.ABI-tag NOTE 00000000000002f4 000002f4 - 0000000000000020 0000000000000000 A 0 0 4 - [ 3] .note.gnu.propert NOTE 0000000000000318 00000318 - 0000000000000030 0000000000000000 A 0 0 8 - [ 4] .note.gnu.build-i NOTE 0000000000000348 00000348 - 0000000000000024 0000000000000000 A 0 0 4 - - NOTE 0x0000000000000318 0x0000000000000318 0x0000000000000318 - 0x0000000000000030 0x0000000000000030 R 0x8 - NOTE 0x00000000000002f4 0x00000000000002f4 0x00000000000002f4 - 0x0000000000000078 0x0000000000000074 R 0x4 - -since the PT_NOTE section at 2f4 covers [2] and [3] but the code -calclates curr_off should be 314, not the 318 in the binary. This -is an alignment issue. - -To fix this, we need to round curr_off to the next section alignment. - -Upstream-Status: Submitted [https://github.com/NixOS/patchelf/pull/274] -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> - -Index: git/src/patchelf.cc -=================================================================== ---- git.orig/src/patchelf.cc -+++ git/src/patchelf.cc -@@ -1010,8 +1010,9 @@ void ElfFile<ElfFileParamNames>::normali - size_t size = 0; - for (const auto & shdr : shdrs) { - if (rdi(shdr.sh_type) != SHT_NOTE) continue; -- if (rdi(shdr.sh_offset) != curr_off) continue; -+ if (rdi(shdr.sh_offset) != roundUp(curr_off, rdi(shdr.sh_addralign))) continue; - size = rdi(shdr.sh_size); -+ curr_off = roundUp(curr_off, rdi(shdr.sh_addralign)); - break; - } - if (size == 0) |