bfdrivers
dummy_misc
dummy_misc.cpp
Go to the documentation of this file.
1
//
2
// Bareflank Hypervisor
3
//
4
// Copyright (C) 2015 Assured Information Security, Inc.
5
// Author: Rian Quinn <quinnr@ainfosec.com>
6
// Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7
//
8
// This library is free software; you can redistribute it and/or
9
// modify it under the terms of the GNU Lesser General Public
10
// License as published by the Free Software Foundation; either
11
// version 2.1 of the License, or (at your option) any later version.
12
//
13
// This library is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
// Lesser General Public License for more details.
17
//
18
// You should have received a copy of the GNU Lesser General Public
19
// License along with this library; if not, write to the Free Software
20
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22
#include <stddef.h>
23
#include <stdint.h>
24
#include <
error_codes.h
>
25
26
int64_t
27
return_success
()
28
{
return
SUCCESS
; }
29
30
void
*
31
operator
new
(
size_t
size
)
32
{
33
(void)
size
;
34
35
static
int
mem
= 0;
36
return
&
mem
;
37
}
38
39
void
40
operator
delete
(
void
*ptr)
throw
()
41
{
42
(void) ptr;
43
}
44
45
extern
"C"
int64_t
46
sym_that_returns_failure
(int64_t val)
47
{
48
(void) val;
49
50
return
-1;
51
}
52
53
extern
"C"
int64_t
54
sym_that_returns_success
(int64_t val)
55
{
56
(void) val;
57
58
return
0;
59
}
60
61
extern
"C"
int64_t
62
register_eh_frame
(
void
*
addr
, uint64_t
size
)
63
{
64
(void) addr;
65
(void) size;
66
67
return
REGISTER_EH_FRAME_SUCCESS
;
68
}
69
70
extern
"C"
void
71
__cxa_end_catch
(
void
)
72
{ }
73
74
extern
"C"
void
75
__cxa_begin_catch
(
void
)
76
{ }
77
78
extern
"C"
void
79
__gxx_personality_v0
(
void
)
80
{ }
81
82
extern
"C"
int
83
atexit
(
void
(*
function
)(
void
))
84
{
85
(void)
function
;
86
return
0;
87
}
88
89
extern
"C"
int64_t
90
local_init
(
struct
section_info_t
*info)
91
{
92
(void) info;
93
return
0;
94
}
95
96
extern
"C"
int64_t
97
local_fini
(
struct
section_info_t
*info)
98
{
99
(void) info;
100
return
0;
101
}
__cxa_begin_catch
void __cxa_begin_catch(void)
Definition:
dummy_misc.cpp:75
intel_x64::vmcs::vm_exit_instruction_information::lldt::mem_reg::mem
constexpr const auto mem
Definition:
vmcs_intel_x64_32bit_read_only_data_fields.h:2372
local_init
int64_t local_init(struct section_info_t *info)
Definition:
dummy_misc.cpp:90
error_codes.h
return_success
int64_t return_success()
Definition:
dummy_misc.cpp:27
x64::page_table::pml4::size
constexpr const auto size
Definition:
page_table_entry_x64.h:46
__gxx_personality_v0
void __gxx_personality_v0(void)
Definition:
dummy_misc.cpp:79
x64::cpuid::addr_size::addr
constexpr const auto addr
Definition:
cpuid_x64.h:80
__cxa_end_catch
void __cxa_end_catch(void)
Definition:
dummy_misc.cpp:71
atexit
int atexit(void(*function)(void))
Definition:
dummy_misc.cpp:83
register_eh_frame
int64_t register_eh_frame(void *addr, uint64_t size)
Definition:
dummy_misc.cpp:62
REGISTER_EH_FRAME_SUCCESS
#define REGISTER_EH_FRAME_SUCCESS
Definition:
error_codes.h:66
sym_that_returns_failure
int64_t sym_that_returns_failure(int64_t val)
Definition:
dummy_misc.cpp:46
sym_that_returns_success
int64_t sym_that_returns_success(int64_t val)
Definition:
dummy_misc.cpp:54
section_info_t
Definition:
crt.h:107
SUCCESS
#define SUCCESS
Definition:
error_codes.h:42
local_fini
int64_t local_fini(struct section_info_t *info)
Definition:
dummy_misc.cpp:97
Generated on Fri Apr 28 2017 22:11:37 by
1.8.14