114 lines
2.0 KiB
Plaintext
114 lines
2.0 KiB
Plaintext
/*
|
|
Linker script for the fxcg50 platform.
|
|
*/
|
|
|
|
OUTPUT_FORMAT(elf32-sh)
|
|
OUTPUT_ARCH(sh4)
|
|
ENTRY(_initialize)
|
|
|
|
/*
|
|
** Linker script for user executables.
|
|
*/
|
|
MEMORY
|
|
{
|
|
/* virtual memory, read-write segment */
|
|
userram (WX) : o = 0x00000000, l = 256k
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
/* Code */
|
|
.text : {
|
|
*(.text);
|
|
*(.text.*);
|
|
|
|
_bctors = . ;
|
|
*(.ctors .ctors.*)
|
|
_ectors = . ;
|
|
|
|
_bdtors = . ;
|
|
*(.dtors .dtors.*)
|
|
_edtors = . ;
|
|
} > userram
|
|
|
|
/* Read-only sections */
|
|
.rodata : {
|
|
/* Read-Only data */
|
|
*(.rodata);
|
|
*(.rodata.*);
|
|
|
|
/* Dynamic symbols */
|
|
*(.hash)
|
|
*(.dynsym)
|
|
*(.dynstr)
|
|
*(.dynbss)
|
|
*(.dynamic)
|
|
|
|
/* Procedure Linkage Table */
|
|
*(.plt)
|
|
|
|
/* GLobal Offset Table */
|
|
*(.got.plt)
|
|
*(.got.*)
|
|
*(.got)
|
|
} > userram
|
|
|
|
/* Relocatable sections */
|
|
.rela.dyn : {
|
|
*(.rela.init)
|
|
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
|
|
*(.rela.fini)
|
|
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
|
|
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
|
|
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
|
|
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
|
|
*(.rela.ctors)
|
|
*(.rela.dtors)
|
|
*(.rela.got)
|
|
*(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
|
|
*(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
|
|
*(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
|
|
*(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
|
|
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
|
*(.rela.iplt)
|
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
|
} > userram
|
|
.rela.plt : {
|
|
*(.rela.plt)
|
|
} > userram
|
|
|
|
.plt : { *(.plt) } > userram
|
|
.iplt : { *(.iplt) } > userram
|
|
|
|
/* readable / writable data */
|
|
.data ALIGN(4) : {
|
|
|
|
/* Data sections */
|
|
*(.data);
|
|
*(.data.*);
|
|
|
|
/* bss section included to avoid missaligned segment */
|
|
*(.bss);
|
|
*(.bss.*);
|
|
*(COMMON);
|
|
} > userram
|
|
|
|
/* unwanted section */
|
|
/DISCARD/ : {
|
|
*(.gnu.*)
|
|
*(.debug_info)
|
|
*(.debug_abbrev)
|
|
*(.debug_loc)
|
|
*(.debug_aranges)
|
|
*(.debug_ranges)
|
|
*(.debug_line)
|
|
*(.debug_str)
|
|
*(.jcr)
|
|
*(.eh_frame_hdr)
|
|
*(.eh_frame)
|
|
*(.comment)
|
|
*(.interp)
|
|
}
|
|
}
|