Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756066AbbDVUMc (ORCPT ); Wed, 22 Apr 2015 16:12:32 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36923 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754379AbbDVUMa (ORCPT ); Wed, 22 Apr 2015 16:12:30 -0400 MIME-Version: 1.0 In-Reply-To: <20150418154618.GB15063@krava.brq.redhat.com> References: <1428854451-28361-1-git-send-email-minipli@googlemail.com> <20150417153430.GF17654@krava> <20150418154618.GB15063@krava.brq.redhat.com> Date: Wed, 22 Apr 2015 22:12:29 +0200 Message-ID: Subject: Re: [PATCH] perf: Ensure symbols for plugins are exported From: Mathias Krause To: Jiri Olsa Cc: "linux-kernel@vger.kernel.org" , Arnaldo Carvalho de Melo , Ingo Molnar , Paul Mackerras , Peter Zijlstra Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1889 Lines: 48 On 18 April 2015 at 17:46, Jiri Olsa wrote: > On Fri, Apr 17, 2015 at 11:01:07PM +0200, Mathias Krause wrote: >> On 17 April 2015 at 17:34, Jiri Olsa wrote: >> > On Sun, Apr 12, 2015 at 06:00:51PM +0200, Mathias Krause wrote: >> >> When building perf with perl or python support it implicitly gets linked >> >> with the -export-dynamic linker option through the additional linker >> >> flags, namely with -Wl,-E via perl or -Xlinker -export-dynamic via >> >> python. That flag is essential for the traceevent plugin support so we >> >> shouldn't rely on adding it implicitly. > > I dont see the -E flag being added for perl on my setup, > but I guess that could be different on each distro Yeah, seems so. On Debian I get the following: $ perl -MExtUtils::Embed -e ldopts -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lc -lcrypt $ python-config --ldflags -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions So, the -export-dynamic linker flag gets added by both -- perl and python. However on CentOS 7 I don't see the -Wl,-E for perl either. But python still adds it. So the patch is even more needed as leaving out perf python support on such a distro would make it miss the flag, too. > maybe we should look for proper fix and export only > needed symbols Well, that would require maintaining a symbol file. Don't know if it's worth it :/ > , anyway for this bugfix: > > Acked-by: Jiri Olsa Thanks, Mathias -- 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/