1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
9 // Zapping of ready-to-run specific structures
11 // ======================================================================================
13 #ifndef __ZAPREADYTORUN_H__
14 #define __ZAPREADYTORUN_H__
16 #include "readytorun.h"
18 class ZapReadyToRunHeader : public ZapNode
26 SArray<Section> m_Sections;
28 static int __cdecl SectionCmp(const void* a_, const void* b_)
30 return ((Section*)a_)->type - ((Section*)b_)->type;
34 ZapReadyToRunHeader(ZapImage * pImage)
38 void RegisterSection(DWORD type, ZapNode * pSection)
42 section.pSection = pSection;
43 m_Sections.Append(section);
46 virtual DWORD GetSize()
48 return sizeof(READYTORUN_HEADER) + sizeof(READYTORUN_SECTION) * m_Sections.GetCount();
51 virtual UINT GetAlignment()
56 virtual ZapNodeType GetType()
58 return ZapNodeType_NativeHeader;
61 virtual void Save(ZapWriter * pZapWriter);
64 #endif // __ZAPREADYTORUN_H__