linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: Set PLT entry/header sizes properly on Sparc.
@ 2018-10-17 19:08 David Miller
  2018-10-18 14:22 ` Arnaldo Carvalho de Melo
  2018-10-26  7:29 ` [tip:perf/urgent] perf symbols: " tip-bot for David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: David Miller @ 2018-10-17 19:08 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel


Using the sh_entsize for both values isn't correct.  It happens
to be correct on x86...

For both 32-bit and 64-bit sparc, there are four PLT entries in the
PLT section.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 tools/perf/util/symbol-elf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 29770ea61768..6e70cc00c161 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -324,7 +324,17 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss)
 			plt_entry_size = 16;
 			break;
 
-		default: /* FIXME: s390/alpha/mips/parisc/poperpc/sh/sparc/xtensa need to be checked */
+		case EM_SPARC:
+			plt_header_size = 48;
+			plt_entry_size = 12;
+			break;
+
+		case EM_SPARCV9:
+			plt_header_size = 128;
+			plt_entry_size = 32;
+			break;
+
+		default: /* FIXME: s390/alpha/mips/parisc/poperpc/sh/xtensa need to be checked */
 			plt_header_size = shdr_plt.sh_entsize;
 			plt_entry_size = shdr_plt.sh_entsize;
 			break;
-- 
2.19.1.328.g5a0cc8aca


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf: Set PLT entry/header sizes properly on Sparc.
  2018-10-17 19:08 [PATCH] perf: Set PLT entry/header sizes properly on Sparc David Miller
@ 2018-10-18 14:22 ` Arnaldo Carvalho de Melo
  2018-10-26  7:29 ` [tip:perf/urgent] perf symbols: " tip-bot for David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-10-18 14:22 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel

Em Wed, Oct 17, 2018 at 12:08:59PM -0700, David Miller escreveu:
> 
> Using the sh_entsize for both values isn't correct.  It happens
> to be correct on x86...
> 
> For both 32-bit and 64-bit sparc, there are four PLT entries in the
> PLT section.

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/urgent] perf symbols: Set PLT entry/header sizes properly on Sparc
  2018-10-17 19:08 [PATCH] perf: Set PLT entry/header sizes properly on Sparc David Miller
  2018-10-18 14:22 ` Arnaldo Carvalho de Melo
@ 2018-10-26  7:29 ` tip-bot for David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for David Miller @ 2018-10-26  7:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mhiramat, linux-kernel, tglx, guohanjun, peterz, davem, hemant,
	mingo, acme, wangnan0, alexander.shishkin, alexis.berlemont,
	dtolnay, namhyung, huawei.libin, hpa, milian.wolff

Commit-ID:  d6afa561e1471ccfdaf7191230c0c59a37e45a5b
Gitweb:     https://git.kernel.org/tip/d6afa561e1471ccfdaf7191230c0c59a37e45a5b
Author:     David Miller <davem@davemloft.net>
AuthorDate: Wed, 17 Oct 2018 12:08:59 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 18 Oct 2018 11:19:44 -0300

perf symbols: Set PLT entry/header sizes properly on Sparc

Using the sh_entsize for both values isn't correct.  It happens to be
correct on x86...

For both 32-bit and 64-bit sparc, there are four PLT entries in the PLT
section.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: David Tolnay <dtolnay@gmail.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Li Bin <huawei.libin@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: zhangmengting@huawei.com
Fixes: b2f7605076d6 ("perf symbols: Fix plt entry calculation for ARM and AARCH64")
Link: http://lkml.kernel.org/r/20181017.120859.2268840244308635255.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/symbol-elf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 29770ea61768..6e70cc00c161 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -324,7 +324,17 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss)
 			plt_entry_size = 16;
 			break;
 
-		default: /* FIXME: s390/alpha/mips/parisc/poperpc/sh/sparc/xtensa need to be checked */
+		case EM_SPARC:
+			plt_header_size = 48;
+			plt_entry_size = 12;
+			break;
+
+		case EM_SPARCV9:
+			plt_header_size = 128;
+			plt_entry_size = 32;
+			break;
+
+		default: /* FIXME: s390/alpha/mips/parisc/poperpc/sh/xtensa need to be checked */
 			plt_header_size = shdr_plt.sh_entsize;
 			plt_entry_size = shdr_plt.sh_entsize;
 			break;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-26  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 19:08 [PATCH] perf: Set PLT entry/header sizes properly on Sparc David Miller
2018-10-18 14:22 ` Arnaldo Carvalho de Melo
2018-10-26  7:29 ` [tip:perf/urgent] perf symbols: " tip-bot for David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).