aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-22 15:09:08 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-22 15:09:08 +0100
commitcf6e75bd080e50f674954e7dbfd4d4e0c33416ec (patch)
tree03ac4a9d20d25a0806335d8b4c96352d4ff79e78 /extras/mini-os/arch
parent178dcab5201309e3a8f15ecc543aeb80cea0ea96 (diff)
downloadxen-cf6e75bd080e50f674954e7dbfd4d4e0c33416ec.tar.gz
xen-cf6e75bd080e50f674954e7dbfd4d4e0c33416ec.tar.bz2
xen-cf6e75bd080e50f674954e7dbfd4d4e0c33416ec.zip
stubdom: support constructors and destructors
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/arch')
-rw-r--r--extras/mini-os/arch/ia64/minios-ia64.lds17
-rw-r--r--extras/mini-os/arch/x86/minios-x86_32.lds18
-rw-r--r--extras/mini-os/arch/x86/minios-x86_64.lds18
3 files changed, 51 insertions, 2 deletions
diff --git a/extras/mini-os/arch/ia64/minios-ia64.lds b/extras/mini-os/arch/ia64/minios-ia64.lds
index 0b38a34e8e..3122648969 100644
--- a/extras/mini-os/arch/ia64/minios-ia64.lds
+++ b/extras/mini-os/arch/ia64/minios-ia64.lds
@@ -52,6 +52,23 @@ SECTIONS
.fini_array : { *(.fini_array) }
PROVIDE (__fini_array_end = .);
+ .ctors : {
+ __CTOR_LIST__ = .;
+ LONG((__CTOR_END__ - __CTOR_LIST__) / 8 - 2)
+ *(SORT_BY_NAME(.ctors))
+ SORT_BY_NAME(CONSTRUCTORS)
+ LONG(0)
+ __CTOR_END__ = .;
+ }
+
+ .dtors : {
+ __DTOR_LIST__ = .;
+ LONG((__DTOR_END__ - __DTOR_LIST__) / 8 - 2)
+ *(SORT_BY_NAME(.dtors))
+ LONG(0)
+ __DTOR_END__ = .;
+ }
+
.IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - (((5<<(61))+0x100000000) - (1 << 20)))
{ *(.IA_64.unwind_info) }
diff --git a/extras/mini-os/arch/x86/minios-x86_32.lds b/extras/mini-os/arch/x86/minios-x86_32.lds
index 9bd0b77691..40a92ee4e6 100644
--- a/extras/mini-os/arch/x86/minios-x86_32.lds
+++ b/extras/mini-os/arch/x86/minios-x86_32.lds
@@ -28,9 +28,25 @@ SECTIONS
.fini_array : { *(.fini_array) }
PROVIDE (__fini_array_end = .);
+ .ctors : {
+ __CTOR_LIST__ = .;
+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
+ *(SORT_BY_NAME(.ctors))
+ SORT_BY_NAME(CONSTRUCTORS)
+ LONG(0)
+ __CTOR_END__ = .;
+ }
+
+ .dtors : {
+ __DTOR_LIST__ = .;
+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
+ *(SORT_BY_NAME(.dtors))
+ LONG(0)
+ __DTOR_END__ = .;
+ }
+
.data : { /* Data */
*(.data)
- CONSTRUCTORS
}
_edata = .; /* End of data section */
diff --git a/extras/mini-os/arch/x86/minios-x86_64.lds b/extras/mini-os/arch/x86/minios-x86_64.lds
index 361b264c5e..d53d639f2f 100644
--- a/extras/mini-os/arch/x86/minios-x86_64.lds
+++ b/extras/mini-os/arch/x86/minios-x86_64.lds
@@ -28,9 +28,25 @@ SECTIONS
.fini_array : { *(.fini_array) }
PROVIDE (__fini_array_end = .);
+ .ctors : {
+ __CTOR_LIST__ = .;
+ LONG((__CTOR_END__ - __CTOR_LIST__) / 8 - 2)
+ *(SORT_BY_NAME(.ctors))
+ SORT_BY_NAME(CONSTRUCTORS)
+ LONG(0)
+ __CTOR_END__ = .;
+ }
+
+ .dtors : {
+ __DTOR_LIST__ = .;
+ LONG((__DTOR_END__ - __DTOR_LIST__) / 8 - 2)
+ *(SORT_BY_NAME(.dtors))
+ LONG(0)
+ __DTOR_END__ = .;
+ }
+
.data : { /* Data */
*(.data)
- CONSTRUCTORS
}
_edata = .; /* End of data section */