Skip to content

Commit

Permalink
Improve dynlink, trying to hook dlsym.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Nov 27, 2024
1 parent 8e8fe8b commit 355c12f
Show file tree
Hide file tree
Showing 56 changed files with 120 additions and 603 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@

#include <cli_core_plugin/cli_core_plugin_api.h>

#include <dynlink/dynlink.h>

#ifdef __cplusplus
extern "C" {
#endif

CLI_CORE_PLUGIN_API int cli_core_plugin(void *loader, void *handle);

DYNLINK_SYMBOL_EXPORT(cli_core_plugin);

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@

#include <cli_sandbox_plugin/cli_sandbox_plugin_api.h>

#include <dynlink/dynlink.h>

#ifdef __cplusplus
extern "C" {
#endif

CLI_SANDBOX_PLUGIN_API int cli_sandbox_plugin(void *loader, void *handle);

DYNLINK_SYMBOL_EXPORT(cli_sandbox_plugin);

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include <detour/detour_interface.h>

#include <dynlink/dynlink.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -45,8 +43,6 @@ extern "C" {
*/
FUNCHOOK_DETOUR_API detour_interface funchook_detour_impl_interface_singleton(void);

DYNLINK_SYMBOL_EXPORT(funchook_detour_impl_interface_singleton);

/**
* @brief
* Provide the module information
Expand All @@ -57,8 +53,6 @@ DYNLINK_SYMBOL_EXPORT(funchook_detour_impl_interface_singleton);
*/
FUNCHOOK_DETOUR_API const char *funchook_detour_print_info(void);

DYNLINK_SYMBOL_EXPORT(funchook_detour_print_info);

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions source/dynlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,14 @@ set(headers
${include_path}/dynlink.h
${include_path}/dynlink_flags.h
${include_path}/dynlink_impl.h
${include_path}/dynlink_impl_symbol_${DYNLINK_IMPL_INTERFACE_NAME}.h
${include_path}/dynlink_impl_${DYNLINK_IMPL_INTERFACE_NAME}.h
${include_path}/dynlink_symbol.h
)

set(sources
${source_path}/dynlink.c
${source_path}/dynlink_impl.c
${source_path}/dynlink_impl_${DYNLINK_IMPL_INTERFACE_NAME}.c
${source_path}/dynlink_interface.c
${source_path}/dynlink_symbol.c
)

# Group source files
Expand Down
1 change: 0 additions & 1 deletion source/dynlink/include/dynlink/dynlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include <dynlink/dynlink_flags.h>
#include <dynlink/dynlink_interface.h>
#include <dynlink/dynlink_symbol.h>

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 0 additions & 4 deletions source/dynlink/include/dynlink/dynlink_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
extern "C" {
#endif

/* -- Headers -- */

#include <stdlib.h>

/* -- Methods -- */

/**
Expand Down
2 changes: 0 additions & 2 deletions source/dynlink/include/dynlink/dynlink_impl_beos.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include <dynlink/dynlink_api.h>

#include <dynlink/dynlink_impl_symbol_beos.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 0 additions & 2 deletions source/dynlink/include/dynlink/dynlink_impl_macos.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include <dynlink/dynlink_api.h>

#include <dynlink/dynlink_impl_symbol_macos.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
62 changes: 0 additions & 62 deletions source/dynlink/include/dynlink/dynlink_impl_symbol_beos.h

This file was deleted.

62 changes: 0 additions & 62 deletions source/dynlink/include/dynlink/dynlink_impl_symbol_macos.h

This file was deleted.

62 changes: 0 additions & 62 deletions source/dynlink/include/dynlink/dynlink_impl_symbol_unix.h

This file was deleted.

58 changes: 0 additions & 58 deletions source/dynlink/include/dynlink/dynlink_impl_symbol_win32.h

This file was deleted.

2 changes: 0 additions & 2 deletions source/dynlink/include/dynlink/dynlink_impl_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include <dynlink/dynlink_api.h>

#include <dynlink/dynlink_impl_symbol_unix.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 0 additions & 2 deletions source/dynlink/include/dynlink/dynlink_impl_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include <dynlink/dynlink_api.h>

#include <dynlink/dynlink_impl_symbol_win32.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Loading

0 comments on commit 355c12f

Please sign in to comment.