diff --git a/Makefile b/Makefile index 26ebf403a65d846888331eae63d561ee40389589..a586c528e4c39e983195ddbab306f761767fbe9d 100644 --- a/Makefile +++ b/Makefile @@ -129,3 +129,4 @@ scripts_basic config %config: $(MAKE) -f Makefile.kconfig $@ .config: silentoldconfig + diff --git a/arch/lm32/ram.ld b/arch/lm32/ram.ld index 9bb997495210aa1838cf98f9ec318a7d10b4965c..5b63de0e992e7ee482e504c2733ca4cf2681ffca 100644 --- a/arch/lm32/ram.ld +++ b/arch/lm32/ram.ld @@ -36,114 +36,24 @@ MEMORY SECTIONS { + .boot : { *(.boot) } > ram - .boot : { *(.boot) } > ram + .text : { *(.text .text.*) } > ram =0 - /* Code */ - .text : - { - . = ALIGN(4); - _ftext = .; - _ftext_rom = LOADADDR(.text); - *(.text .stub .text.* .gnu.linkonce.t.*) - *(.gnu.warning) - KEEP (*(.init)) - KEEP (*(.fini)) - /* Constructors and destructors */ - KEEP (*crtbegin*.o(.ctors)) - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - KEEP (*crtbegin*.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - KEEP (*(.jcr)) - _etext = .; - } > ram =0 + .rodata : { *(.rodata .rodata.*) } > ram - /* Exception handlers */ - .eh_frame_hdr : { *(.eh_frame_hdr) } > ram - .eh_frame : { KEEP (*(.eh_frame)) } > ram - .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } > ram + .data : { + *(.data .data.*) + _gp = ALIGN(16) + 0x7ff0; /* FIXME: what is this? */ + } > ram - /* Read-only data */ - .rodata : - { - . = ALIGN(4); - _frodata = .; - _frodata_rom = LOADADDR(.rodata); - *(.rodata .rodata.* .gnu.linkonce.r.*) - *(.rodata1) - _erodata = .; - } > ram + .bss : { + _fbss = .; + *(.bss .bss.*) + *(COMMON) + _ebss = .; + } > ram - /* Data */ - .data : - { - . = ALIGN(4); - _fdata = .; - _fdata_rom = LOADADDR(.data); - *(.data .data.* .gnu.linkonce.d.*) - *(.data1) - SORT(CONSTRUCTORS) - _gp = ALIGN(16) + 0x7ff0; - *(.sdata .sdata.* .gnu.linkonce.s.*) - _edata = .; - } > ram - - /* BSS */ - .bss : - { - . = ALIGN(4); - _fbss = .; - *(.dynsbss) - *(.sbss .sbss.* .gnu.linkonce.sb.*) - *(.scommon) - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - . = ALIGN(4); - _ebss = .; - _end = .; - PROVIDE (end = .); - } > ram - - /* First location in stack is highest address in RAM */ - PROVIDE(_fstack = ORIGIN(ram) + LENGTH(ram) - 4); - - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + /* First location in stack is highest address in RAM */ + PROVIDE(_fstack = ORIGIN(ram) + LENGTH(ram) - 4); }