misc_no_hyper_or_libcxx.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 <crt.h>
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 #include <memory.h>
27 
28 extern "C" int64_t
29 start_vmm(uint64_t arg) noexcept
30 { (void) arg; return 0; }
31 
32 extern "C" int64_t
33 stop_vmm(uint64_t arg) noexcept
34 { (void) arg; return 0; }
35 
36 extern "C" int
37 write(int file, const void *buffer, size_t count)
38 {
39  (void) file;
40  (void) buffer;
41  (void) count;
42 
43  return 0;
44 }
45 
46 extern "C" void
48 { }
49 
50 extern "C" void
52 { }
53 
54 extern "C" void
56 { }
57 
58 namespace std
59 {
60 void terminate()
61 { }
62 }
63 
64 extern "C" int64_t
66 { (void) md; return 0; }
67 
68 extern "C" void *
69 memset(void *block, int c, size_t size)
70 {
71  auto dstp = static_cast<unsigned char *>(block);
72 
73  for (auto i = 0UL; i < size; i++)
74  dstp[i] = static_cast<unsigned char>(c);
75 
76  return block;
77 }
78 
79 extern "C" int64_t
81 { (void) info; return CRT_SUCCESS; }
82 
83 extern "C" int64_t
85 { (void) info; return CRT_SUCCESS; }
Definition: file.h:35
void * memset(void *block, int c, size_t size)
int64_t add_md(memory_descriptor *md) noexcept
int64_t stop_vmm(uint64_t arg) noexcept
void __cxa_begin_catch(void)
void __cxa_end_catch(void)
int64_t start_vmm(uint64_t arg) noexcept
constexpr const auto size
void uint64_t uint64_t uint64_t *rdx noexcept
int write(int file, const void *buffer, size_t count)
int64_t local_fini(struct section_info_t *info)
#define CRT_SUCCESS
Definition: error_codes.h:59
void __gxx_personality_v0(void)
int64_t local_init(struct section_info_t *info)