Linker Qualifiers

BASE qualifier - Win32 only

BASE:address

Use this qualifier to change the preferred load address of the image. addressis a decimal or hexadecimal number.

ExeType Default program, dll, modulus
Win32 400000h, 10000000h, 65536

CASESENSITIVE qualifier

CASESENSITIVE:{YES | NO }

Use this qualifier to set the way in which the linker compare symbol names. Specificationof the CASESENSITIVE qualifier without an argument assumes YES as the argument.

ExeType Default
Win32 YES
Win16, DOS, DOSX, X32 NO

COMMENT qualifier

COMMENT comments

Use this to place user comments into a linker response file. All charactersto the end of line are ignored.

DEBUG qualifier

DEBUG:[NONE | FULL]

Use this qualifier to include debug information into the executable file. Youmust use DEBUG when linking if you plan to use the symbolic debugging capabilitiesof the debugger.  The linker default for this qualifier is NONE. Specificationof the DEBUG qualifier without an argument assumes FULL as the argument.

DEBUGTYPE qualifier

DEBUGTYPE:{CV | DWARF}

Use the DEBUGTYPE qualifier to specify the type of debug information to include. The default value is CV (CodeView).

DEF qualifier

DEF:filename

This qualifier is used to specify a module-definition file.

filename is the file specification for a module-definition file. If a fileextension is not specified, ".edf" is assumed.

Note: Only one DEF file can be specified for a link.

DEFAULTLIB qualifier

DEFAULTLIB:library[,library...]

This qualifier adds one or more object libraries to the list that sblink searches when resolving references.  If a file extension is not specified, ".lib" is assumed. Do not list shared objects in this option. Normally this option is never used except by some compilers within object files. This option has little use for normal linking.

DLL qualifier

DLL

This qualifier builds a DLL (dynamically linked library) as the main output file.Use this switch to link Unix shared objects. Generally a DLL contains exportswhich can be used by another program.

Whenever exports are specified, sblink will create a resolution library for theDLL when linking Win32 and Win16 executables.

ENTRY qualifier

ENTRY:symbol

This qualifier is used to specify the starting address of programs or the initializationfunction of DLLs. The default is "_start" for programs and "_startDll"for DLLs and shared objects. For Win32 these names are _start@0 and _startDll@12.

EXETYPE qualifier

EXETYPE:{DOS | DOSX | X32 | WIN16| WIN32 | LINUX | SUNOS}

This qualifier is used to specify the type of image to be created. It must be the first command line qualifier specified. The default value for this qualifier is appropriate for the host operating system. Win32 for Windows based systems, Linux for Linux and SunOS for Solaris.
See also MACHINE

ExeType Meaning
WIN32 Link a Win32 application.
LINUX Link a Linux application.
SUNOS Link a SunOS (Solaris) application.
WIN16 Link a 16-bit Windows application
DOSX Link a 16-bit DOS extended application
X32 Link a 32-bit DOS extended application
DOS Link a 16-bit DOS application

EXPORT qualifier

EXPORT:{entryName [=internalName] [,@ordinal]}

This qualifier allows you to export a function from your program in order to allowother programs to call the function.  Exports are usually defined in a DLL.

entryName is the name of the function as used by a calling program.  Youcan optionally specify internalName, which is the name by which the functionis known in the defining program.  By default, InternalName is the sameas entryName.  The ordinal specifies an index into the exports tablein the range of 1 - 65535; if an ordinal is not specified Sblink assigns one.

FILEALIGN qualifier - Win16 and Win32 only

FILEALIGN:size

Use this qualifier to modify the file alignment of the Program. size is a decimalor hexadecimal number which must be a power of 2.

ExeType Default
Win32 512
Win16, DOSX 16

FIXED qualifier

FIXED[:NO]

This qualifier allows you to specify if the executable file will be linked withfixup information. The default is /FIXED:NO, which means that fixups will be output.Programs generally do not need fixup information and DLLs generally do need fixupinformation.

HEAP qualifier

HEAP:reserve[,commit]

This qualifier is used to specify the size of local heap space to commit and/orreserve.

reserve is a decimal or hexadecimal number which specifies the size in bytes oflocal heap to reserve.

commit is a decimal or hexadecimal number which specifies the size in bytes ofthe local heap to commit.

ExeType Default reserve, commit
Win32 100000h, 1000h
Win16 0

LIBPATH qualifier

LIBPATH:pathname

Use this qualifier to add a path to the library search path. This path is usedto find object library files (.lib, .a) and shared object files (.so).

