Skip to content

Commit

Permalink
Ensure symbols are exported for bpftrace executable
Browse files Browse the repository at this point in the history
bpftrace executable needs to lookup `BEGIN_trigger` and `END_trigger`
symbols. Since the bump of the minimal versin of CMake in
1a1a4a9, these symbols are stripped
from bpftrace: the executable is built without the `-rdynamic` option
and the symbol is not present anymore (tested with GCC 10). To restore
this compile option, we can instruct CMake to export symbols for
bpftrace executable.

Also, see #954.
  • Loading branch information
vincentbernat authored and danobi committed Jul 24, 2020
1 parent 2f37df3 commit 38f1c69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -29,6 +29,7 @@ add_executable(bpftrace
utils.cpp
${BFD_DISASM_SRC}
)
set_property(TARGET bpftrace PROPERTY ENABLE_EXPORTS 1)

if(HAVE_NAME_TO_HANDLE_AT)
target_compile_definitions(bpftrace PRIVATE HAVE_NAME_TO_HANDLE_AT=1)
Expand Down

0 comments on commit 38f1c69

Please sign in to comment.