NASM 0.98.11
[nasm.git] / rdoff / rdoff.h
blob15f26bc972f970cfeddc2d6ad466466006f6aad6
1 ***************
2 *** 9,15 ****
3 * as acknowledgement is given in an appropriate manner to its authors,
4 * with instructions of how to obtain a copy via ftp.
5 */
6 -
7 #ifndef _RDOFF_H
8 #define _RDOFF_H "RDOFF2 support routines v0.3"
10 --- 9,15 ----
11 * as acknowledgement is given in an appropriate manner to its authors,
12 * with instructions of how to obtain a copy via ftp.
15 #ifndef _RDOFF_H
16 #define _RDOFF_H "RDOFF2 support routines v0.3"
18 ***************
19 *** 48,54 ****
20 struct ExportRec {
21 byte type; /* must be 3 */
22 byte reclen; /* content length */
23 - byte segment; /* segment referred to (0/1) */
24 long offset; /* offset within segment */
25 char label[33]; /* zero terminated as above. max len = 32 chars */
27 --- 48,54 ----
28 struct ExportRec {
29 byte type; /* must be 3 */
30 byte reclen; /* content length */
31 + byte segment; /* segment referred to (0/1/2) */
32 long offset; /* offset within segment */
33 char label[33]; /* zero terminated as above. max len = 32 chars */
35 ***************
36 *** 65,70 ****
37 long amount; /* number of bytes BSS to reserve */
40 /* GenericRec - contains the type and length field, plus a 128 byte
41 char array 'data', which will probably never be used! */
43 --- 65,92 ----
44 long amount; /* number of bytes BSS to reserve */
47 + struct ModRec {
48 + byte type; /* must be 8 */
49 + byte reclen; /* content length */
50 + char modname[128]; /* module name */
51 + };
53 + #ifdef _MULTBOOT_H
55 + #define RDFLDRMOVER_SIZE 22
57 + struct MultiBootHdrRec {
58 + byte type; /* must be 9 */
59 + byte reclen; /* content length */
60 + #ifdef __GNUC__
61 + struct tMultiBootHeader mb __attribute__ ((packed)); /* MultiBoot header */
62 + #else
63 + struct tMultiBootHeader mb;
64 + #endif
65 + byte mover[RDFLDRMOVER_SIZE]; /* Mover of RDF loader */
66 + };
67 + #endif
69 /* GenericRec - contains the type and length field, plus a 128 byte
70 char array 'data', which will probably never be used! */
72 ***************
73 *** 82,87 ****
74 struct ExportRec e; /* type == 3 */
75 struct DLLRec d; /* type == 4 */
76 struct BSSRec b; /* type == 5 */
77 } rdfheaderrec;
79 struct SegmentHeaderRec {
80 --- 104,113 ----
81 struct ExportRec e; /* type == 3 */
82 struct DLLRec d; /* type == 4 */
83 struct BSSRec b; /* type == 5 */
84 + struct ModRec m; /* type == 8 */
85 + #ifdef _MULTBOOT_H
86 + struct MultiBootHdrRec mbh; /* type == 9 */
87 + #endif
88 } rdfheaderrec;
90 struct SegmentHeaderRec {
91 ***************
92 *** 166,170 ****
93 int rdfaddsegment(rdf_headerbuf *h, long seglength);
94 int rdfwriteheader(FILE *fp,rdf_headerbuf *h);
95 void rdfdoneheader(rdf_headerbuf *h);
97 #endif /* _RDOFF_H */
98 --- 192,199 ----
99 int rdfaddsegment(rdf_headerbuf *h, long seglength);
100 int rdfwriteheader(FILE *fp,rdf_headerbuf *h);
101 void rdfdoneheader(rdf_headerbuf *h);
103 + /* This is needed by linker to write multiboot header record */
104 + int membuflength(memorybuffer *b);
106 #endif /* _RDOFF_H */