lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161013190311.GJ23873@kernel.org>
Date:   Thu, 13 Oct 2016 16:03:11 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Maciej Debski <maciejd@...gle.com>
Cc:     Stephane Eranian <eranian@...gle.com>,
        linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Anton Blanchard <anton@...abs.org>,
        Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf

Em Thu, Oct 13, 2016 at 03:51:35PM -0300, Arnaldo Carvalho de Melo escreveu:
> So we need:
> 
> [acme@...et linux]$ git diff
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 8cfc310d4358..cffdd9cf3ebf 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -366,8 +366,10 @@ ifndef NO_SDT
>  endif
>  
>  ifdef PERF_HAVE_JITDUMP
> +  ifndef NO_LIBELF
>      $(call detected,CONFIG_JITDUMP)
>      CFLAGS += -DHAVE_JITDUMP
> +  endif
>  endif
>  
>  ifeq ($(ARCH),powerpc)
> [acme@...et linux]$ 
> 
> To get that fixed.
> 
> Please let me know if this suits your needs.
> 
> I'll now try building with elfutils static libraries to see if in that case it
> all gets linked.

After installing these packages, on fedora, i.e. installing what is
needed to statically link against libelf:

  elfutils-devel-static
  elfutils-libelf-devel-static
  zlib-static

Then it all works, libelf is statically linked and we also statically
link the jitdump code:

  $ make -C tools/perf LDFLAGS=-static O=/tmp/build/perf install-bin
  $ grep libelf /tmp/build/perf/FEATURE-DUMP 
  feature-libelf=1
  feature-libelf-getphdrnum=1
  feature-libelf-gelf_getnote=1
  feature-libelf-getshdrstrndx=1
  feature-libelf-mmap=1
  $
  
And:

[acme@...et linux]$ size /tmp/build/perf/perf
   text	   data	    bss	    dec	    hex	filename
4478822	 581702	23919240	28979764	1ba3234	/tmp/build/perf/perf
[acme@...et linux]$ 
[acme@...et linux]$ file /tmp/build/perf/perf
/tmp/build/perf/perf: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=c2950590a0f24d76baa0ce4896414e5d523fefba, not stripped
[acme@...et linux]$ 
[acme@...et linux]$ nm /tmp/build/perf/perf | grep jit
00000000005007f0 T jit_process
0000000000501920 T jit_write_elf
0000000000431a50 t perf_event__jit_repipe_mmap
0000000000431b20 t perf_event__jit_repipe_mmap2
[acme@...et linux]$ 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