 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)
}
}
}
|