X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Fld65.sgml;h=d37beced749309c3cc5a50e03fe4cea46e77651d;hb=a7f392a96fefd667bbcabfc816bbb6b3e3de70ac;hp=0dcf6884bba6f32505eb38ce7d537126b3b59308;hpb=ef4062f67385f4bfaecfce55ffa49629dc9bfc97;p=cc65 diff --git a/doc/ld65.sgml b/doc/ld65.sgml index 0dcf6884b..d37beced7 100644 --- a/doc/ld65.sgml +++ b/doc/ld65.sgml @@ -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 @@ -77,6 +78,7 @@ Long options: --define sym=val Define a symbol --dump-config name Dump a builtin configuration --end-group End a library group + --force-import sym Force an import of symbol `sym' --help Help (this text) --lib file Link this library --lib-path path Specify a library search path @@ -167,12 +169,29 @@ Here is a description of all the command line options: lunix atmos nes + supervision There are a few more targets defined but neither of them is actually supported. + -u sym[:addrsize], --force-import sym[:addrsize] + + 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 -v, --verbose @@ -305,9 +324,8 @@ The library search path contains in this order: A compiled in library path which is often /usr/lib/cc65/lib on Linux systems. The value of the environment variable The value of the environment variable A subdirectory named Any directory added with the option on the command line. @@ -319,12 +337,11 @@ The object file search path contains in this order: The current directory. -A compiled in directory which is often /usr/lib/cc65/lib on +A compiled in directory which is often /usr/lib/cc65/obj on Linux systems. The value of the environment variable The value of the environment variable A subdirectory named Any directory added with the option on the command line. @@ -336,9 +353,11 @@ The config file search path contains in this order: The current directory. -A compiled in directory which is often /usr/lib/cc65/lib on +A compiled in directory which is often /usr/lib/cc65/cfg on Linux systems. The value of the environment variable A subdirectory named Any directory added with the option on the command line. @@ -579,6 +598,19 @@ empty (for example because they are of type bss). In that case, the linker will create an empty output file. This may be suppressed by assigning an empty file name to that memory area. +The + MEMORY { + ROM1: start = $A000, size = $2000, file = "%O-1.bin"; + ROM2: start = $E000, size = $2000, file = "%O-2.bin"; + } + + +would write two files that start with the name of the output file specified on +the command line, with "-1.bin" and "-2.bin" appended respectively. Because +'%' is used as an escape char, the sequence "%%" has to be used if a single +percent sign is required. LOAD and RUN addresses (ROMable code)

@@ -716,7 +748,7 @@ page boundary, use If an alignment is requested, the linker will add enough space to the output -file, so that the new segment starts at an address that is divideable by the +file, so that the new segment starts at an address that is dividable by the given number without a remainder. All addresses are adjusted accordingly. To fill the unused space, bytes of zero are used, or, if the memory area has a ", +has several attributes that may be defined here. FORMATS { @@ -931,15 +964,22 @@ __STACKSIZE__=xxx/ on the command line. Builtin configurations

-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 Secondary configurations

+ +Several machine specific binary packages are distributed together with secondary +configurations (in the cfg directory). These configurations can be used with +Special segments

The builtin config files do contain segments that have a special meaning for @@ -964,10 +1004,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. -HEAP

+ZPSAVE

-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.