public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Vinson Lee <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: Waiman.Long@hp.com, mingo@kernel.org, eranian@google.com,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	hpa@zytor.com, tglx@linutronix.de, namhyung@kernel.org,
	jolsa@redhat.com, avi@cloudius-systems.com, acme@redhat.com,
	anton@samba.org, vlee@twitter.com, adrian.hunter@intel.com,
	paulus@samba.org
Subject: [tip:perf/core] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
Date: Wed, 18 Feb 2015 10:29:40 -0800	[thread overview]
Message-ID: <tip-4e31050f482c02c822b150d71cf1ea5be7c9d6e4@git.kernel.org> (raw)
In-Reply-To: <1423528286-13630-1-git-send-email-vlee@twopensource.com>

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 ||

      parent reply	other threads:[~2015-02-18 18:30 UTC|newest]

Thread overview: 3+ 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
2015-02-18 18:29 ` tip-bot for Vinson Lee [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=tip-4e31050f482c02c822b150d71cf1ea5be7c9d6e4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=Waiman.Long@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=anton@samba.org \
    --cc=avi@cloudius-systems.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=vlee@twitter.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