]>
git.saurik.com Git - apple/dyld.git/blob - testing/kernel-cache-tests/auxkc-vtable-patching-arm64e/main.cpp
2 #include <libkern/c++/OSMetaClass.h>
3 #include <Kernel/libkern/c++/OSObject.h>
5 int __cxa_pure_virtual
= 0;
8 class OSObject
: public OSMetaClassBase
10 OSDeclareAbstractStructors(OSObject
);
13 OSMetaClassDeclareReservedUnused(OSObject
, 0);
14 OSMetaClassDeclareReservedUnused(OSObject
, 1);
15 OSMetaClassDeclareReservedUnused(OSObject
, 2);
16 OSMetaClassDeclareReservedUnused(OSObject
, 3);
17 OSMetaClassDeclareReservedUnused(OSObject
, 4);
18 OSMetaClassDeclareReservedUnused(OSObject
, 5);
19 OSMetaClassDeclareReservedUnused(OSObject
, 6);
20 OSMetaClassDeclareReservedUnused(OSObject
, 7);
21 OSMetaClassDeclareReservedUnused(OSObject
, 8);
22 OSMetaClassDeclareReservedUnused(OSObject
, 9);
23 OSMetaClassDeclareReservedUnused(OSObject
, 10);
24 OSMetaClassDeclareReservedUnused(OSObject
, 11);
25 OSMetaClassDeclareReservedUnused(OSObject
, 12);
26 OSMetaClassDeclareReservedUnused(OSObject
, 13);
27 OSMetaClassDeclareReservedUnused(OSObject
, 14);
28 OSMetaClassDeclareReservedUnused(OSObject
, 15);
32 // OSDefineMetaClassAndAbstractStructors(OSObject, 0);
33 /* Class global data */
34 OSObject::MetaClass
OSObject::gMetaClass
;
35 const OSMetaClass
* const OSObject::metaClass
= &OSObject::gMetaClass
;
36 const OSMetaClass
* const OSObject::superClass
= NULL
;
39 OSMetaClassDefineReservedUnused(OSObject
, 0);
40 OSMetaClassDefineReservedUnused(OSObject
, 1);
41 OSMetaClassDefineReservedUnused(OSObject
, 2);
42 OSMetaClassDefineReservedUnused(OSObject
, 3);
43 OSMetaClassDefineReservedUnused(OSObject
, 4);
44 OSMetaClassDefineReservedUnused(OSObject
, 5);
45 OSMetaClassDefineReservedUnused(OSObject
, 6);
46 OSMetaClassDefineReservedUnused(OSObject
, 7);
47 OSMetaClassDefineReservedUnused(OSObject
, 8);
48 OSMetaClassDefineReservedUnused(OSObject
, 9);
49 OSMetaClassDefineReservedUnused(OSObject
, 10);
50 OSMetaClassDefineReservedUnused(OSObject
, 11);
51 OSMetaClassDefineReservedUnused(OSObject
, 12);
52 OSMetaClassDefineReservedUnused(OSObject
, 13);
53 OSMetaClassDefineReservedUnused(OSObject
, 14);
54 OSMetaClassDefineReservedUnused(OSObject
, 15);
59 OSMetaClassBase::OSMetaClassBase() { }
60 OSMetaClassBase::~OSMetaClassBase() { }
61 kern_return_t
OSMetaClassBase::Dispatch(const IORPC rpc
) { return 0; }
62 bool OSMetaClassBase::isEqualTo(const OSMetaClassBase
*) const { return false; }
65 OSMetaClass::OSMetaClass(const char* inClassName
, const OSMetaClass
* inSuperClass
, unsigned int inClassSize
) { }
66 OSMetaClass::~OSMetaClass() { }
67 void OSMetaClass::reservedCalled(int ind
) const { }
68 void OSMetaClass::retain() const { }
69 void OSMetaClass::release() const { }
70 void OSMetaClass::release(int freeWhen
) const { }
71 int OSMetaClass::getRetainCount() const { return 0; }
72 const OSMetaClass
* OSMetaClass::getMetaClass() const { return NULL
; }
73 void OSMetaClass::taggedRetain(const void * tag
) const { }
74 void OSMetaClass::taggedRelease(const void * tag
) const { }
75 void OSMetaClass::taggedRelease(const void * tag
, const int freeWhen
) const { }
76 bool OSMetaClass::serialize(OSSerialize
* serializer
) const { return false; }
77 void OSMetaClass::instanceConstructed() const { }
79 // OSMetaClass reserved methods
80 // Thee are none of these for arm64e
82 // OSObject::MetaClass
83 OSObject::MetaClass::MetaClass() : OSMetaClass("OSObject", OSObject::superClass
, sizeof(OSObject
)) { }
84 OSObject
*OSObject::MetaClass::alloc() const { return NULL
; }
85 kern_return_t
OSObject::MetaClass::Dispatch(const IORPC rpc
) { return 0; }
88 OSObject::OSObject(OSMetaClass
const*) { }
89 OSObject::~OSObject() { }
90 const OSMetaClass
* OSObject::getMetaClass() const { return NULL
; }
91 void OSObject::free() { }
92 bool OSObject::init() { return false; }
93 void OSObject::retain() const { }
94 void OSObject::release() const { }
95 void OSObject::release(int freeWhen
) const { }
96 int OSObject::getRetainCount() const { return 0; }
97 void OSObject::taggedRetain(const void * tag
) const { }
98 void OSObject::taggedRelease(const void * tag
) const { }
99 void OSObject::taggedRelease(const void * tag
, const int freeWhen
) const { }
100 bool OSObject::serialize(OSSerialize
* serializer
) const { return false; }
101 kern_return_t
OSObject::Dispatch(const IORPC rpc
) { return 0; }
102 void* OSObject::operator new(unsigned long) { return (void*)1; }
103 void OSObject::operator delete(void*, unsigned long) { return; }
105 __attribute__((section(("__TEXT_EXEC, __text"))))
106 extern "C" int _start() {