-<!doctype linuxdoc system>
+<!doctype linuxdoc system> <!-- -*- text-mode -*- -->
<article>
<title>ld65 Users Guide
named "rom2.bin". The name given on the command line is ignored in both cases.
Assigning an empty file name for a memory area will discard the data written
-to it. This is useful, if the a memory area has segments assigned that are
-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.
+to it. This is useful, if the memory area has segments assigned that are 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 <tt/%O/ sequence is also allowed inside a string. So using
unfortunately, ROM is not writable, so we have to copy it into RAM before
running the actual code.
-The linker cannot help you copying the data from ROM into RAM (this must be
-done by the startup code of your program), but it has some features that will
-help you in this process.
+The linker won't copy the data from ROM into RAM for you (this must be done by
+the startup code of your program), but it has some features that will help you
+in this process.
First, you may not only specify a "<tt/load/" attribute for a segment, but
also a "<tt/run/" attribute. The "<tt/load/" attribute is mandatory, and, if
All references to labels in the <tt/DATA/ segment are relocated to <tt/RAM2/
by the linker, so things will work properly.
+There's a library subroutine called <tt/copydata/ (in a module named
+<tt/copydata.s/) that might be used to do actual copying. Be sure to have a
+look at it's inner workings before using it!
+
<sect1>Other MEMORY area attributes<p>
Please note that the order of entries with equal priority is undefined.
+ <tag><tt>import</tt></tag>
+
+ This attribute defines a valid symbol name, that is added as an import
+ to the modules defining a constructor/desctructor of the given type.
+ This can be used to force linkage of a module if this module exports the
+ requested symbol.
+
</descrip>
Without specifying the <tt/CONDES/ feature, the linker will not create any