From 796866862f43c7f96d5356a8f30f4c5118f03302 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 18 Aug 2002 13:24:19 +0000 Subject: [PATCH] updated --- libtcc_test.c | 3 +++ tcc-doc.texi | 25 +++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libtcc_test.c b/libtcc_test.c index 1c87f78d..a9c379e5 100644 --- a/libtcc_test.c +++ b/libtcc_test.c @@ -44,6 +44,9 @@ int main(int argc, char **argv) exit(1); } + /* MUST BE CALLED before any compilation or file loading */ + tcc_set_output_type(s, TCC_OUTPUT_MEMORY); + tcc_compile_string(s, my_program); /* as a test, we add a symbol that the compiled program can be diff --git a/tcc-doc.texi b/tcc-doc.texi index 8fccadb5..df50133f 100644 --- a/tcc-doc.texi +++ b/tcc-doc.texi @@ -101,7 +101,7 @@ Put object file, executable, or dll into output file @file{outfile}. @item -Bdir Set the path where the tcc internal libraries can be found (default is -@code{prefix}@file{/lib/tcc}. +@file{PREFIX/lib/tcc}). @item -bench Output compilation statistics. @@ -111,10 +111,13 @@ Preprocessor options: @table @samp @item -Idir -Specify an additionnal include path. The default ones are: -@file{/usr/local/include}, @code{prefix}@file{/lib/tcc/include} and -@file{/usr/include} (@code{prefix} is usually @file{/usr} or -@file{/usr/local}). +Specify an additionnal include path. Include paths are searched in the +order they are specified. + +System include paths are always searched after. The default system +include paths are: @file{/usr/local/include}, @file{/usr/include} +and @file{PREFIX/lib/tcc/include}. (@code{PREFIX} is usually +@file{/usr} or @file{/usr/local}). @item -Dsym[=val] Define preprocessor symbol 'sym' to @@ -332,23 +335,20 @@ TCC can directly output relocatable ELF files (object files), executable ELF files and dynamic ELF libraries without relying on an external linker. -Dynamic ELF libraries are not working correctly yet because the C -compiler does not generate position independant code (PIC) code. +Dynamic ELF libraries can be output but the C compiler does not generate +position independant code (PIC) code. It means that the dynamic librairy +code generated by TCC cannot be factorized among processes yet. TCC linker cannot currently suppress unused object code. But TCC will soon integrate a novel feature not found in GNU tools: unused code will be suppressed at the function or variable level, provided you only use TCC to compile your files. -ELF symbol hash table is currently fixed. - @section ELF file loader TCC can load ELF object files, archives (.a files) and dynamic libraries (.so). -Currently, the @code{stabs} debug information is not relocated. - @section GNU Linker Scripts Because on many Linux systems some dynamic libraries (such as @@ -564,9 +564,6 @@ for the macros (@code{#define}s). @item global_stack for the global variables, functions and types. -@item extern_stack -for the external symbols shared between files. - @item local_stack for the local variables, functions and types. -- 2.11.4.GIT