X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fmips%2Flinker.ld;h=75a179e8c90b45883c5ea8bcfc3e82dabcc33b7a;hb=baed1480fbb1d933f73f31a0fcf10b07688aacaf;hp=cc6b351c0ded4c743ab56e90461fc35eda5b8212;hpb=a0aa07add21c04f69d6ea5475f45e3e814eb4b4d;p=org.ibex.core.git diff --git a/src/org/xwt/mips/linker.ld b/src/org/xwt/mips/linker.ld index cc6b351..75a179e 100644 --- a/src/org/xwt/mips/linker.ld +++ b/src/org/xwt/mips/linker.ld @@ -1,32 +1,57 @@ -SEARCH_DIR(build) ENTRY(_start) -STARTUP(org/xwt/imp/crt0.c.o) -INPUT(org/xwt/imp/syscalls.c.o) +/*INPUT(support.o support_aux.o)*/ GROUP(-lc -lgcc) +/*GROUP(-lgcc)*/ __DYNAMIC = 0; SECTIONS { . = 0x10000; .text : { - *(.init) - *(.text) *(.rodata) *(.rodata.*) *(.eh_frame) - *(.fini) + KEEP(*(.init)) + KEEP(*(.fini)) + KEEP(*(.text)) + *(.text.*) + } + + _etext = .; + + .ctors : + { + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) } . = ALIGN(4k); + + .rodata : { + *(.rodata*) *(.eh_frame) *(.jcr) + } + .data : { - *(.data) + *(.data*) } + . = ALIGN(16); - PROVIDE(_gp = . + 0x8000); + _gp = . + 0x8000; .sdata : { - *(.rosdata) *(.sdata) + *(.rosdata*) *(.sdata*) } .sbss : { - *(.sbss) *(.scommon) + *(.sbss*) *(.scommon*) } .bss : { - *(.bss) *(COMMON) + *(.bss*) *(COMMON) } + _end = .; }