ctr_makecro

Introduction

ctr_makecro is a Windows program for making .cro files.
ctr_makecro also has features that are necessary for making .cro files such as a feature for making and updating the .xrl files that are necessary to create .cro files and a feature for creating files that are then given to the linker from .xrl files.

For more information, see the Guide to Developing a Build System (for High-Level DLLs).

How to Use


Create .CRO and .CRS Files

What Is Required

The following files are used for creating .cro and .crs files.

Commands

% ctr_makecro -o CRO_FILE -t RLT_FILE -d XRL_FILE [-r REF_FILE [-r REF_FILE2 ...]] AXF_FILE

Options

Options Description
-o CRO_FILE Specifies the output path for the .cro or .crs file.
The .xrl file specified with the -d option determines whether a .cro or .crs file is created.
-t RLT_FILE Specifies the output path for the .rlt file.
This .rlt file is necessary for creating a .crr file.
-d XRL_FILE Specifies the .xrl file that contains the details for the .cro file.
-r REF_FILE Specifies the .xrl file that is referenced to resolve offsets.
To specify multiple .xrl files, specify the -r option multiple times in the command.
AXF_FILE Specifies the .axf file to convert to a .cro file.

Merge Undefined Symbols in .XRL Files

What Is Required

The following files are used when merging undefined .xrl symbols.

Commands

% ctr_makecro -c [-i|-e] -o OUT_FILE -r REF_FILE [-r REF_FILE2 ...] BASE_FILE

When specifying options, make sure to specify either the -i or -e option. If you do not specify either option, the export type for undefined symbols is symbol.

Options

Options Description
-c Specifies to merge the undefined symbols in the .xrl files.
-i Specifies index as the export type for undefined symbols.
-e Specifies offset as the export type for undefined symbols.
-o OUTPUT_FILE Specifies the output path for the .xrl file.
-r REF_FILE Specifies the .xrl file for dynamic modules.
To specify multiple .xrl files, specify the -r option multiple times in the command.
BASE_FILE Specifies the .xrl file for static modules.

Resolve .XRL File References

What Is Required

The following files are used when resolving .xrl file references.

Commands

% ctr_makecro -f -o OUT_FILE -r REF_FILE1 [-r REF_FILE2 ...] BASE_FILE

Options

Options Description
-f Specifies to resolve .xrl file references.
-o OUTPUT_FILE Specifies the output path for the .xrl file.
-r XRL_FILE Specifies the .xrl file to reference for dynamic modules.
To specify multiple .xrl files, specify the -r option multiple times in the command.
BASE_FILE Specifies the .xrl file for which references are resolved.

Create .XRL Files

What Is Required

The following files are used when creating .xrl files.

Commands

% ctr_makecro -l [-a] [-i|-e] -o OUT_FILE PLF_FILE

Specify the -a option when you create .xrl files for static modules. If you do not specify the -a option, .xrl files for dynamic modules are created.

When specifying options, make sure to specify either the -i or -e option. If you do not specify either option, the export type is symbol.

Options

Options Description
-l Specifies the creation of the .xrl file.
-a Specifies that the .xrl file is for static modules.
-i Specifies index as the export type.
-e Specifies offset as the export type.
-o OUTPUT_FILE Specifies the output path for the .xrl file.
PLF_FILE Specifies the .plf file that is used to create the .xrl file.

Merge .XRL Files

What Is Required

The following files are used when merging .xrl files.

Commands

% ctr_makecro -m -o OUT_FILE -d XRL_FILE1 -d XRL_FILE2 [-n MODULE_NAME] [-g]

Options

Options Description
-m Specifies the merging of the .xrl files.
-o OUTPUT_FILE Specifies the output path for the .xrl file.
-d XRL_FILE Specifies the .xrl files to merge.
Two .xrl files must be specified.
-n MODULE_NAME Specifies the name for the merged module.
-g Specifies that no error occurs if there are duplicate symbols.

Record an Offset for .XRL Files

What Is Required

The following files are used when recording an offset for .xrl files.

Commands

% ctr_makecro -p -o OUT_FILE -d IN_FILE AXF_FILE

Options

Options Description
-p Specifies the recording of an offset to the .xrl file.
-o OUTPUT_FILE Specifies the output path for the .xrl file.
-d IN_FILE Specifies the base .xrl file.
AXF_FILE Specifies the .axf file that was the basis for the .cro file that corresponds to the IN_FILE file.

Create Steering Files

What Is Required

The following files are used when you create a steering file.

Commands

% ctr_makecro -s -o OUT_FILE XRL_FILE

Options

Options Description
-s Specifies the creation of a steering file.
-o OUTPUT_FILE Specifies the output path for the file.
XRL_FILE Specifies the .xrl file that is the basis for the steering file.

Replace Unresolved Symbols

What Is Required

The following files are used when replacing unresolved symbols.

Commands

% ctr_makecro -u SYMBOL -o OUT_FILE AXF_FILE

Options

Options Description
-u SYMBOL Specifies the replacement of unresolved symbols.
SYMBOL specifies the symbols to replace.
-o OUTPUT_FILE Specifies the output path for the file.
AXF_FILE Specifies the .axf file for which unresolved symbols are replaced.

Create a Command File for Forced Exports

What Is Required

The following files are used when creating a command file for forced exports.

Commands

% ctr_makecro -x [-y SYMBOL] -o OUT_FILE XRL_FILE

Options

Options Description
-x Specifies the creation of a command file for forced exports.
-y SYMBOL Specifies the names of the symbols that force an export when they are added.
-o OUTPUT_FILE Specifies the output path for the file.
XRL_FILE Specifies the .xrl file that is the basis for the command file.

Create a Command File for Forced Imports

What Is Required

The following files are used when creating a command file for forced imports.

Commands

% ctr_makecro -w -o OUT_FILE XRL_FILE

Options

Options Description
-w Specifies the creation of a command file for forced imports.
-o OUTPUT_FILE Specifies the output path for the file.
XRL_FILE Specifies the .xrl file that is the basis for the command file.

Revision History

2012/06/22
Initial version.

CONFIDENTIAL