* [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
@ 2015-02-10 0:29 Vinson Lee
2015-02-10 14:24 ` Namhyung Kim
2015-02-18 18:29 ` [tip:perf/core] " tip-bot for Vinson Lee
0 siblings, 2 replies; 3+ messages in thread
From: Vinson Lee @ 2015-02-10 0:29 UTC (permalink / raw)
To: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Adrian Hunter, Jiri Olsa, Namhyung Kim,
Waiman Long, Stephane Eranian, Anton Blanchard, Avi Kivity
Cc: linux-kernel, linux-perf-users, Vinson Lee
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
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
2015-02-18 18:29 ` [tip:perf/core] " tip-bot for Vinson Lee
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2015-02-10 14:24 UTC (permalink / raw)
To: Vinson Lee
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Adrian Hunter, Jiri Olsa, Waiman Long,
Stephane Eranian, Anton Blanchard, Avi Kivity, linux-kernel,
linux-perf-users, Vinson Lee
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
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
@ 2015-02-18 18:29 ` tip-bot for Vinson Lee
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Vinson Lee @ 2015-02-18 18:29 UTC (permalink / raw)
To: linux-tip-commits
Cc: Waiman.Long, mingo, eranian, linux-kernel, a.p.zijlstra, hpa,
tglx, namhyung, jolsa, avi, acme, anton, vlee, adrian.hunter,
paulus
Commit-ID: 4e31050f482c02c822b150d71cf1ea5be7c9d6e4
Gitweb: http://git.kernel.org/tip/4e31050f482c02c822b150d71cf1ea5be7c9d6e4
Author: Vinson Lee <vlee@twitter.com>
AuthorDate: Mon, 9 Feb 2015 16:29:37 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 11 Feb 2015 12:37:32 -0300
perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
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
Signed-off-by: Vinson Lee <vlee@twitter.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Avi Kivity <avi@cloudius-systems.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Waiman Long <Waiman.Long@hp.com>
Cc: stable@vger.kernel.org # 3.17+
Link: http://lkml.kernel.org/r/1423528286-13630-1-git-send-email-vlee@twopensource.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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 225eb73..b02731a 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 ||
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-18 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-02-18 18:29 ` [tip:perf/core] " tip-bot for Vinson Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox