changeset 273:cb72fe14a384

[project @ 2003-05-24 16:12:58 by bellard] update
author bellard
date Sat, 24 May 2003 16:12:58 +0000
parents ad577f436eb7
children dcdc55c08456
files tcc-doc.texi
diffstat 1 files changed, 50 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tcc-doc.texi	Sat May 24 15:46:29 2003 +0000
+++ b/tcc-doc.texi	Sat May 24 16:12:58 2003 +0000
@@ -67,9 +67,7 @@
 
 @example
 @c man begin SYNOPSIS
-usage: tcc [@option{-v}] [@option{-c}] [@option{-o}@var{outfile}] [@option{-B}@var{dir}] [@option{-bench}] [@option{-I}@var{dir}] [@option{-D}@var{sym[=val]}] [@option{-U}@var{sym}]
-           [@option{-g}] [@option{-b}] [@option{-bt}@var{N}] [@option{-L}@var{dir}] [@option{-l}@var{lib}] [@option{-shared}] [@option{-static}]
-           [@var{infile1} @var{infile2}@dots{}] [@option{run} @var{infile} @var{args}@dots{}]
+usage: tcc [options] [@var{infile1} @var{infile2}@dots{}] [@option{-run} @var{infile} @var{args}@dots{}]
 @c man end
 @end example
 
@@ -181,6 +179,27 @@
 Undefine preprocessor symbol @samp{sym}.
 @end table
 
+Warning options:
+
+Note: each warning option has a negative form beginning with @option{-Wno-}.
+
+@table @option
+@item -Wunsupported
+Warn about unsupported GCC features that are ignored by TCC.
+
+@item -Wwrite-strings
+Make string constants being of type @code{const char *} intead of @code{char
+*}.
+
+@item -Werror
+Abort compilation if warnings are issued.
+
+@item -Wall 
+Activate all warnings, except @option{-Werror}, @option{-Wunusupported} and
+@option{-Wwrite-strings} (currently not useful).
+
+@end table
+
 Linker options:
 
 @table @option
@@ -201,6 +220,10 @@
 Generate a statically linked executable (default is a shared linked
 executable) (@option{-o} option must also be given).
 
+@item -rdynamic
+Export global symbols to the dynamic linker. It is useful when a library
+opened with @code{dlopen()} needs to access executable symbols.
+
 @item -r
 Generate an object file combining all input files (@option{-o} option must
 also be given).
@@ -227,7 +250,7 @@
 
 @end table
 
-Note: GCC options @option{-Ox}, @option{-Wx}, @option{-fx} and @option{-mx} are
+Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are
 ignored.
 @c man end
 
@@ -434,6 +457,9 @@
 assembler) syntax. No intermediate files are generated. GCC 3.x named
 operands are supported.
 
+@item @code{__builtin_types_compatible_p()} and @code{__builtin_constant_p()} 
+are supported.
+
 @end itemize
 
 @section TinyCC extensions
@@ -531,6 +557,12 @@
 @cindex .short
 @cindex .int
 @cindex .long
+@cindex .string
+@cindex .globl
+@cindex .section
+@cindex .text
+@cindex .data
+@cindex .bss
 
 All directives are preceeded by a '.'. The following directives are
 supported:
@@ -544,6 +576,12 @@
 @item .short value1[,value2...]
 @item .int value1[,value2...]
 @item .long value1[,value2...]
+@item .string string
+@item .global symbol
+@item .section section
+@item .text
+@item .data
+@item .bss
 @end itemize
 
 @section X86 Assembler
@@ -569,10 +607,10 @@
 position independent code (PIC). It means that the dynamic librairy
 code generated by TCC cannot be factorized among processes yet.
 
-TCC linker cannot currently eliminate unused object code. But TCC
-will soon integrate a novel feature not found in GNU tools: unused code
-will be eliminated at the function or variable level, provided you only
-use TCC to compile your files.
+TCC linker eliminates unreferenced object code in libraries. A single pass is
+done on the object and library list, so the order in which object files and
+libraries are specified is important (same constraint as GNU ld). No grouping
+options (@option{--start-group} and @option{--end-group}) are supported.
 
 @section ELF file loader
 
@@ -584,12 +622,15 @@
 @cindex linker scripts
 @cindex GROUP, linker command
 @cindex FILE, linker command
+@cindex OUTPUT_FORMAT, linker command
+@cindex TARGET, linker command
 
 Because on many Linux systems some dynamic libraries (such as
 @file{/usr/lib/libc.so}) are in fact GNU ld link scripts (horrible!),
 the TCC linker also supports a subset of GNU ld scripts.
 
-The @code{GROUP} and @code{FILE} commands are supported.
+The @code{GROUP} and @code{FILE} commands are supported. @code{OUTPUT_FORMAT}
+and @code{TARGET} are ignored.
 
 Example from @file{/usr/lib/libc.so}:
 @example