Skip to content

Commit 96f19d2

Browse files
committed
make relocation types into an enum
1 parent 2d73bbf commit 96f19d2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

backends/becommon.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ typedef struct Reloc {
5555
int32_t symoff; // offset relative to sym
5656
} Reloc;
5757

58-
#define RELOC_KIND_NONE 0 // no relocation, should not produce an entry
59-
#define RELOC_KIND_DEBUG 1 // not a real relocation, a debug entry
60-
#define RELOC_KIND_I32 2 // add a symbol to a 32 bit value
61-
#define RELOC_KIND_AUGS 3 // relocation for AUGS
62-
#define RELOC_KIND_AUGD 4 // relocation for AUGD
63-
#define RELOC_KIND_FPTR16 5 // relocation for function pointer (16 bits)
64-
#define RELOC_KIND_FPTR12 6 // relocation for function pointer (12 bits)
58+
enum Reloc_Kind {
59+
RELOC_KIND_NONE = 0, // no relocation, should not produce an entry
60+
RELOC_KIND_DEBUG = 1, // not a real relocation, a debug entry
61+
RELOC_KIND_I32 = 2, // add a symbol to a 32 bit value
62+
RELOC_KIND_AUGS = 3, // relocation for AUGS
63+
RELOC_KIND_AUGD = 4, // relocation for AUGD
64+
RELOC_KIND_FPTR16 = 5, // relocation for function pointer (16 bits)
65+
RELOC_KIND_FPTR12 = 6, // relocation for function pointer (12 bits)
66+
};
6567

6668
/* find the backend name for a symbol */
6769
const char *BackendNameForSymbol(Symbol *sym);

0 commit comments

Comments
 (0)