FreeNOS
Support.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include <Macros.h>
19#include "Support.h"
20#include "Kernel.h"
21
22extern C void constructors()
23{
24 for (void (**ctor)() = &CTOR_LIST; *ctor; ctor++)
25 {
26 (*ctor)();
27 }
28}
29
30extern C void destructors()
31{
32 for (void (**dtor)() = &DTOR_LIST; *dtor; dtor++)
33 {
34 (*dtor)();
35 }
36}
37
38extern C void __cxa_pure_virtual()
39{
40}
41
42extern C void __dso_handle()
43{
44}
45
46extern C void __stack_chk_fail(void)
47{
48}
49
50extern C int __cxa_atexit(void (*func) (void *), void * arg, void * dso_handle)
51{
52 return (0);
53}
54
55extern C int raise(int sig)
56{
57 return 0;
58}
void(* CTOR_LIST)()
List of constructors.
void(* DTOR_LIST)()
List of destructors.
C void __stack_chk_fail(void)
Definition Support.cpp:46
C void __dso_handle()
Definition Support.cpp:42
C int __cxa_atexit(void(*func)(void *), void *arg, void *dso_handle)
Definition Support.cpp:50
C int raise(int sig)
Definition Support.cpp:55
C void __cxa_pure_virtual()
Unknown function, required by g++.
Definition Support.cpp:38
C void destructors()
Invokes function pointers inside the .dtors section.
Definition Support.cpp:30
C void constructors()
Invokes all function pointers inside the .ctors section.
Definition Support.cpp:22
#define C
Used to define external C functions.
Definition Macros.h:134