From 0ba7c8670c0ed178b857245609f5030d63ef2191 Mon Sep 17 00:00:00 2001 From: mingodad Date: Fri, 28 Mar 2014 11:44:00 +0000 Subject: [PATCH] This allow valgrind to work on linux, some how the PHDR is missing and then valgrind complain with: Inconsistency detected by ld.so: rtld.c: 1284: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed! --- tccelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccelf.c b/tccelf.c index 217c917c..45c0265a 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1500,7 +1500,7 @@ static void tcc_output_binary(TCCState *s1, FILE *f, } } -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if 1 // this allow valgrind to work on linux //defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #define HAVE_PHDR 1 #define EXTRA_RELITEMS 14