aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch
diff options
context:
space:
mode:
authorwangmy <wangmy@fujitsu.com>2021-05-13 15:55:43 +0800
committerArmin Kuster <akuster808@gmail.com>2021-05-22 15:27:59 -0700
commita1ae03d0964df5ff7cc1c37c1f95eae60dd07800 (patch)
tree7f73082a914a72061d2dccb39b212acc2d440df6 /meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch
parent9e5c4181ecef45e58ecef449e17c3a96bba4b1cc (diff)
downloadmeta-openembedded-a1ae03d0964df5ff7cc1c37c1f95eae60dd07800.tar.gz
uftrace: Fix a plthook crash on aarch64 with binutils2.35.1 and later versions on aarch64
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 54feab11a1866435107df366005b50aba3b8d1cd) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch')
-rw-r--r--meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch b/meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch
new file mode 100644
index 0000000000..bf997d6e4b
--- /dev/null
+++ b/meta-oe/recipes-devtools/uftrace/uftrace/0001-aarch64-Fix-a-plthook-crash-on-aarch64-with-binutils.patch
@@ -0,0 +1,47 @@
+From 0851278471472c6be69a936cc3698aa50a646ffd Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 12 May 2021 17:06:31 +0900
+Subject: [PATCH] aarch64: Fix a plthook crash on aarch64 with binutils2.35.1
+ and later versions
+
+plthook is always crashed in Ubuntu 20.10 aarch64, which uses binutils 2.35.1.
+Since the `plt_entsize` is not automatically set in this version, we have to
+explicitly set the value.
+
+This patch fixes the following problem.
+
+ $ uname -m
+ aarch64
+
+ $ cat /etc/os-release | grep PRETTY_NAME
+ PRETTY_NAME="Ubuntu 20.10"
+
+ $ gcc -pg tests/s-abc.c
+
+ $ uftrace record a.out
+ WARN: child terminated by signal: 7: Bus error
+
+Fixed: #1254
+
+Upstream-status: submitted [Sent to https://github.com/namhyung/uftrace/pull/1248]
+
+Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
+---
+ utils/symbol.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/utils/symbol.c b/utils/symbol.c
+index 29a1d295..01e52dab 100644
+--- a/utils/symbol.c
++++ b/utils/symbol.c
+@@ -560,6 +560,7 @@ int load_elf_dynsymtab(struct symtab *dsymtab, struct uftrace_elf_data *elf,
+ }
+ else if (elf->ehdr.e_machine == EM_AARCH64) {
+ plt_addr += 16; /* AARCH64 PLT0 size is 32 */
++ plt_entsize = 16;
+ }
+ else if (elf->ehdr.e_machine == EM_386) {
+ plt_entsize += 12;
+--
+2.25.1
+