Skip to content

Commit

Permalink
Fix r2dec using external qjs, and fix symbol visibility (#331)
Browse files Browse the repository at this point in the history
Co-authored-by: pancake <pancake@nopcode.org>
  • Loading branch information
trufae and radare authored Oct 17, 2024
1 parent 53760c6 commit 4944f07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion c/r2dec-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RCorePlugin core_plugin_r2dec = {
#ifdef _MSC_VER
#define _R_API __declspec(dllexport)
#else
#define _R_API
#define _R_API __attribute__((visibility("default")))
#endif

#ifndef CORELIB
Expand Down
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ libquickjs_dep = libquickjs_proj.get_variable('quickjs_dep')
qjsc = libquickjs_proj.get_variable('qjsc')

r2dec_incs = ['.', 'c']
r2dec_c_args = []
r2dec_c_args = ['-fvisibility=hidden', '-flto']
r2dec_src = [
'c' / 'r2dec.c',
'c' / 'base64.c',
Expand Down Expand Up @@ -84,6 +84,7 @@ else

shared_library('core_pdd', r2dec_src,
c_args : r2dec_c_args,
link_args: ['-Wl,-Bsymbolic'],
dependencies: r2dec_deps,
include_directories: include_directories(r2dec_incs),
implicit_include_directories: false,
Expand Down

0 comments on commit 4944f07

Please sign in to comment.