diff options
Diffstat (limited to 'src/buildvm.h')
-rw-r--r-- | src/buildvm.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/buildvm.h b/src/buildvm.h index 6d242207..41038dd6 100644 --- a/src/buildvm.h +++ b/src/buildvm.h | |||
@@ -34,9 +34,6 @@ | |||
34 | #define LABEL_PREFIX_LIBCF LABEL_PREFIX "lib_cf_" | 34 | #define LABEL_PREFIX_LIBCF LABEL_PREFIX "lib_cf_" |
35 | #define LABEL_PREFIX_LIBINIT LABEL_PREFIX "lib_init_" | 35 | #define LABEL_PREFIX_LIBINIT LABEL_PREFIX "lib_init_" |
36 | 36 | ||
37 | /* Extra labels. */ | ||
38 | #define LABEL_ASM_BEGIN LABEL_PREFIX "vm_asm_begin" | ||
39 | |||
40 | /* Forward declaration. */ | 37 | /* Forward declaration. */ |
41 | struct dasm_State; | 38 | struct dasm_State; |
42 | 39 | ||
@@ -66,6 +63,11 @@ typedef struct BuildReloc { | |||
66 | int type; | 63 | int type; |
67 | } BuildReloc; | 64 | } BuildReloc; |
68 | 65 | ||
66 | typedef struct BuildSym { | ||
67 | const char *name; | ||
68 | int32_t ofs; | ||
69 | } BuildSym; | ||
70 | |||
69 | /* Build context structure. */ | 71 | /* Build context structure. */ |
70 | typedef struct BuildCtx { | 72 | typedef struct BuildCtx { |
71 | /* DynASM state pointer. Should be first member. */ | 73 | /* DynASM state pointer. Should be first member. */ |
@@ -78,12 +80,13 @@ typedef struct BuildCtx { | |||
78 | /* Code and symbols generated by DynASM. */ | 80 | /* Code and symbols generated by DynASM. */ |
79 | uint8_t *code; | 81 | uint8_t *code; |
80 | size_t codesz; | 82 | size_t codesz; |
81 | int npc, nglob, nsym, nreloc; | 83 | int npc, nglob, nsym, nreloc, nrelocsym; |
82 | void **glob; | 84 | void **glob; |
83 | int *perm; | 85 | BuildSym *sym; |
84 | int32_t *sym_ofs; | 86 | const char **relocsym; |
87 | int32_t *bc_ofs; | ||
88 | const char *beginsym; | ||
85 | /* Strings generated by DynASM. */ | 89 | /* Strings generated by DynASM. */ |
86 | const char *const *extnames; | ||
87 | const char *const *globnames; | 90 | const char *const *globnames; |
88 | const char *dasm_ident; | 91 | const char *dasm_ident; |
89 | const char *dasm_arch; | 92 | const char *dasm_arch; |