Cflink ColdFire Linker (preliminary) rev. 0.98 1. GENERAL The ColdFire Linker , cflink, is a freeware linker for ColdFire processors. The job of the linker is to take all the object files required to make an executable program and join them together. During the linking process, it will match all the references between object files so that the final executable is complete. 1.1 Command Line Options Usage: cflink [options] files -o outputfile Options: -r
ROM option. Address is a 32-bit start address for the ROM in hexadecimal. -i Output build information. The usual format for linking looks like this; cflink startup.o myprogram.o lib.o -o myprogram.prg Where; - cflink is the name of the linker. - startup.o is the name of the startup object code module for use with GeckoOS. - myprogram.o is the name of your program object file. You can have more than one object file here. - lib.o is the general set of library functions. - myprogram.prg is the name of the program file. The files you need to supply are that of the 'myprogram.o' which should have been produced from a Compiler or Assembler. All ".o" object files need to be in the GeckoOS object code format. If you used cfcc (ColdFire C Compiler) or cfasm (ColdFire Assembler - with the object output option enabled) then you would use the results from these programs. Using the ROM option will produce only code and data binary output instead of the block file format. XREF (external references) and XDEF (external definitions) will be resolved, so that the code can be run in place. 2. Error messages Error messages are meant to be self-explanatory. The general error messages that you may encounter are; File not found One of the required files could not be found File is not an object file The file is not a valid GeckoOS object code file.You should check the output options for the assembler or the name of the file you supplied. Byte relative out of range for reference Word relative out of range for reference The variable was used in a manner that puts it outside the range for either byte or word addressing modes. You need to change the model size for the source file. Reference not found A reference was made to the variable but it was not found in any of the object files. You need to check for correct spelling in your files, or that the library contains the reference. Merged data >64k This results because of an overflow in the small data model. All data combined from the object files must not exceed 65536 bytes in size. (Once the large data model is available, this may fix the problem). This does not refer to the size of the code, but rather the 'data' contained in each object file, such as tables or text. Code size can theoretically be as large as 2Gigabytes. 3. Limitations · The linker does not currently support real libraries. This will be added in the major update. · The linker only supports the small data model. Code size has no restrictions, only the merged data size must be less than 64kbytes (i.e. All the data contained in each object file, not code, must add up to less than 64kbytes). You can circumvent this with assembler files by using the 'section code' option rather than 'section data' for large data items. · The linker does not support S-Record yet. Copyright (C) 1998-2000 Defiant Pty Ltd All rights reserved. www.defiant.com.au