summaryrefslogtreecommitdiffhomepage
path: root/include/CompilerKit/XCOFF.h
blob: 45a116a1fe7aa9cf5b7e08a162f6beb516803988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
// Licensed under the Apache License, Version 2.0 (See accompanying
// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
// Official repository: https://github.com/nekernel-org/nectar

#ifndef _NECTAR_XCOFF_H_
#define _NECTAR_XCOFF_H_

#include <CompilerKit/Detail/Config.h>

#define kXCOFF64Magic 0x01F7

#define kXCOFFRelFlg 0x0001
#define kXCOFFExecutable 0x0002
#define kXCOFFLnno 0x0004
#define kXCOFFLSyms 0x0008

namespace CompilerKit {
struct XCoffFileHeader;

/// @brief XCoff file header.
typedef struct XCoffFileHeader {
  UInt16  fMagic;
  UInt16  fTarget;
  UInt16  fNumSecs;
  UInt32  fTimeDat;
  UIntPtr fSymPtr;
  UInt32  fNumSyms;
  UInt16  fOptHdr;  // ?: Number of bytes in optional header
} XCoffFileHeader;

typedef struct XCoffFileHeader* XCoffFileHeaderPtr;
}  // namespace CompilerKit

#endif  // ifndef _NECTAR_XCOFF_H_