I’m working on a project where I defined two memory regions in .ld file as follows:
MEMORY
{
TEXT_GENERIC_CODE (rx) : ORIGIN = 0x10000000, LENGTH = 64K
TEXT_EXT_LIB_CODE (rx) : ORIGIN = 0x10010000, LENGTH = 0x0000FFF0
}
.text_ext_lib :
{
. = ALIGN(4);
__mysection_start__ = .;
*(.mysection*)
*_ext_lib.o (.text .text*)
__mysection_end__ = .;
} > TEXT_EXT_LIB_CODE
.text_generic_code :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(EXCLUDE_FILE(*_ext_lib.o) .text .text*)
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} > TEXT_GENERIC_CODE
What I want is to generate one .elf (or .bin) for TEXT_EXT_LIB_CODE memory region and another .elf (or .bin) for TEXT_GENERIC_CODE memory region. Is it possible by using gcc?
User contributions licensed under CC BY-SA 3.0