The test Hello fails on arm32 because of difference between the initializing and using structures
The initializing structure for example in the following function supposes that the offset of the first pointer field equals to 24 bytes
MethodTable * System_Private_CoreLib::System::Object::__getMethodTable()
{
static struct {
unsigned char data0[24];
void* reloc1;
void* reloc2;
void* reloc3;
void* reloc4;
} mt = {
{0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xC1,0xB9,0x38,0xB7},
__typemanager_indirection(),
(void*)&System_Private_CoreLib::System::Object::ToString,
(void*)&System_Private_CoreLib::System::Object::GetHashCode,
(void*)&System_Private_CoreLib::System::Object::Equals,
};
return ( MethodTable * )&mt;
}
class EEType
{
...
#ifdef RHDUMP
public:
#else
private:
#endif
struct RelatedTypeUnion
{
union
{
// Kinds.CanonicalEEType
EEType* m_pBaseType;
EEType** m_ppBaseTypeViaIAT;
// Kinds.ClonedEEType
EEType** m_pCanonicalType;
EEType** m_ppCanonicalTypeViaIAT;
// Kinds.ParameterizedEEType
EEType* m_pRelatedParameterType;
EEType** m_ppRelatedParameterTypeViaIAT;
#if defined(RHDUMP) || defined(BINDER)
UIntTarget m_ptrVal; // ensure this structure is the right size in cross-build scenarios
#endif // defined(RHDUMP) || defined(BINDER)
};
};
UInt16 m_usComponentSize;
UInt16 m_usFlags;
UInt32 m_uBaseSize;
RelatedTypeUnion m_RelatedType;
UInt16 m_usNumVtableSlots;
UInt16 m_usNumInterfaces;
UInt32 m_uHashCode;
#if defined(EETYPE_TYPE_MANAGER)
TypeManagerHandle* m_ppTypeManager;
#endif
TgtPTR_Void m_VTable[]; // make this explicit so the binder gets the right alignment
The test Hello fails on arm32 because of difference between the initializing and using structures
The initializing structure for example in the following function supposes that the offset of the first pointer field equals to 24 bytes
but in the using structure from the file (src/Native/Runtime/inc/eetype.h)
the offset of the first pointer field (
m_ppTypeManager) equals to 20 bytes on arm32.