qemu-e2k/trace
Stefan Hajnoczi 4b265c79a8 trace: use STAP_SDT_V2 to work around symbol visibility
QEMU binaries no longer launch successfully with recent SystemTap
releases. This is because modular QEMU builds link the sdt semaphores
into the main binary instead of into the shared objects where they are
used. The symbol visibility of semaphores is 'hidden' and the dynamic
linker prints an error during module loading:

  $ ./configure --enable-trace-backends=dtrace --enable-modules ...
  ...
  Failed to open module: /builddir/build/BUILD/qemu-4.2.0/s390x-softmmu/../block-curl.so: undefined symbol: qemu_curl_close_semaphore

The long-term solution is to generate per-module dtrace .o files and
link them into the module instead of the main binary.

In the short term we can define STAP_SDT_V2 so dtrace(1) produces a .o
file with 'default' symbol visibility instead of 'hidden'. This
workaround is small and easier to merge for QEMU 5.2 and downstream
backports.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1898700
Cc: wcohen@redhat.com
Cc: fche@redhat.com
Cc: kraxel@redhat.com
Cc: rjones@redhat.com
Cc: ddepaula@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com>
Message-id: 20201119141457.844452-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-11-19 16:41:09 +00:00
..
control-internal.h
control-target.c trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
control-vcpu.h
control.c trace: remove argument from trace_init_file 2020-11-11 13:08:09 +00:00
control.h trace: remove argument from trace_init_file 2020-11-11 13:08:09 +00:00
event-internal.h
ftrace.c
ftrace.h
mem-internal.h trace: Remove trace_mem_build_info_no_se_[bl]e 2020-01-15 15:13:09 -10:00
mem.h trace: add mmu_index to mem_info 2019-10-28 15:12:38 +00:00
meson.build trace: use STAP_SDT_V2 to work around symbol visibility 2020-11-19 16:41:09 +00:00
qmp.c
simple.c trace/simple: Fix unauthorized enable 2020-06-24 11:21:00 +01:00
simple.h trace/simple: Fix unauthorized enable 2020-06-24 11:21:00 +01:00