diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-03-05 10:01:45 -0600 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2011-03-05 10:01:45 -0600 |
commit | 706243ac48cf646d503a3f1ec9e6a28c916694bd (patch) | |
tree | 5d583486a145a9646eccb9d3c4bce4dad45a2a84 /src/usr/module_init.C | |
parent | 5c20d316d21e231daee6455f0a78d5940d59cf23 (diff) | |
download | talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.tar.gz talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.zip |
Merge of PowerHAL project up to commit:
dd45c30bd53d8e6c123165b83842d08117558a3c
Diffstat (limited to 'src/usr/module_init.C')
-rw-r--r-- | src/usr/module_init.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/usr/module_init.C b/src/usr/module_init.C new file mode 100644 index 000000000..93c3f35a7 --- /dev/null +++ b/src/usr/module_init.C @@ -0,0 +1,13 @@ +extern "C" +void _init(void*) +{ + // Call default constructors for any static objects. + extern void (*ctor_start_address)(); + extern void (*ctor_end_address)(); + void(**ctors)() = &ctor_start_address; + while(ctors != &ctor_end_address) + { + (*ctors)(); + ctors++; + } +} |