diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch')
-rw-r--r-- | external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch new file mode 100644 index 00000000..86d26bdf --- /dev/null +++ b/external/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch @@ -0,0 +1,42 @@ +From 9fd4bb05d3f2b7eaf9fe441bee26d3b1878d7cc7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:13:59 +0800 +Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same. + +Upstream-Status: Pending + +The 'dest' and 'src' can be same, we need to save the value of src32[2] +before swaping it. + +Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + libelf/gnuhash_xlate.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h +index 6faf113..04d9ca1 100644 +--- a/libelf/gnuhash_xlate.h ++++ b/libelf/gnuhash_xlate.h +@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) + words. We must detangle them here. */ + Elf32_Word *dest32 = dest; + const Elf32_Word *src32 = src; ++ Elf32_Word save_src32_2 = src32[2]; // dest could be equal to src + + /* First four control words, 32 bits. */ + for (unsigned int cnt = 0; cnt < 4; ++cnt) +@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) + len -= 4; + } + +- Elf32_Word bitmask_words = encode ? src32[2] : dest32[2]; ++ Elf32_Word bitmask_words = encode ? save_src32_2 : dest32[2]; + + /* Now the 64 bit words. */ + Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; +-- +2.7.4 + |