mirror of https://github.com/torvalds/linux.git
For libdw versions below 0.177, need to link libdl.a in addition to
libbebl.a during static compilation, otherwise
feature-dwarf_getlocations compilation will fail.
Before:
$ make LDFLAGS=-static
BUILD: Doing 'make -j20' parallel build
<SNIP>
Makefile.config:483: Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.157
<SNIP>
$ cat ../build/feature/test-dwarf_getlocations.make.output
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libebl.a(eblclosebackend.o): in function `ebl_closebackend':
(.text+0x20): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
After:
$ make LDFLAGS=-static
<SNIP>
Auto-detecting system features:
... dwarf: [ on ]
<SNIP>
$ ./perf probe
Usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
or: perf probe [<options>] --del '[GROUP:]EVENT' ...
or: perf probe --list [GROUP:]EVENT ...
<SNIP>
Fixes:
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| test-all.c | ||
| test-backtrace.c | ||
| test-bionic.c | ||
| test-bpf.c | ||
| test-clang-bpf-co-re.c | ||
| test-compile.c | ||
| test-cplus-demangle.c | ||
| test-cxa-demangle.cpp | ||
| test-disassembler-four-args.c | ||
| test-disassembler-init-styled.c | ||
| test-dwarf.c | ||
| test-dwarf_getcfi.c | ||
| test-dwarf_getlocations.c | ||
| test-eventfd.c | ||
| test-file-handle.c | ||
| test-fortify-source.c | ||
| test-get_cpuid.c | ||
| test-get_current_dir_name.c | ||
| test-gettid.c | ||
| test-glibc.c | ||
| test-gtk2-infobar.c | ||
| test-gtk2.c | ||
| test-hello.c | ||
| test-jvmti-cmlr.c | ||
| test-jvmti.c | ||
| test-libaio.c | ||
| test-libaudit.c | ||
| test-libbabeltrace.c | ||
| test-libbfd-buildid.c | ||
| test-libbfd.c | ||
| test-libbpf.c | ||
| test-libcap.c | ||
| test-libcapstone.c | ||
| test-libcrypto.c | ||
| test-libdebuginfod.c | ||
| test-libdw-dwarf-unwind.c | ||
| test-libelf-gelf_getnote.c | ||
| test-libelf-getphdrnum.c | ||
| test-libelf-getshdrstrndx.c | ||
| test-libelf.c | ||
| test-libnuma.c | ||
| test-libopencsd.c | ||
| test-libperl.c | ||
| test-libpfm4.c | ||
| test-libpython.c | ||
| test-libslang-include-subdir.c | ||
| test-libslang.c | ||
| test-libtraceevent.c | ||
| test-libtracefs.c | ||
| test-libunwind-aarch64.c | ||
| test-libunwind-arm.c | ||
| test-libunwind-debug-frame-aarch64.c | ||
| test-libunwind-debug-frame-arm.c | ||
| test-libunwind-debug-frame.c | ||
| test-libunwind-x86.c | ||
| test-libunwind-x86_64.c | ||
| test-libunwind.c | ||
| test-libzstd.c | ||
| test-llvm-perf.cpp | ||
| test-llvm.cpp | ||
| test-lzma.c | ||
| test-numa_num_possible_cpus.c | ||
| test-pthread-attr-setaffinity-np.c | ||
| test-pthread-barrier.c | ||
| test-reallocarray.c | ||
| test-scandirat.c | ||
| test-sched_getcpu.c | ||
| test-sdt.c | ||
| test-setns.c | ||
| test-stackprotector-all.c | ||
| test-timerfd.c | ||
| test-zlib.c | ||