mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-27 06:10:06 +08:00
updated
This commit is contained in:
parent
f5b9220b60
commit
796866862f
@ -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
|
||||
|
25
tcc-doc.texi
25
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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user