FreeNOS
kernel
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
22
extern
C
void
constructors
()
23
{
24
for
(
void
(**ctor)() = &
CTOR_LIST
; *ctor; ctor++)
25
{
26
(*ctor)();
27
}
28
}
29
30
extern
C
void
destructors
()
31
{
32
for
(
void
(**dtor)() = &
DTOR_LIST
; *dtor; dtor++)
33
{
34
(*dtor)();
35
}
36
}
37
38
extern
C
void
__cxa_pure_virtual
()
39
{
40
}
41
42
extern
C
void
__dso_handle
()
43
{
44
}
45
46
extern
C
void
__stack_chk_fail
(
void
)
47
{
48
}
49
50
extern
C
int
__cxa_atexit
(
void
(*func) (
void
*),
void
* arg,
void
* dso_handle)
51
{
52
return
(0);
53
}
54
55
extern
C
int
raise
(
int
sig)
56
{
57
return
0;
58
}
CTOR_LIST
void(* CTOR_LIST)()
List of constructors.
Kernel.h
__cxa_atexit
C int __cxa_atexit(void(*func)(void *), void *arg, void *dso_handle)
Definition:
Support.cpp:50
Macros.h
DTOR_LIST
void(* DTOR_LIST)()
List of destructors.
__dso_handle
C void __dso_handle()
Definition:
Support.cpp:42
__stack_chk_fail
C void __stack_chk_fail(void)
Definition:
Support.cpp:46
C
#define C
Used to define external C functions.
Definition:
Macros.h:134
__cxa_pure_virtual
C void __cxa_pure_virtual()
Unknown function, required by g++.
Definition:
Support.cpp:38
constructors
C void constructors()
Invokes all function pointers inside the .ctors section.
Definition:
Support.cpp:22
Support.h
destructors
C void destructors()
Invokes function pointers inside the .dtors section.
Definition:
Support.cpp:30
Generated by
1.8.17