Linker and librarian
Contents
1. Command line format
1.1. Options
1.2. Name mangling
2. Linker options
2.1. BASE
2.2. DEBUG
2.3. DEBUGTYPE
2.4. DLL
2.5. ENTRY
2.6. EXPORT
2.7. FINAL
2.8. FORCE
2.9. MAP
2.10. NOLOGO
2.11. OUT
2.12. SUBSYSTEM
2.13. VERBOSE
3. Librarian options
3.1. EXPORT
3.2. IMPORT
3.3. NOLOGO
3.4. OUT
3.5. SPLIT
The utilities support the same command line format: after the name of the utility you
can specify any number of options and file names in any order using space or tab as
a delimiter. File names with spaces should be enclosed in double quotes.
The file names can be also specified using wildcards. An argument starting
with symbol '@' is interpreted as 'response file name'. The response file is a
standard text file every line of which should be one option or one file name.
The linker and the librarian use the same rules to elaborate options:
- in the case of illegal option name the linker and the librarian don't produce any error
message so you can use option sign ('-' or '/') as a comment for any line in the response
file;
- all option names are case insensitive;
- all values of options are case sensitive.
The linker and the librarian do not support
any conventions about name mangling so you must use the exact form of the name.
For example, if you want to create a DLL using Microsoft run-time libraries
you have to use __DllMainCRTStartup@12
instead of _DllMainCRTStartup
as it is described in the Microsoft technical documentation.
This part describes the linker options.
- Syntax
/BASE:address
- Description
- The option sets a base address for the output executable image. The default location for the
.EXE file is 0x400000 and for the .DLL file is 0x10000000. The option can be useful for
advanced users only.
- Syntax
/DEBUG
- Description
- This option stores debugging information for the .EXE or the .DLL file. The information can
be used by the Visual Eiffel debugger only, unless
DEBUGTYPE
option is specified
- Syntax
/DEBUGTYPE:CV
- Description
- This option allows to store source lines debugging information in the format that
can be used under MS debugger. Has no effect, if
DEBUG
option is not specified
- Syntax
/DLL
- Description
- This option builds a DLL file instead of an EXE file. To produce a DLL the linker invokes
librarian to process the export symbols described in the command line.
- Syntax
/ENTRY:symbol
- Description
- This option sets an entry point for an .EXE or a .DLL file.
- Syntax
/EXPORT:symbol
- Description
- The option sets the name of the export symbol of your program.
- Syntax
/FINAL
- Description
- When this option is set the linker removes unreachable code from the
output image and compacts it by merging sections of the same type into
the corresponding single section
- Syntax
/FORCE
- Description
- This option tells the linker to create a target file even if some errors occur during
the linking process. A file created with this option may not run as expected.
- Syntax
/MAP[:filename]
- Description
- This option tells the linker to create a .MAP file. By default the name of the .MAP file
coinsides with the name of the executable module. To override the default name of the file,
specify the preferred name after a semicolon.
- Syntax
/NOLOGO
- Description
- This option suppresses an output of the copyright and version message.
- Syntax
/OUT:filename
- Description
- The option overrides the default name and location of the linker target file.
- Syntax
/SUBSYSTEM:{CONSOLE|WINDOWS}
- Description
- This option tells the linker how to describe the target application: as a character-mode
application (CONSOLE - this is a default) or as a non-console application (WINDOWS).
- Syntax
/VERBOSE
- Description
- The option tells the linker to display details about the linking process.
- Syntax
/EXPORT:symbol
- Description
- The option sets the name of the export symbol for the program.
- Syntax
/IMPORT:symbol
- Description
- The option is used to build an import library. This option sets the name of the import
symbol that must be included in the import library.
- Syntax
/NOLOGO
- Description
- This option suppresses an output of the copyright and version message.
- Syntax
/OUT:filename
- Description
- The option overrides the default name and location of the librarian target file. The
filename is used as a base name for all possible target files (as example, for both export
and import libraries).
- Syntax
/SPLIT
- Description
- The option tells the librarian to split the library into the object files. Every such a file has
the name mmb1.obj, mmb2.obj,... and corresponds to one library member. In
addition, the file with extension .lst is created that can be used as a catalog of all the above
files.
Copyright ©
Object Tools -- info@object-tools.com
Last updated: 2005/02/02 11:51:35