lkml.org 
[lkml]   [2015]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf: Ensure symbols for plugins are exported
From
On 18 April 2015 at 17:46, Jiri Olsa <jolsa@redhat.com> wrote:
> On Fri, Apr 17, 2015 at 11:01:07PM +0200, Mathias Krause wrote:
>> On 17 April 2015 at 17:34, Jiri Olsa <jolsa@redhat.com> 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 <jolsa@kernel.org>

Thanks,
Mathias


\
 
 \ /
  Last update: 2015-04-22 22:21    [W:0.033 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site