I use a link file as below,it is ok in keil,but in codeblock,there are always errors "multiple definition of `XXXX' ":
SECTIONS
{
. = 0xD8000000;
__start_ipl_startup = .;
.iplsec1 : { ipl_startup.o ipl_startup2.o(.text .rodata .data .bss) }
__end_ipl_startup = .;
. = 0xA0000200;
__start_ipl_main = .;
.iplsec2 : { mxc_ipl.o mx27nfc.o (.text .rodata .data .bss) }
__end_ipl_main = .;
. = 0xA1000000;
__start_spl_main = .;
.spl : {spl_boot.o nand_driver.o spl_jump.o(.text .rodata .data .bss) }
__end_spl_main = .;
}
oh, it is due the compiler which I changed from arm gcc to codesourcery gcc, the later accept *ipl_startup.o .... instead of ipl_startup.o....