]> git.saurik.com Git - apple/dyld.git/blame - testing/kernel-cache-tests/auxkc-vtable-patching-no-data-const/main.cpp
dyld-851.27.tar.gz
[apple/dyld.git] / testing / kernel-cache-tests / auxkc-vtable-patching-no-data-const / main.cpp
CommitLineData
bc3b7c8c
A
1
2#include <libkern/c++/OSMetaClass.h>
3#include <Kernel/libkern/c++/OSObject.h>
4
5int __cxa_pure_virtual = 0;
6
7#if 0
8class OSObject : public OSMetaClassBase
9{
10 OSDeclareAbstractStructors(OSObject);
11
12public:
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);
29};
30#endif
31
32// OSDefineMetaClassAndAbstractStructors(OSObject, 0);
33/* Class global data */
34OSObject::MetaClass OSObject::gMetaClass;
35const OSMetaClass * const OSObject::metaClass = &OSObject::gMetaClass;
36const OSMetaClass * const OSObject::superClass = NULL;
37
38// Virtual Padding
39OSMetaClassDefineReservedUnused(OSObject, 0);
40OSMetaClassDefineReservedUnused(OSObject, 1);
41OSMetaClassDefineReservedUnused(OSObject, 2);
42OSMetaClassDefineReservedUnused(OSObject, 3);
43OSMetaClassDefineReservedUnused(OSObject, 4);
44OSMetaClassDefineReservedUnused(OSObject, 5);
45OSMetaClassDefineReservedUnused(OSObject, 6);
46OSMetaClassDefineReservedUnused(OSObject, 7);
47OSMetaClassDefineReservedUnused(OSObject, 8);
48OSMetaClassDefineReservedUnused(OSObject, 9);
49OSMetaClassDefineReservedUnused(OSObject, 10);
50OSMetaClassDefineReservedUnused(OSObject, 11);
51OSMetaClassDefineReservedUnused(OSObject, 12);
52OSMetaClassDefineReservedUnused(OSObject, 13);
53OSMetaClassDefineReservedUnused(OSObject, 14);
54OSMetaClassDefineReservedUnused(OSObject, 15);
55
56// struct IORPC { };
57
58// OSMetaClassBase
59OSMetaClassBase::OSMetaClassBase() { }
60OSMetaClassBase::~OSMetaClassBase() { }
61void OSMetaClassBase::_RESERVEDOSMetaClassBase4() { }
62void OSMetaClassBase::_RESERVEDOSMetaClassBase5() { }
63void OSMetaClassBase::_RESERVEDOSMetaClassBase6() { }
64void OSMetaClassBase::_RESERVEDOSMetaClassBase7() { }
65kern_return_t OSMetaClassBase::Dispatch(const IORPC rpc) { return 0; }
66bool OSMetaClassBase::isEqualTo(const OSMetaClassBase*) const { return false; }
67
68// OSMetaClass
69OSMetaClass::OSMetaClass(const char* inClassName, const OSMetaClass* inSuperClass, unsigned int inClassSize) { }
70OSMetaClass::~OSMetaClass() { }
71void OSMetaClass::reservedCalled(int ind) const { }
72void OSMetaClass::retain() const { }
73void OSMetaClass::release() const { }
74void OSMetaClass::release(int freeWhen) const { }
75int OSMetaClass::getRetainCount() const { return 0; }
76const OSMetaClass* OSMetaClass::getMetaClass() const { return NULL; }
77void OSMetaClass::taggedRetain(const void * tag) const { }
78void OSMetaClass::taggedRelease(const void * tag) const { }
79void OSMetaClass::taggedRelease(const void * tag, const int freeWhen) const { }
80bool OSMetaClass::serialize(OSSerialize * serializer) const { return false; }
81void OSMetaClass::instanceConstructed() const { }
82
83// OSMetaClass reserved methods
84void OSMetaClass::_RESERVEDOSMetaClass0() { }
85void OSMetaClass::_RESERVEDOSMetaClass1() { }
86void OSMetaClass::_RESERVEDOSMetaClass2() { }
87void OSMetaClass::_RESERVEDOSMetaClass3() { }
88void OSMetaClass::_RESERVEDOSMetaClass4() { }
89void OSMetaClass::_RESERVEDOSMetaClass5() { }
90void OSMetaClass::_RESERVEDOSMetaClass6() { }
91void OSMetaClass::_RESERVEDOSMetaClass7() { }
92
93// OSObject::MetaClass
94OSObject::MetaClass::MetaClass() : OSMetaClass("OSObject", OSObject::superClass, sizeof(OSObject)) { }
95OSObject *OSObject::MetaClass::alloc() const { return NULL; }
96kern_return_t OSObject::MetaClass::Dispatch(const IORPC rpc) { return 0; }
97
98// OSObject
99OSObject::OSObject(OSMetaClass const*) { }
100OSObject::~OSObject() { }
101const OSMetaClass* OSObject::getMetaClass() const { return NULL; }
102void OSObject::free() { }
103bool OSObject::init() { return false; }
104void OSObject::retain() const { }
105void OSObject::release() const { }
106void OSObject::release(int freeWhen) const { }
107int OSObject::getRetainCount() const { return 0; }
108void OSObject::taggedRetain(const void * tag) const { }
109void OSObject::taggedRelease(const void * tag) const { }
110void OSObject::taggedRelease(const void * tag, const int freeWhen) const { }
111bool OSObject::serialize(OSSerialize * serializer) const { return false; }
112kern_return_t OSObject::Dispatch(const IORPC rpc) { return 0; }
113void* OSObject::operator new(unsigned long) { return (void*)1; }
114void OSObject::operator delete(void*, unsigned long) { return; }
115
116__attribute__((section(("__HIB, __text"))))
117extern "C" int _start() {
118 return 0;
119}