Professional Documents
Culture Documents
ALINK is a linker for OBJ and LIB files, and generates MSDOS COM and
MSDOS EXE files, and Win32 PE files. Win32 resource files are also supported
for linking to PE files. MS/Intel OMF and MS-COFF object and library files
are supported. MS-COFF import libraries are not supported, and will cause
an undefined symbol error in a .idata section.
ALINK @response.fil
The alignments must be powers of 2. ObjectAlign can be 512 to 256Mb, FileAlign can
be 512 to 64K. The Image base and alignments can be specified as decimal numbers,
or as
hex numbers prefixed by 0x (in fact, any number format supported by the C function
strtoul). The image base must be a multiple of 64K.
e.g.
Generates file2.exe
Segments from different object files are combined if they have the same name
and class, and are not declared private. Absolute segments are never
combined, and stack segments are always combined.
Segments are emitted in the order they are present in the object files,
unless groups are used. All segments in groups are emitted before segments
not in groups. A segment may not be in more than one group. Segments in groups
are emitted in the order specified in the group definition. If two different
definitions of the same group specify different orders, the first definition
is used.
code,data,stack,bss
The text output from the linker is quite verbose, and lists all the files as
they are loaded in. Any unrecognised object records will cause an error. Any
recognised, but ignored records, such as LINNUM records and COMENT records
will be printed on the screen. Since debug information is often contained in
COMENT records, this could lead to a lot of output.
The map file will list the segments, publics, imports and exports.
A sample Import library for Win32 is included as win32.lib. All named exports in
Kernel32, User32, GDI32, Shell32, ADVAPI32, version,winmm, lz32,commdlg and commctl
are included. Use
or specify
INCLUDELIB "win32"
See test.asm, my sample program, which calls up a message box both ways.
anthony_w@geocities.com