From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ftrace: recordmcount: avoid STT_FUNC symbols as base on ARM
Date: Tue, 17 May 2011 23:50:20 +0100 [thread overview]
Message-ID: <20110517225020.GD2266@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1305648629.5456.744.camel@gandalf.stny.rr.com>
On Tue, May 17, 2011 at 12:10:29PM -0400, Steven Rostedt wrote:
> On Wed, 2011-05-11 at 22:53 +0530, Rabin Vincent wrote:
> > While find_secsym_ndx often finds the unamed local STT_SECTION, if a
> > section has only one function in it, the ARM toolchain generates the
> > STT_FUNC symbol before the STT_SECTION, and recordmcount finds this
> > instead.
> >
> > This is problematic on ARM because in ARM ELFs, "if a [STT_FUNC] symbol
> > addresses a Thumb instruction, its value is the address of the
> > instruction with bit zero set (in a relocatable object, the section
> > offset with bit zero set)". This leads to incorrect mcount addresses
> > being recorded.
> >
> > Fix this by not using STT_FUNC symbols as the base on ARM.
>
> Hi Russell,
>
> Can you give me an Acked-by on this patch?
It would be better for someone who knows the ELF format for ARM and
its weirdnesses to ack this patch. I'm afraid my ARM ELF format
knowledge was been superseded when EABI came along and introduced
all sorts of new stuff.
next prev parent reply other threads:[~2011-05-17 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 17:23 [PATCH] ftrace: recordmcount: avoid STT_FUNC symbols as base on ARM Rabin Vincent
2011-05-17 16:10 ` Steven Rostedt
2011-05-17 22:50 ` Russell King - ARM Linux [this message]
2011-05-18 0:27 ` Steven Rostedt
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=20110517225020.GD2266@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 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).