From b42cb16b65ed237e6ec30f65d4f9647561515cb8 Mon Sep 17 00:00:00 2001 From: grischka Date: Wed, 5 Oct 2016 18:34:17 +0200 Subject: Misc. fixes Makefile : - do not 'uninstall' peoples /usr/local/doc entirely libtcc.c : - MEM_DEBUG : IDE-friendly output "file:line: ..." - always ELF for objects tccgen.c : - fix memory leak in new switch code - move static 'in_sizeof' out of function profiling : - define 'static' to empty resolve_sym() : - replace by dlsym() win32/64: fix R_XXX_RELATIVE fixme - was fixed for i386 already in 8e4d64be2fc1d707c7800c5096f6e0ea22cbd - do not -Lsystemdir if compiling to .o --- tcc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 49fde3b..aeb0204 100644 --- a/tcc.h +++ b/tcc.h @@ -76,6 +76,7 @@ # pragma warning (disable : 4018) // signed/unsigned mismatch # pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned # endif +# undef CONFIG_TCC_STATIC #endif #ifndef O_BINARY @@ -1052,6 +1053,10 @@ static inline int toup(int c) # define PUB_FUNC #endif +#ifdef TCC_PROFILE /* profile all functions */ +# define static +#endif + #ifdef ONE_SOURCE #define ST_INLN static inline #define ST_FUNC static @@ -1559,9 +1564,7 @@ ST_FUNC void pe_add_unwind_data(unsigned start, unsigned end, unsigned stack); ST_FUNC void *dlopen(const char *filename, int flag); ST_FUNC void dlclose(void *p); ST_FUNC const char *dlerror(void); -ST_FUNC void *resolve_sym(TCCState *s1, const char *symbol); -#elif !defined _WIN32 -ST_FUNC void *resolve_sym(TCCState *s1, const char *symbol); +ST_FUNC void *dlsym(int flag, const char *symbol); #endif #ifdef CONFIG_TCC_BACKTRACE -- cgit v1.3.1