Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964938AbbBJOZR (ORCPT ); Tue, 10 Feb 2015 09:25:17 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:39576 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932769AbbBJOZO (ORCPT ); Tue, 10 Feb 2015 09:25:14 -0500 Date: Tue, 10 Feb 2015 23:24:44 +0900 From: Namhyung Kim 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@vger.kernel.org, linux-perf-users@vger.kernel.org, Vinson Lee Subject: Re: [PATCH] perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older. Message-ID: <20150210142444.GC27487@danjae> References: <1423528286-13630-1-git-send-email-vlee@twopensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1423528286-13630-1-git-send-email-vlee@twopensource.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 53 Hi Vinson, On Mon, Feb 09, 2015 at 04:29:37PM -0800, Vinson Lee wrote: > 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 Acked-by: Namhyung Kim 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 > -- 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/