xref: /haiku/headers/build/private/storage/Pef.h (revision 24159a0c7d6d6dcba9f2a0c1a7c08d2c8167f21b)
1 // Pef.h
2 
3 #ifndef _PEF_H
4 #define _PEF_H
5 
6 #include <SupportDefs.h>
7 
8 typedef char	PefOSType[4];
9 
10 // container header
11 struct PEFContainerHeader {
12 	PefOSType	tag1;
13 	PefOSType	tag2;
14 	PefOSType	architecture;
15 	uint32		formatVersion;
16 	uint32		dateTimeStamp;
17 	uint32		oldDefVersion;
18 	uint32		oldImpVersion;
19 	uint32		currentVersion;
20 	uint16		sectionCount;
21 	uint16		instSectionCount;
22 	uint32		reservedA;
23 };
24 
25 const char	kPEFFileMagic1[4]		= { 'J', 'o', 'y', '!' };
26 const char	kPEFFileMagic2[4]		= { 'p', 'e', 'f', 'f' };
27 const char	kPEFArchitecturePPC[4]	= { 'p', 'w', 'p', 'c' };
28 const char	kPEFContainerHeaderSize	= 40;
29 
30 // section header
31 struct PEFSectionHeader {
32 	int32	nameOffset;
33 	uint32	defaultAddress;
34 	uint32	totalSize;
35 	uint32	unpackedSize;
36 	uint32	packedSize;
37 	uint32	containerOffset;
38 	uint8	sectionKind;
39 	uint8	shareKind;
40 	uint8	alignment;
41 	uint8	reservedA;
42 };
43 
44 const uint32 kPEFSectionHeaderSize		= 28;
45 
46 #endif	// _PEF_H
47 
48 
49