aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-09 11:07:51 +0000
committerNick Clifton <nickc@redhat.com>2003-04-09 11:07:51 +0000
commitd4b6ee6788177878bbf934fdbccbe124e09a46dd (patch)
tree771f2b1c55c0cf4e274e4e55cda995d43cc68462 /ld/scripttempl
parenta3805e4e10604d5d9b469949d6141c5935d9275c (diff)
downloadgdb-d4b6ee6788177878bbf934fdbccbe124e09a46dd.zip
gdb-d4b6ee6788177878bbf934fdbccbe124e09a46dd.tar.gz
gdb-d4b6ee6788177878bbf934fdbccbe124e09a46dd.tar.bz2
Add initX, finiX, ctors, dtors sections to respect C++ constructor/destructor.
Add ctors/dtors start/stop definitions.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf32msp430.sc31
-rw-r--r--ld/scripttempl/elf32msp430_3.sc31
2 files changed, 62 insertions, 0 deletions
diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc
index ba6e03f..c3e78d3 100644
--- a/ld/scripttempl/elf32msp430.sc
+++ b/ld/scripttempl/elf32msp430.sc
@@ -77,13 +77,44 @@ SECTIONS
/* Internal text space. */
.text :
{
+ ${RELOCATING+. = ALIGN(2);}
*(.init)
+ *(.init0) /* Start here after reset. */
+ *(.init1)
+ *(.init2) /* Copy data loop */
+ *(.init3)
+ *(.init4) /* Clear bss */
+ *(.init5)
+ *(.init6) /* C++ constructors. */
+ *(.init7)
+ *(.init8)
+ *(.init9) /* Call main(). */
+
+ ${CONSTRUCTING+ __ctors_start = . ; }
+ ${CONSTRUCTING+ *(.ctors) }
+ ${CONSTRUCTING+ __ctors_end = . ; }
+ ${CONSTRUCTING+ __dtors_start = . ; }
+ ${CONSTRUCTING+ *(.dtors) }
+ ${CONSTRUCTING+ __dtors_end = . ; }
+
${RELOCATING+. = ALIGN(2);}
*(.text)
${RELOCATING+. = ALIGN(2);}
*(.text.*)
+
${RELOCATING+. = ALIGN(2);}
+ *(.fini9) /* */
+ *(.fini8)
+ *(.fini7)
+ *(.fini6) /* C++ destructors. */
+ *(.fini5)
+ *(.fini4)
+ *(.fini3)
+ *(.fini2)
+ *(.fini1)
+ *(.fini0) /* Infinite loop after program termination. */
*(.fini)
+
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > text}
diff --git a/ld/scripttempl/elf32msp430_3.sc b/ld/scripttempl/elf32msp430_3.sc
index 40259bf..15eb517 100644
--- a/ld/scripttempl/elf32msp430_3.sc
+++ b/ld/scripttempl/elf32msp430_3.sc
@@ -74,13 +74,44 @@ SECTIONS
/* Internal text space. */
.text :
{
+ ${RELOCATING+. = ALIGN(2);}
*(.init)
+ *(.init0) /* Start here after reset. */
+ *(.init1)
+ *(.init2)
+ *(.init3)
+ *(.init4)
+ *(.init5)
+ *(.init6) /* C++ constructors. */
+ *(.init7)
+ *(.init8)
+ *(.init9) /* Call main(). */
+
+ ${CONSTRUCTING+ __ctors_start = . ; }
+ ${CONSTRUCTING+ *(.ctors) }
+ ${CONSTRUCTING+ __ctors_end = . ; }
+ ${CONSTRUCTING+ __dtors_start = . ; }
+ ${CONSTRUCTING+ *(.dtors) }
+ ${CONSTRUCTING+ __dtors_end = . ; }
+
${RELOCATING+. = ALIGN(2);}
*(.text)
${RELOCATING+. = ALIGN(2);}
*(.text.*)
+
${RELOCATING+. = ALIGN(2);}
+ *(.fini9)
+ *(.fini8)
+ *(.fini7)
+ *(.fini6) /* C++ destructors. */
+ *(.fini5)
+ *(.fini4)
+ *(.fini3)
+ *(.fini2)
+ *(.fini1)
+ *(.fini0) /* Infinite loop after program termination. */
*(.fini)
+
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > text}