From 5c233f2cf37a7bbf00b12df606f876c7275ef98f Mon Sep 17 00:00:00 2001 From: mingodad Date: Fri, 28 Mar 2014 21:07:06 +0000 Subject: [PATCH] The hack to allow valgrind works with tcc compiled programs have the undesired side effect of programs compiled with debug info segfaulting after debug info been striped more tought must be done here --- tccelf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tccelf.c b/tccelf.c index 45c0265a..f5f9eed2 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1500,7 +1500,11 @@ static void tcc_output_binary(TCCState *s1, FILE *f, } } -#if 1 // this allow valgrind to work on linux //defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +// making this evaluate to true allow valgrind to work on linux +// but when compiled with debug info and then striped +// the compiled programs segfault +// more tought must be applyed here +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #define HAVE_PHDR 1 #define EXTRA_RELITEMS 14