diff options
author | Nick Clifton <nickc@redhat.com> | 2017-08-10 13:17:12 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-08-10 13:17:12 +0100 |
commit | ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e (patch) | |
tree | 881533e6100f31d71082b0005e51bff3377e3c0d /ld/scripttempl/pep.sc | |
parent | 4c2da80c2bdff7761eb5b3d9c03ffa0c9958b6b9 (diff) | |
download | gdb-ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e.zip gdb-ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e.tar.gz gdb-ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e.tar.bz2 |
Add support for PE startup files that want to define their own constructor and desctructor sequencing.
* scripttempl/pep.sc: Enclose __CTOR_LIST__, ___CTOR_LIST__,
__DTOR_LIST__ and ___DTOR_LIST__ in PROVIDE statements so that
they can be overrridden by crt input files.
* scripttempl/pe.sc: Likewise.
Diffstat (limited to 'ld/scripttempl/pep.sc')
-rw-r--r-- | ld/scripttempl/pep.sc | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index 57eb75c..e972ec8 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -98,18 +98,24 @@ SECTIONS ${RELOCATING+*(.glue_7t)} ${RELOCATING+*(.glue_7)} ${CONSTRUCTING+. = ALIGN(8);} - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; - LONG (-1); LONG (-1); - KEEP (*(.ctors)); - KEEP (*(.ctor)); - KEEP (*(SORT(.ctors.*))); - LONG (0); LONG (0); } - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; - LONG (-1); LONG (-1); - KEEP (*(.dtors)); - KEEP (*(.dtor)); - KEEP (*(SORT(.dtors.*))); - LONG (0); LONG (0); } + ${CONSTRUCTING+ + PROVIDE(___CTOR_LIST__ = .); + PROVIDE(__CTOR_LIST__ = .); + LONG (-1); LONG (-1); + KEEP (*(.ctors)); + KEEP (*(.ctor)); + KEEP (*(SORT_BY_NAME(.ctors.*))); + LONG (0); LONG (0); + } + ${CONSTRUCTING+ + PROVIDE(___DTOR_LIST__ = .); + PROVIDE(__DTOR_LIST__ = .); + LONG (-1); LONG (-1); + KEEP (*(.dtors)); + KEEP (*(.dtor)); + KEEP (*(SORT_BY_NAME(.dtors.*))); + LONG (0); LONG (0); + } ${RELOCATING+ KEEP (*(.fini))} /* ??? Why is .gcc_exc here? */ ${RELOCATING+ *(.gcc_exc)} |