From: David Miller <davem@davemloft.net>
To: acme@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] perf: Set PLT entry/header sizes properly on Sparc.
Date: Wed, 17 Oct 2018 12:08:59 -0700 (PDT) [thread overview]
Message-ID: <20181017.120859.2268840244308635255.davem@davemloft.net> (raw)
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
next reply other threads:[~2018-10-17 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 19:08 David Miller [this message]
2018-10-18 14:22 ` [PATCH] perf: Set PLT entry/header sizes properly on Sparc Arnaldo Carvalho de Melo
2018-10-26 7:29 ` [tip:perf/urgent] perf symbols: " tip-bot for David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181017.120859.2268840244308635255.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.