I am porting code from a codewarrior 6.3 project to 10.6. I have assembly code that defines a section of rodata that needs to be put in a defined linker section. This works great in 6.3, but not in 10.6. Target is Coldfire V1 MCF51JE256RM
I have an assembly section defined like so:
.section BooksRange, rodata
mnJAN: .word $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0101
Then in the linker file I have:
.text3 :
{
__START_booksRange = .;
*(.BooksRange)
. = ALIGN(4);
__END_booksRange = .;
} >> code2
This gives me the error: "BooksRange(BooksRange) in file bits_asm.obj is referenced but has not been written. Check your linker command file." And I checked, the data is not in any output binary file.
------------------------------------------------------------------------------------------------------------------
In 6.3 the linker file is the same except for one difference. The *(.BooksRange) line is "*(BooksRange)" with no ".". In 10.6, if there is no "." the linker thinks there is no section defined and puts the data with the rest of the .rodata.
How do you link to a section defined in assembly in Codewarrior 10.6? Why is it not writing the data to the binary files?