I'm trying to build some sample sources from Keil MDK with GNU embedded compiler.
I have built an secure elf file and tried to make the object file with secure interface like this.
I can get the library file but some warnings and an error occurred. And the object file size is the same as one from ARM compiler.
The linker script file is like this.
ENTRY(Reset_Handler)
MEMORY{ RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x1000000 /* Secure SRAM */}
SECTIONS { .text : { . = ALIGN(4); *(.RESET*) *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* glue arm to thumb code */ *(.glue_7t) /* glue thumb to arm code */ . = ALIGN(4); _etext = .; /* define a global symbols at end of code */ } >RAM .gnu.sgstubs : { . = ALIGN(4); _start_sg = .; *(.gnu*) . = ALIGN(4); _end_sg = .; } >RAM
.data : { . = ALIGN(4); _sdata = .; /* create a global symbol at data start */ *(.data) /* .data sections */ *(.data*) /* .data* sections */ . = ALIGN(4); _edata = .; /* define a global symbol at data end */ } >RAM
. = ALIGN(4); STACK : { KEEP(*(STACK*)); } > RAM
. = ALIGN(4); HEAP : { KEEP(*(HEAP*)); } > RAM
. = ALIGN(4);
.ARM.exidx 0 (NOLOAD) : { *(.ARM.exidx*) } .ARM.attributes 0 : { *(.ARM.attributes) }}
And if I change the above red line to ".ARM.attributes 0 (NOLOAD) : { *(.ARM.attributes)}",
there are no errors but the object file size is quite big.
Could you let me know how I can solve the warnings and error? ^^