[ << ] [ >> ]           [] [] [] [ ? ]

12 Amiga output module

This chapter describes the AmigaOS hunk-format output module which can be selected with the ‘-Fhunk’ option to generate objects and with the ‘-Fhunkexe’ option to generate executable files.


12.1 Legal

This module is written in 2002-2024 by Frank Wille and is covered by the vasm copyright without modifications.


12.2 Additional options for this module

-dbg-globloc

Adds all local labels to the debug symbol hunk, by trying to construct a unique name out of the previous global label and the original local label name: global$local. The default is to write global labels only.

-dbg-local

Adds all local labels with their original name to the debug symbol hunk. The default is to write global labels only.

-hunkpad=<code>

Sets a two-byte code used for aligning a code hunk to the next 32-bit border. Defaults to 0x4e71 for M68k code sections, to allow linking of functions which extend over two object files. Otherwise it defaults to zero.

-keepempty

Do not delete empty sections without any symbol definition.

-kick1hunks

Use only those hunk types and external reference types which have been valid at the time of Kickstart 1.x, for compatibility with old assembler sources and old linkers. For example: no longer differentiate between absolute and relative references. In executables it will prevent the assembler from using 16-bit relocation offsets in hunks and rejects 32-bit PC-relative relocations.

-linedebug

Automatically generate an SAS/C-compatible LINE DEBUG hunk for the input source. Overrides any line debugging directives from the source text.

-noabspath

Do not make absolute paths from source file names for the LINE DEBUG format. Except the path was already specified as absolute on the command line or via a directive.

These options are valid for the hunkexe module only:

-databss

Try to shorten sections in the output file by removing zero words without relocation from the end. This technique is only supported by AmigaOS 2.0 and higher.


12.3 General

This module outputs the hunk object (standard for M68k and extended for PowerPC) and hunkexe executable format, which is a proprietary file format used by AmigaOS and WarpOS.

The hunkexe module will generate directly executable files, without the need for another linker run. But you have to make sure that there are no undefined symbols, common symbols, or unusual relocations (e.g. small data) left.

It is allowed to define sections with the same name but different attributes. They will be regarded as different entities.


12.4 Restrictions

The hunk/hunkexe output format is only intended for M68k and PowerPC cpu modules and will abort when used otherwise.

The hunk module supports the following relocation types:

The hunkexe module supports absolute 32-bit relocations only.


12.5 Known Problems

Some known problems of this module at the moment:


12.6 Error Messages

This module has the following error messages:


[ << ] [ >> ]           [] [] [] [ ? ]