]> git.sur5r.net Git - cc65/blobdiff - doc/ld65.sgml
Added note on the necessity of tab chars at the beginning of make command lines.
[cc65] / doc / ld65.sgml
index 27723cd592e8604897a176b2e7bd2a0b0d220776..4afaef5c70605b2adea50041316debdc13a4d310 100644 (file)
@@ -67,6 +67,7 @@ Short options:
   -m name               Create a map file
   -o name               Name the default output file
   -t sys                Set the target system
+  -u sym                Force an import of symbol `sym'
   -v                    Verbose mode
   -vm                   Verbose map file
 
@@ -175,6 +176,22 @@ Here is a description of all the command line options:
   supported.
 
 
+  <tag><tt>-u sym[:addrsize], --force-import sym[:addrsize]</tt></tag>
+
+  Force an import of a symbol. While object files are always linked to the
+  output file, regardless if there are any references, object modules from
+  libraries get only linked in if an import can be satisfied by this module.
+  The <tt/--fore-import/ option may be used to add a reference to a symbol and
+  as a result force linkage of the module that exports the identifier.
+
+  The name of the symbol may optionally be followed by a colon and an address
+  size specifier. If no address size is specified, the default address size
+  for the target machine is used.
+
+  Please note that the symbol name needs to have the internal representation,
+  meaning you have to prepend an underline for C identifiers.
+
+
   <label id="option-v">
   <tag><tt>-v, --verbose</tt></tag>
 
@@ -264,22 +281,6 @@ Here is a description of all the command line options:
   file and it's contents are subject to change without further notice.
 
 
-  <tag><tt>--force-import sym[:addrsize]</tt></tag>
-
-  Force an import of a symbol. While object files are always linked to the
-  output file, regardless if there are any references, object modules from
-  libraries get only linked in if an import can be satisfied by this module.
-  The <tt/--fore-import/ option may be used to add a reference to a symbol and
-  as a result force linkage of the module that exports the identifier.
-
-  The name of the symbol may be followed by a colon and an address size
-  specifier. If no address size is specified, the default address size
-  for the target machine is used.
-
-  Please note that the symbol name needs to have the internal representation,
-  meaning you have to prepend an underline for C identifiers.
-
-
   <tag><tt>--lib file</tt></tag>
 
   Links a library to the output. Use this command line option instead of just
@@ -323,9 +324,8 @@ The library search path contains in this order:
 <item>A compiled in library path which is often <tt>/usr/lib/cc65/lib</tt> on
       Linux systems.
 <item>The value of the environment variable <tt/LD65_LIB/ if it is defined.
-<item>The value of the environment variable <tt/CC65_LIB/ if it is defined.
-      Please note that use of this environment variable is obsolete and may
-      get removed in future versions.
+<item>A subdirectory named <tt/lib/ of the directory defined in the environment
+      variable <tt/CC65_HOME/, if it is defined.
 <item>Any directory added with the <tt><ref id="option--lib-path"
       name="--lib-path"></tt> option on the command line.
 </enum>
@@ -337,12 +337,11 @@ The object file search path contains in this order:
 
 <enum>
 <item>The current directory.
-<item>A compiled in directory which is often <tt>/usr/lib/cc65/lib</tt> on
+<item>A compiled in directory which is often <tt>/usr/lib/cc65/obj</tt> on
       Linux systems.
 <item>The value of the environment variable <tt/LD65_OBJ/ if it is defined.
-<item>The value of the environment variable <tt/CC65_LIB/ if it is defined.
-      Please note that use of this environment variable is obsolete and may
-      get removed in future versions.
+<item>A subdirectory named <tt/obj/ of the directory defined in the environment
+      variable <tt/CC65_HOME/, if it is defined.
 <item>Any directory added with the <tt><ref id="option--obj-path"
       name="--obj-path"></tt> option on the command line.
 </enum>
@@ -354,9 +353,11 @@ The config file search path contains in this order:
 
 <enum>
 <item>The current directory.
-<item>A compiled in directory which is often <tt>/usr/lib/cc65/lib</tt> on
+<item>A compiled in directory which is often <tt>/usr/lib/cc65/cfg</tt> on
       Linux systems.
 <item>The value of the environment variable <tt/LD65_CFG/ if it is defined.
+<item>A subdirectory named <tt/cfg/ of the directory defined in the environment
+      variable <tt/CC65_HOME/, if it is defined.
 <item>Any directory added with the <tt><ref id="option--cfg-path"
       name="--cfg-path"></tt> option on the command line.
 </enum>
@@ -949,15 +950,22 @@ __STACKSIZE__=xxx/ on the command line.
 
 <sect1>Builtin configurations<p>
 
-The builtin configurations are part of the linker source. They are also
-distributed together with the machine specific binary packages (usually in the
-doc directory) and don't have a special format. So if you need a special
-configuration, it's a good idea to start with the builtin configuration for
-your system. In a first step, just replace <tt/-t target/ by <tt/-C
+The builtin configurations are part of the linker source. They can be retrieved
+with <tt/--dump-config/ and don't have a special format. So if you need a
+special configuration, it's a good idea to start with the builtin configuration
+for your system. In a first step, just replace <tt/-t target/ by <tt/-C
 configfile/. Then go on and modify the config file to suit your needs.
 
 
 
+<sect1>Secondary configurations<p>
+
+Several machine specific binary packages are distributed together with secondary
+configurations (in the cfg directory). These configurations can be used with
+<tt/-C configfile/ too.
+
+
+
 <sect>Special segments<p>
 
 The builtin config files do contain segments that have a special meaning for
@@ -982,10 +990,11 @@ This segment contains the startup code which initializes the C software stack
 and the libraries. It is placed in its own segment because it needs to be
 loaded at the lowest possible program address on several platforms.
 
-<sect1>HEAP<p>
+<sect1>ZPSAVE<p>
 
-This segment defines the location of the memory heap used by the malloc
-routine.
+The ZPSAVE segment contains the original values of the zeropage locations used
+by the ZEROPAGE segment. It is placed in its own segment because it must not be
+initialized.