Question: Can the GROUP and UNION directives be nested in the SECTIONS directive of the linker command file ?

Answer: No, you can not next GROUP and UNION directives in the linker command file. You can, however, group input sections within a UNION directive (A GROUP directive groups output sections). This accomplishes the same thing since in most cases, the linker continuously allocates output sections. For example:

 
MEMORY
{
        EXT0:   org=0x001000  len=0x800
        RAM0:   org=0x809800  len=0x400
}
 
SECTIONS
{
        UNION run=RAM0
        {
                .text1: load=EXT0
                {
                        file1.obj(.text)
                        file2.obj(.text)
                }
                .text2: load=EXT0
                {
                        file3.obj(.text)
                        file4.obj(.text)
                }
        }
}

Device: TMS320C8x
Category: TI Tools
Detail: Code Generation Tools
Detail2: Assembler / Linker
Title: GROUP and UNION directives nested
Source: Case from the TMS320 Hotline
Date: 4/28/98
GenId: aa2

© Copyright 1998 Texas Instruments Incorporated. All rights reserved.
Trademarks, Important Notice!