Download CodeWarrior Info on the PPC Target

Transcript
C and C+ + f or Embedded P o wer PC
Linker Issues for Embedded PowerPC
FORCEFILES {main.o}
The FORCEFILES directive does not recognize the file extension
.c. If you use the extension .o the linker will look for your source
file.
If you only have a few symbols that you do not want deadstripped,
use FORCEACTIVE.
GROUP
The GROUP directive lets you organize the linker command file. It is
of the form:
GROUP <address_modifiers> :{ <section_spec> ... }
Please see the topic SECTIONS for the description of the components.
Listing 6.6
Example 1
SECTIONS {
GROUP BIND(0x00010000) : {
.text : {}
.rodata : {*(.rodata) *(extab) *(extabindex)}
}
GROUP BIND(0x2000) : {
.data : {}
.bss : {}
.sdata BIND(0x3500) : {}
.sbss : {}
.sdata2 : {}
.sbss2 : {}
}
GROUP BIND(0xffff8000) : {
.PPC.EMB.sdata0 : {}
.PPC.EMB.sbss0 : {}
}
}
Targeting Embedded PowerPC PPC–195