SLAU131V October 2004 – February 2020
UNION run = FAST_MEM
{
.text:part1: load = SLOW_MEM, { file1.c.obj(.text) }
.text:part2: load = SLOW_MEM, { file2.c.obj(.text) }
}
Since the .text sections contain raw data, they cannot load as a union, although they can be run as a union. Therefore, each requires its own load address. If you fail to provide a load allocation for an initialized section within a UNION, the linker issues a warning and allocates load space anywhere it can in configured memory.
Uninitialized sections are not loaded and do not require load addresses.
The UNION statement applies only to allocation of run addresses, so it is meaningless to specify a load address for the union itself. For purposes of allocation, the union is treated as an uninitialized section: any one allocation specified is considered a run address, and if both run and load addresses are specified, the linker issues a warning and ignores the load address.