pathname specifies a series of semi-colon delimited search PATHs.

MACHINE qualifier

MACHINE:{IA32 | SPARC}

This qualifier specifies the target platform for the program. The default is thenative processor of the development system host.

MAP qualifier

MAP[:MapFileName]

Use this qualifier to specify that the addresses of all public symbols are includedin the map file. If a file name is no supplied then the map file name will be thesame as the executable file  name with a ".map" file extension.

MAPLINES qualifier

MAPLINES

Use this qualifier to output line number information in the map file. This optionhas no effect unless the linker is outputting a map file.

MAXREAL qualifier - X32 only

MAXREAL:size

This qualifier is only available for linking X32 executables.  It specifiesthe number of 4K pages of conventional memory (DOS memory) to reserve (not use). The default of 255 pages reserves all available DOS memory.

size is a decimal number in the range 0 - 255.

MAXTBUF qualifier - X32 only

MAXTBUF:size

This qualifier is only available for linking X32 executables.  It specifiesthe maximum number of 4K pages to be used for the DOS transfer buffer.  Thisbuffer is used for DOS file Input and Output.  The default is 2.

size is a decimal number in the range 1 - 15.

NOPACK qualifier

NOPACK

Use this qualifier to specify that Debug information should not be packed.  Debugpacking is the default.

Note: The DEBUG qualifier must be specified in order for packing tooccur.  If DEBUG is not specified the NOPACK qualifier has no effect.

OUT qualifier

OUT:filename

Use this qualifier to specify the Executable or DLL file name to be created bysblink.  If the file extension is ".dll", sblink assumes the DLL qualifierhas been set.

PACKCODE qualifier - DOS and Win16 only

PACKCODE (default)
NOPACKCODE

Use the PACKCODE qualifier to inform the linker that adjacent code segments shouldbe combined into a single segment when possible.

(This qualifier corresponds to the Pack code segments option in the environment.)

RESPATH qualifier

RESPATH:pathname

This qualifier is used to specify a search path for resource ".res"files if the resource file is specified without path information.

pathname specifies a series of semi-colon delimited search PATHs.

RESPATH qualifier

RESPATH:search path

Use this qualifier to add a path, or paths, to the resource file search path.This path is used to find resource files (.res).

SECALIGN qualifier - Win32 and Linux only

SECALIGN:size

Use this qualifier to modify the Section alignment of the Program.

size is a decimal or hexadecimal number which must be a power of 2.

ExeType Default
Win32 4096
Linux 4096
SunOS 65536

SECTION qualifier - win32 only

SECTION:name,[E][R][W][S]

Use this qualifier to change the attributes of a section.

name specifies the section name.

Character Attribute Meaning
E execute Allows code to be executed
R read Allows read operations on data
W write Allows write operations on data
S shared Shares the section with all processes that load the image

SLVM qualifier

SLVM

This qualifier is used to eliminate unused virtual methods (SLVM Smart Link VirtualMethods) from the image file.  This may reduce the size of image files.  Asignificant increase in link times may occur.

STACK qualifier

STACK:reserve[,commit]

This qualifier is used to specify the size of stack space to commit and/or reserve.

reserve is a decimal or hexadecimal number which specifies the size in bytes ofstack address space to reserve.

commit is a decimal or hexadecimal number which specifies the size in bytes ofthe stack address space to commit at load time.

ExeType Default reserve, commit
Win32 100000h, 1000h
Win16 4096
DOS 1024
X32 16384

STUB qualifier - Win32, Win16, DOSX and X32 only

STUB:filename

This qualifier is used to specify the MS-DOS stub file name.

The default is "winstub.exe" for Windows programs, zlx.lod for X32 programs.

filename is a fully qualified file name for the MS-DOS stub.

SUBSYSTEM qualifier

SUBSYSTEM:{CONSOLE | WINDOWS | NATIVE | POSIX | WINDOWSCE}[, major[.minor]]

This qualifier is used to tell the operating system how to run the executable.

major and minor version numbers specify the minimum required version of the subsystem. The arguments are decimal numbers in the range 0 - 65535. The default version is 4.00 for all but POSIX which defaults to 19.90.

SYMTAB qualifier - Linux and SunOS only

SYMTAB

This qualifier causes the linker to output a symbol table for the executable file.The symbol table is not needed for program execution. It is used by some utilityprograms.

VERSION qualifier - Win32 only

VERSION: major[.minor]

Use this qualifier to specify a User version number for the image. The argumentsare decimal numbers in the range 0 - 65535.  The default version is 0.0.