Significant progress to getting pl1$pl1 to compile something, implemented many necess...
[multics_sim.git] / object_map.h
1 #ifndef _OBJECT_MAP_H
2 #define _OBJECT_MAP_H
3
4 #include <stdint.h>
5
6 // see pl1/object_map.incl.pl1
7
8 // declare 1 object_map aligned based, /* Structure describing standard object map */
9 struct object_map {
10   // 2 decl_vers fixed bin, /* Version number of current structure format */
11   int64_t decl_vers : 18;
12   uint64_t dummy0 : 46;
13
14   // 2 identifier char (8) aligned, /* Must be the constant "obj_map" */
15   uint64_t identifier[2];
16
17   // 2 text_offset bit (18) unaligned, /* Offset relative to base of object segment of base of text section */
18   // 2 text_length bit (18) unaligned, /* Length in words of text section */
19   uint64_t text_length : 18;
20   uint64_t text_offset : 18;
21   uint64_t dummy1 : 28;
22
23   // 2 definition_offset bit (18) unaligned, /* Offset relative to base of object seg of base of definition section */
24   // 2 definition_length bit (18) unaligned, /* Length in words of definition section */
25   uint64_t definition_length : 18;
26   uint64_t definition_offset : 18;
27   uint64_t dummy2 : 28;
28
29   // 2 linkage_offset bit (18) unaligned, /* Offset relative to base of object seg of base of linkage section */
30   // 2 linkage_length bit (18) unaligned, /* Length in words of linkage section */
31   uint64_t linkage_length : 18;
32   uint64_t linkage_offset : 18;
33   uint64_t dummy3 : 28;
34
35   // 2 static_offset bit (18) unaligned, /* Offset relative to base of obj seg of static section */
36   // 2 static_length bit (18) unaligned, /* Length in words of static section */
37   uint64_t static_length : 18;
38   uint64_t static_offset : 18;
39   uint64_t dummy4 : 28;
40
41   // 2 symbol_offset bit (18) unaligned, /* Offset relative to base of object seg of base of symbol section */
42   // 2 symbol_length bit (18) unaligned, /* Length in words of symbol section */
43   uint64_t symbol_length : 18;
44   uint64_t symbol_offset : 18;
45   uint64_t dummy5 : 28;
46
47   // 2 break_map_offset bit (18) unaligned, /* Offset relative to base of object seg of base of break map */
48   // 2 break_map_length bit (18) unaligned, /* Length in words of break map */
49   uint64_t break_map_length : 18;
50   uint64_t break_map_offset : 18;
51   uint64_t dummy6 : 28;
52
53   // 2 entry_bound bit (18) unaligned, /* Offset in text of last gate entry */
54   // 2 text_link_offset bit (18) unaligned, /* Offset of first text-embedded link */
55   uint64_t text_link_offset : 18;
56   uint64_t entry_bound : 18;
57   uint64_t dummy7 : 28;
58
59   // 2 format aligned, /* Word containing bit flags about object type */
60   //   3 bound bit (1) unaligned, /* On if segment is bound */
61   //   3 relocatable bit (1) unaligned, /* On if segment has relocation info in its first symbol block */
62   //   3 procedure bit (1) unaligned, /* On if segment is an executable object program */
63   //   3 standard bit (1) unaligned, /* On if segment is in standard format (more than just standard map) */
64   //   3 separate_static bit(1) unaligned, /* On if static is a separate section from linkage */
65   //   3 links_in_text bit (1) unaligned, /* On if there are text-embedded links */
66   //   3 perprocess_static bit (1) unaligned, /* On if static is not to be per run unit */
67   //   3 unused bit (29) unaligned; /* Reserved */
68   uint64_t format_unused : 29;
69   uint64_t format_perprocess_static : 1;
70   uint64_t format_links_in_text : 1;
71   uint64_t format_separate_static : 1;
72   uint64_t format_standard : 1;
73   uint64_t format_procedure : 1;
74   uint64_t format_relocatable : 1;
75   uint64_t format_bound : 1;
76   uint64_t dummy8 : 28;
77 };
78
79 // declare map_ptr bit(18) aligned based; /* Last word of the segment. It points to the base of the object map. */
80
81 // declare object_map_version_2 fixed bin static init(2);
82
83 #endif