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
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
47 {
48  (void) val;
49 
50  return -1;
51 }
52 
53 extern "C" int64_t
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 
68 }
69 
70 extern "C" void
72 { }
73 
74 extern "C" void
76 { }
77 
78 extern "C" 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
91 {
92  (void) info;
93  return 0;
94 }
95 
96 extern "C" int64_t
98 {
99  (void) info;
100  return 0;
101 }
void __cxa_begin_catch(void)
Definition: dummy_misc.cpp:75
int64_t local_init(struct section_info_t *info)
Definition: dummy_misc.cpp:90
int64_t return_success()
Definition: dummy_misc.cpp:27
constexpr const auto size
void __gxx_personality_v0(void)
Definition: dummy_misc.cpp:79
constexpr const auto addr
Definition: cpuid_x64.h:80
void __cxa_end_catch(void)
Definition: dummy_misc.cpp:71
int atexit(void(*function)(void))
Definition: dummy_misc.cpp:83
int64_t register_eh_frame(void *addr, uint64_t size)
Definition: dummy_misc.cpp:62
#define REGISTER_EH_FRAME_SUCCESS
Definition: error_codes.h:66
int64_t sym_that_returns_failure(int64_t val)
Definition: dummy_misc.cpp:46
int64_t sym_that_returns_success(int64_t val)
Definition: dummy_misc.cpp:54
#define SUCCESS
Definition: error_codes.h:42
int64_t local_fini(struct section_info_t *info)
Definition: dummy_misc.cpp:97