2 // RMAC - Reboot's Macro Assembler for all Atari computers
3 // MARK.H - A record of things that are defined relative to any of the sections
4 // Copyright (C) 199x Landon Dyer, 2011-2017 Reboot and Friends
5 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
6 // Source utilised with the kind permission of Landon Dyer
14 // A mark is of the form:
15 // .W <to+flags> section mark is relative to, and flags in upper byte
16 // .L <loc> location of mark in "from" section
17 // .W [from] new from section
18 // .L[L] [symbol] symbol involved in external reference (LL for 64-bit pointers)
19 #define MCHUNK struct _mchunk
21 MCHUNK * mcnext; // Next mark chunk
22 PTR mcptr; // Vector of marks
23 uint16_t mcalloc; // # marks allocted to mark block
24 uint16_t mcused; // # marks used in block
27 #define MWORD 0x0000 // Marked word
28 #define MLONG 0x0100 // Marked long
29 #define MMOVEI 0x0200 // Mark RISC MOVEI instruction
30 #define MGLOBAL 0x0800 // Mark contains global
31 #define MPCREL 0x1000 // Mark is PC-relative
32 #define MCHEND 0x2000 // Indicates end of mark chunk
33 #define MSYMBOL 0x4000 // Mark includes symbol pointer
34 #define MCHFROM 0x8000 // Mark includes change-to-from
37 extern MCHUNK * firstmch;
42 uint32_t MarkRelocatable(uint16_t, uint32_t, uint16_t, uint16_t, SYM *);
43 uint32_t AllocateMark(void);
44 uint32_t MarkImage(register uint8_t * mp, uint32_t siz, uint32_t tsize, int okflag);
45 uint32_t MarkBSDImage(uint8_t *, uint32_t, uint32_t, int);
46 uint32_t CreateELFRelocationRecord(uint8_t *, uint8_t *, uint16_t section);