Hello !
Trying to test tinycc on linux X86_64 I get this error with valgrind:
Inconsistency detected by ld.so: rtld.c: 1284: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
Comparing the headers generated by other compilers it seem that tinycc is missing the PHDR entry, and making the following preprocessor test always true on tccelf.c seems to fix the problem, anyone knows this better and can explain it ?
#if 1 //<<<<<<<<<<<<<< //defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define HAVE_PHDR 1
#define EXTRA_RELITEMS 14
/* move the relocation value from .dynsym to .got */
void patch_dynsym_undef(TCCState *s1, Section *s)
Cheers !