From: Namhyung Kim <namhyung@kernel.org>
To: Vinson Lee <vlee@twopensource.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@redhat.com>, Waiman Long <Waiman.Long@hp.com>,
Stephane Eranian <eranian@google.com>,
Anton Blanchard <anton@samba.org>,
Avi Kivity <avi@cloudius-systems.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Vinson Lee <vlee@twitter.com>
Subject: Re: [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
Date: Tue, 10 Feb 2015 23:24:44 +0900 [thread overview]
Message-ID: <20150210142444.GC27487@danjae> (raw)
In-Reply-To: <1423528286-13630-1-git-send-email-vlee@twopensource.com>
Hi Vinson,
On Mon, Feb 09, 2015 at 04:29:37PM -0800, Vinson Lee wrote:
> From: Vinson Lee <vlee@twitter.com>
>
> The token STT_GNU_IFUNC is not available with glibc 2.9 and older.
> Define this token if it is not already defined.
>
> This patch fixes this build errors with older versions of glibc.
>
> CC util/symbol-elf.o
> util/symbol-elf.c: In function ‘elf_sym__is_function’:
> util/symbol-elf.c:75: error: ‘STT_GNU_IFUNC’ undeclared (first use in this function)
> util/symbol-elf.c:75: error: (Each undeclared identifier is reported only once
> util/symbol-elf.c:75: error: for each function it appears in.)
> make: *** [util/symbol-elf.o] Error 1
>
> Cc: stable@vger.kernel.org # 3.17+
> Signed-off-by: Vinson Lee <vlee@twitter.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/util/symbol-elf.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> index 06fcd1b..eafee11 100644
> --- a/tools/perf/util/symbol-elf.c
> +++ b/tools/perf/util/symbol-elf.c
> @@ -69,6 +69,10 @@ static inline uint8_t elf_sym__type(const GElf_Sym *sym)
> return GELF_ST_TYPE(sym->st_info);
> }
>
> +#ifndef STT_GNU_IFUNC
> +#define STT_GNU_IFUNC 10
> +#endif
> +
> static inline int elf_sym__is_function(const GElf_Sym *sym)
> {
> return (elf_sym__type(sym) == STT_FUNC ||
> --
> 1.8.2.1
>
prev parent reply other threads:[~2015-02-10 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 0:29 [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older Vinson Lee
2015-02-10 14:24 ` Namhyung Kim [this message]
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=20150210142444.GC27487@danjae \
--to=namhyung@kernel.org \
--cc=Waiman.Long@hp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=anton@samba.org \
--cc=avi@cloudius-systems.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=vlee@twitter.com \
--cc=vlee@twopensource.com \
/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).