Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760510AbbBJAcN (ORCPT ); Mon, 9 Feb 2015 19:32:13 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:47039 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756495AbbBJAcL (ORCPT ); Mon, 9 Feb 2015 19:32:11 -0500 From: Vinson Lee 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@vger.kernel.org, linux-perf-users@vger.kernel.org, Vinson Lee Subject: [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older. Date: Mon, 9 Feb 2015 16:29:37 -0800 Message-Id: <1423528286-13630-1-git-send-email-vlee@twopensource.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 43 From: Vinson Lee 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/