Fix build issues in make_object; fix linkage issues

This commit is contained in:
TuxSH
2018-11-06 16:48:07 +01:00
committed by Michael Scire
parent c47a9931d9
commit 504c74bc57
5 changed files with 39 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
/* Note: copied from newlib */
/* Note: copied from newlib or libgcc */
#ifdef __cplusplus
extern "C" {
#endif
@@ -86,15 +86,6 @@ __libc_fini_array (void)
}
#endif
int
__cxa_atexit (void (*fn) (void *),
void *arg,
void *d)
{
return 0;
}
void *__dso_handle = 0;
/*
FUNCTION
<<memmove>>---move possibly overlapping memory

View File

@@ -3,4 +3,21 @@
void *operator new(std::size_t) { for(;;); }
void *operator new[](std::size_t) { for(;;); }
void operator delete(void *) { }
void operator delete(void *, std::size_t) { }
void operator delete[](void *) { }
void operator delete[](void *, std::size_t) { }
extern "C" {
int
__cxa_atexit (void (*fn) (void *),
void *arg,
void *d)
{
return 0;
}
void *__dso_handle = 0;
[[noreturn]] void __cxa_pure_virtual() { for (;;); }
}

View File

@@ -1,4 +1,11 @@
#include <mesosphere/core/make_object.hpp>
#include <mesosphere/processes/KEvent.hpp>
using namespace mesosphere;
int main(void) {
auto obj = MakeObjectRaw<KEvent>();
(void)obj;
for(;;);
return 0;
}