diff options
Diffstat (limited to 'libgloss/m68hc11/sim-valid-m68hc12.ld')
-rw-r--r-- | libgloss/m68hc11/sim-valid-m68hc12.ld | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/libgloss/m68hc11/sim-valid-m68hc12.ld b/libgloss/m68hc11/sim-valid-m68hc12.ld index 681bc6d47..6b15ed2e5 100644 --- a/libgloss/m68hc11/sim-valid-m68hc12.ld +++ b/libgloss/m68hc11/sim-valid-m68hc12.ld @@ -145,21 +145,15 @@ SECTIONS { *(.init) } =0 - /* Put trampolines at beginning of text at 0x4400 so that they - are not in memory bank window. */ - .tramp : - { - *(.tramp) - } > text .text : { /* Put startup code at beginning so that _start keeps same address. */ /* Startup code. */ - KEEP (*(.install0)) /* Section should setup the stack pointer. */ - KEEP (*(.install1)) /* Place holder for applications. */ - KEEP (*(.install2)) /* Optional installation of data sections in RAM. */ - KEEP (*(.install3)) /* Place holder for applications. */ - KEEP (*(.install4)) /* Section that calls the main. */ + *(.install0) /* Section should setup the stack pointer. */ + *(.install1) /* Place holder for applications. */ + *(.install2) /* Optional installation of data sections in RAM. */ + *(.install3) /* Place holder for applications. */ + *(.install4) /* Section that calls the main. */ *(.init) *(.text) *(.text.*) @@ -167,11 +161,11 @@ SECTIONS *(.gnu.warning) *(.gnu.linkonce.t.*) /* Finish code. */ - KEEP (*(.fini0)) /* Beginning of finish code (_exit symbol). */ - KEEP (*(.fini1)) /* Place holder for applications. */ - KEEP (*(.fini2)) /* C++ destructors. */ - KEEP (*(.fini3)) /* Place holder for applications. */ - KEEP (*(.fini4)) /* Runtime exit. */ + *(.fini0) /* Beginning of finish code (_exit symbol). */ + *(.fini1) /* Place holder for applications. */ + *(.fini2) /* C++ destructors. */ + *(.fini3) /* Place holder for applications. */ + *(.fini4) /* Runtime exit. */ _etext = .; PROVIDE (etext = .); } > text @@ -179,10 +173,6 @@ SECTIONS { *(.eh_frame) } > text - .gcc_except_table : - { - *(.gcc_except_table) - } > text .rodata : { *(.rodata) @@ -197,13 +187,25 @@ SECTIONS .ctors : { PROVIDE (__CTOR_LIST__ = .); - KEEP (*(.ctors)) + *(.ctors) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) */ PROVIDE(__CTOR_END__ = .); } > text .dtors : { PROVIDE(__DTOR_LIST__ = .); - KEEP (*(.dtors)) + *(.dtors) + /* + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) */ PROVIDE(__DTOR_END__ = .); } > text /* Start of the data section image in ROM. */ @@ -272,7 +274,7 @@ SECTIONS PROVIDE (_vectors_addr = DEFINED (vectors_addr) ? vectors_addr : 0xffc0); .vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 : { - KEEP (*(.vectors)) + *(.vectors) } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -306,5 +308,4 @@ SECTIONS .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } - .debug_ranges 0 : { *(.debug_ranges) } } |