* gas/all/assign.s: New.
[deliverable/binutils-gdb.git] / ld / scripttempl / elfm68hc12.sc
index a0bc4e0d0b63edd2aaa96da024c65a848b36cdd0..f222343097ce2355de0deff78214814ac4569b28 100644 (file)
@@ -28,15 +28,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
   {
     ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
     ${CONSTRUCTING+${CTOR_START}}
-    *(.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)) */
+    KEEP (*(.ctors))
 
     ${CONSTRUCTING+${CTOR_END}}
     ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); }
@@ -45,12 +37,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
 DTOR="  .dtors ${CONSTRUCTING-0} :
   {
     ${CONSTRUCTING+ PROVIDE(__DTOR_LIST__ = .); }
-    *(.dtors)
-    /*
-    KEEP (*crtbegin.o(.dtors))
-    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
-    KEEP (*(SORT(.dtors.*)))
-    KEEP (*(.dtors)) */
+    KEEP (*(.dtors))
     ${CONSTRUCTING+ PROVIDE(__DTOR_END__ = .); }
   } ${RELOCATING+ > ${TEXT_MEMORY}}"
 
@@ -75,7 +62,7 @@ VECTORS="
   PROVIDE (_vectors_addr = DEFINED (vectors_addr) ? vectors_addr : 0xffc0);
   .vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 :
   {
-    *(.vectors)
+    KEEP (*(.vectors))
   }"
 
 #
@@ -100,6 +87,7 @@ MEMORY
   page0 (rwx) : ORIGIN = 0x0, LENGTH = 256
   text  (rx)  : ORIGIN = ${ROM_START_ADDR}, LENGTH = ${ROM_SIZE}
   data        : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
+  eeprom      : ORIGIN = ${EEPROM_START_ADDR}, LENGTH = ${EEPROM_SIZE}
 }
 
 /* Setup the stack on the top of the data memory bank.  */
@@ -110,20 +98,20 @@ esac
 
 STARTUP_CODE="
     /* Startup code.  */
-    *(.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.  */
+    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.  */
 "
 
 FINISH_CODE="
     /* Finish code.  */
-    *(.fini0)          /* Beginning of finish code (_exit symbol).  */
-    *(.fini1)          /* Place holder for applications.  */
-    *(.fini2)          /* C++ destructors.  */
-    *(.fini3)          /* Place holder for applications.  */
-    *(.fini4)          /* Runtime exit.  */
+    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.  */
 "
 
 PRE_COMPUTE_DATA_SIZE="
@@ -165,6 +153,10 @@ BSS_DATA_RELOC="
   .scommon 0 : { *(.scommon) }
 "
 
+SOFT_REGS_RELOC="
+  .softregs 0 : { *(.softregs) }
+"
+
 cat <<EOF
 ${RELOCATING+/* Linker script for 68HC12 executable (PROM).  */}
 ${RELOCATING-/* Linker script for 68HC12 object file (ld -r).  */}
@@ -259,35 +251,34 @@ SECTIONS
       ${RELOCATING+*(.rela.bss.*)}
       ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
     }
+  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
   .rela.stext          ${RELOCATING-0} : { *(.rela.stest) }
+  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
   .rela.etext          ${RELOCATING-0} : { *(.rela.etest) }
+  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
   .rela.sdata          ${RELOCATING-0} : { *(.rela.sdata) }
+  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rela.edata          ${RELOCATING-0} : { *(.rela.edata) }
+  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
   .rela.eit_v          ${RELOCATING-0} : { *(.rela.eit_v) }
-  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
-  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
-  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
-  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
-  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
-  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
-  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
-  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
-  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
-
-  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
-  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
-  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
-  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rel.ebss            ${RELOCATING-0} : { *(.rel.ebss) }
-  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
+  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
   .rel.srodata         ${RELOCATING-0} : { *(.rel.srodata) }
+  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
   .rel.erodata         ${RELOCATING-0} : { *(.rel.erodata) }
+  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
   .rel.got             ${RELOCATING-0} : { *(.rel.got) }
