9 linkEr
9.4.2 Examples of linkage
When virtual and shared sections are used
The following is a sample linker script when virtual and shared sections are used:
OUTPUT_FORMAT("elf32-c17", "elf32-c17", "elf32-c17")
OUTPUT_ARCH(c17)
SEARCH_DIR(.);
SECTIONS
{
/* location counter */
. = 0x0;
/* section information */
.bss 0x000000 :
{
__START_bss = . ;
*(.bss) ;
__END_bss = . ;
}
.data __END_bss : AT( __END_text )
{
__START_data = . ;
*(.data) ;
__END_data = . ;
}
__START_data_lma = LOADADDR( .data );
.text_foo1 __END_data : AT( __START_data_lma+SIZEOF( .data )
{
__START_text_foo1 = . ;
foo1.o(.text) ;
__END_text_foo1 = . ;
}
__START_text_foo1_lma = LOADADDR( .text_foo1 );
.text_foo2 __END_data : AT( __START_text_foo1_lma+SIZEOF( .text_foo1 )
{
__START_text_foo2 = . ;
foo2.o(.text) ;
__END_text_foo2 = . ;
}
__START_text_foo2_lma = LOADADDR( .text_foo2 );
.text_foo3 __END_data : AT( __START_text_foo2_lma+SIZEOF( .text_foo2 )
{
__START_text_foo3 = . ;
foo3.o(.text) ;
__END_text_foo3 = . ;
}
__START_text_foo3_lma = LOADADDR( .text_foo3 );
.rodata 0x008000 :
{
__START_rodata = . ;
*(.rodata) ;
__END_rodata = . ;
}
.text __END_rodata :
{
__START_text = . ;
*(.text) ;
__END_text = . ;
}
}
9-4
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal
Need help?
Do you have a question about the S5U1C17001C and is the answer not in the manual?