I am using CodeWarrior Development Studio for Freescale MPC55xx, version 2.9 build 111011 and CodeWarrior IDE version 5.9.0 build 3510
When I build my target, the linker MAP file contains a closures section that ends with the following:
1] _ctors (notype,global) found in Linker Generated Symbol File
1] _ctors$99 (object,global) found in Linker Generated Symbol File
1] _dtors (notype,global) found in Linker Generated Symbol File
1] _dtors$99 (object,global) found in Linker Generated Symbol File
3] .text (section,local) found in filea.o
3] .text.1899 (notype,local) found in filea.o
3] .text (section,local) found in fileb.o
3] .text.1808 (notype,local) found in fileb.o
3] .text (section,local) found in filec.o
3] .text.1206 (notype,local) found in filec.o
This seems to continue for as many files and libraries as are listed in my project's Link Order tab.
There are two things that I notice here:
1. That the closure level jumps from 1] for _dtors$99 to 3] for the first .text section found in filea.o. Everywhere else it seems that the closure level would go 1], then 2] and then 3], but in this case there's no level 2] anywhere.
What's going on?
2. Each object file in my project has (in this part of the link MAP for closures), an entry for a .text section, and then a second .text.XXXX section (where XXXX is some number)
When I look at the disassembly from a compiled source file, e.g. filea.c, with Show Headers, Show Symbol Table, Show Code Modules, Show Data Modules and Verbose Info options turned on in the "EPPC Disassembler" settings page, I see something like this:
entry spndx value size bind type other shndx name
[ 0] 0 00000000 0 LOC (00) NULL(00) 00 (0000)UND
[ 1] 1 00000000 0 LOC (00) FILE(04) 00 (fff1)ABS filea.c
[ 2] 0 00000000 0 LOC (00) SECT(03) 00 (000a).text .text
[ 146] 1791 0000128a 0 LOC (00) NULL(00) 00 (000a).text .text.1899
As you can see there is a .text section with a name of ".text.1899". It has a size of zero.
And at the end of the filea.c.dump file is a table with 3 columns as follows:
entry align flags
[ 0] 0
[ 1] 1
[ 2] 4
[ 3] 4
[ 4] 4
[ 5] 8
[ 146] 1 end_of_section
That last line corresponds to the same index in the symbol table (.symtab) section for the ".text.1899" section.
Can someone explain this? The CodeWarrior Build Tools Reference for Power Architecture Processors manual doesn't cover this.