+  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
   .rel.ctors           ${RELOCATING-0} : { *(.rel.ctors) }
+  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
   .rel.dtors           ${RELOCATING-0} : { *(.rel.dtors) }
+  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
   .rel.init            ${RELOCATING-0} : { *(.rel.init) }
+  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
   .rel.fini            ${RELOCATING-0} : { *(.rel.fini) }
+  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
   .rel.plt             ${RELOCATING-0} : { *(.rel.plt) }
+  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
 
   /* Concatenate .page0 sections.  Put them in the page0 memory bank
      unless we are creating a relocatable file.  */
@@ -321,30 +312,39 @@ SECTIONS
     /* .gnu.warning sections are handled specially by elf32.em.  */
     *(.gnu.warning)
     ${RELOCATING+*(.gnu.linkonce.t.*)}
+    ${RELOCATING+*(.tramp)}
+    ${RELOCATING+*(.tramp.*)}
 
     ${RELOCATING+${FINISH_CODE}}
 
     ${RELOCATING+_etext = .;}
     ${RELOCATING+PROVIDE (etext = .);}
-
-  } ${RELOCATING+ > ${TEXT_MEMORY}}
+    ${RELOCATING+. = ALIGN(2);}
+  } ${RELOCATING+ > ${TEXT_MEMORY} =0xa7a7a7a7}
 
   .eh_frame ${RELOCATING-0} :
   {
     KEEP (*(.eh_frame))
   } ${RELOCATING+ > ${TEXT_MEMORY}}
 
+  .gcc_except_table ${RELOCATING-0} :
+  {
+    *(.gcc_except_table)
+  } ${RELOCATING+ > ${TEXT_MEMORY}}
+
   .rodata  ${RELOCATING-0} :
   {
     *(.rodata)
     ${RELOCATING+*(.rodata.*)}
     ${RELOCATING+*(.gnu.linkonce.r*)}
-  } ${RELOCATING+ > ${TEXT_MEMORY}}
+    ${RELOCATING+. = ALIGN(2);}
+  } ${RELOCATING+ > ${TEXT_MEMORY} =0xffffffff}
 
   .rodata1 ${RELOCATING-0} :
   {
     *(.rodata1)
-  } ${RELOCATING+ > ${TEXT_MEMORY}}
+    ${RELOCATING+. = ALIGN(2);}
+  } ${RELOCATING+ > ${TEXT_MEMORY} =0xffffffff}
 
   /* Constructor and destructor tables are in ROM.  */
   ${RELOCATING+${CTOR}}
@@ -378,7 +378,8 @@ SECTIONS
 
     ${RELOCATING+_edata  =  .;}
     ${RELOCATING+PROVIDE (edata = .);}
-  } ${RELOCATING+ > ${DATA_MEMORY}}
+    ${RELOCATING+. = ALIGN(2);}
+  } ${RELOCATING+ > ${DATA_MEMORY} =0xffffffff}
 
   ${RELOCATING+__data_section_size = SIZEOF(.data);}
   ${RELOCATING+PROVIDE (__data_section_size = SIZEOF(.data));}
@@ -393,10 +394,12 @@ SECTIONS
 
   /* Relocation for some bss and data sections.  */
   ${RELOCATING-${BSS_DATA_RELOC}}
+  ${RELOCATING-${SOFT_REGS_RELOC}}
 
   .bss ${RELOCATING-0} :
   {
     ${RELOCATING+__bss_start = .;}
+    ${RELOCATING+*(.softregs)}
     ${RELOCATING+*(.sbss)}
     ${RELOCATING+*(.scommon)}
 
@@ -410,6 +413,12 @@ SECTIONS
   ${RELOCATING+__bss_size = SIZEOF(.bss);}
   ${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));}
 
+  .eeprom ${RELOCATING-0} :
+  {
+    *(.eeprom)
+    *(.eeprom.*)
+  } ${RELOCATING+ > ${EEPROM_MEMORY}}
+
   ${RELOCATING+${VECTORS}}
 
   /* Stabs debugging sections.  */
This page took 0.026507 seconds and 4 git commands to generate.