File: obj.h

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (50 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download | duplicates (6)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* obj.h - constants for Introl object modules */

/* Copyright (C) 1994 Bruce Evans */

#define OBJ_H

#ifndef OMAGIC
# ifdef I80386
#  define OMAGIC 0x86A3
# endif

# ifdef I8086
#  define OMAGIC 0x86A0
# endif

# ifdef MC6809
#  define OMAGIC 0x5331
# endif
#endif

#ifdef LONG_OFFSETS
# define cntooffset cnu4
# define offtocn u4cn
#else
# define cntooffset cnu2
# define offtocn u2cn
#endif

#ifdef MC6809			/* temp don't support alignment at all */
# define ld_roundup( num, boundary, type ) (num)
#else
# define ld_roundup( num, boundary, type ) \
	(((num) + ((boundary) - 1)) & (type) ~((boundary) - 1))
#endif

#define MAX_OFFSET_SIZE 4
#define NSEG 16

/* flag values |SZ|LXXXX|N|E|I|R|A|SEGM|, X not used */

#define A_MASK 0x0010		/* absolute */
#define C_MASK 0x0020		/* common (internal only) */
#define E_MASK 0x0080		/* exported */
#define I_MASK 0x0040		/* imported */
#define N_MASK 0x0100		/* entry point */
#define R_MASK 0x0020		/* relative (in text only) */
#define SEGM_MASK 0x000F	/* segment (if not absolute) */
#define SA_MASK 0x2000		/* offset is storage allocation */
#define SZ_MASK 0xC000		/* size descriptor for value */
#define SZ_SHIFT 14