diff options
Diffstat (limited to 'ld/scripttempl/pe.sc')
-rw-r--r-- | ld/scripttempl/pe.sc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index 9f7b2b2..5de44e5 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -97,10 +97,24 @@ SECTIONS ${RELOCATING+ *(.gnu.linkonce.t.*)} ${RELOCATING+*(.glue_7t)} ${RELOCATING+*(.glue_7)} - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; - LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); } - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; - LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); } + ${CONSTRUCTING+ + PROVIDE(___CTOR_LIST__ = .); + PROVIDE(__CTOR_LIST__ = .); + LONG (-1); + KEEP(*(.ctors)); + KEEP(*(.ctor)); + KEEP(*(SORT_BY_NAME(.ctors.*))); + LONG (0); + } + ${CONSTRUCTING+ + PROVIDE(___DTOR_LIST__ = .); + PROVIDE(__DTOR_LIST__ = .); + LONG (-1); + KEEP(*(.dtors)); + KEEP(*(.dtor)); + KEEP(*(SORT_BY_NAME(.dtors.*))); + LONG (0); + } ${RELOCATING+ KEEP (*(.fini))} /* ??? Why is .gcc_exc here? */ ${RELOCATING+ *(.gcc_exc)} |