16.6. The Load Image Format (--load_image Option)¶
A load image is an object file which contains the load addresses and initialized sections of one or more executable files. The load image object file can be used for ROM masking or can be relinked in a subsequent link step.
Several command-line options allow you to control the format of the file produced when --load_image is used. Options allow you to do the following:
Create a relocatable or executable output file with the --load_image:file_type option.
Specify the ABI, machine type, and endianness with the --load_image:format, --load_image:machine, and --load_image:endian options, respectively.
Combine sections, add a prefix to section names, or include load addresses in the output file with the --load_image:combine_sections, --load_image:section_prefix, and --load_image:section_addresses options.
Choose whether to output symbols and specify their binding in the output with the --load_image:output_symbols and --load_image:symbol_binding options.
Control whether individual symbols are local or global with the -load_image:localize and --load_image:globalize options.
These command-line options are described in Hex Conversion Utility Options.
16.6.1. Load Image Section Formation¶
The load image sections are formed by collecting the initialized sections from the input executables. There are two ways the load image sections are formed:
Using the ROMS Directive. Each memory range that is given in the ROMS directive denotes a load image section. The romname is the section name. The origin and length parameters are required. The memwidth, romwidth, and files parameters are invalid and are ignored. When using the ROMS directive and the load_image option, the --image option is required.
Default Load Image Section Formation. If no ROMS directive is given, the load image sections are formed by combining contiguous initialized sections in the input executables. Sections with gaps smaller than the target word size are considered contiguous. The default section names are image_1, image_2, and so on. If another prefix is desired, the --load_image:section_prefix=prefix option can be used.
16.6.2. Load Image Characteristics¶
All load image sections are initialized data sections. In the absence of a ROMS directive, the load/run address of the load image section is the load address of the first input section in the load image section. If the SECTIONS directive was used and a different load address was given using the paddr parameter, this address will be used.
The load image format always creates a single load image object file. The format of the load image object file is determined based on the input files. The file is not marked executable and does not contain an entry point. The default load image object file name is ti_load_image.o
. This can be changed using the --outfile option. Only one --outfile option is valid when creating a load image, all other occurrences are ignored.
Note
Concerning Load Image Format These options are invalid when creating a load image:
--memwidth
--romwidth
--zero
--byte
If a boot table is being created, either using the SECTIONS directive or the --boot option, the ROMS directive must be used.