Refactor buildvm symbol generation.
Fixes Windows and OSX builds with LUAJIT_DISABLE_JIT.
This commit is contained in:
@@ -34,9 +34,6 @@
|
||||
#define LABEL_PREFIX_LIBCF LABEL_PREFIX "lib_cf_"
|
||||
#define LABEL_PREFIX_LIBINIT LABEL_PREFIX "lib_init_"
|
||||
|
||||
/* Extra labels. */
|
||||
#define LABEL_ASM_BEGIN LABEL_PREFIX "vm_asm_begin"
|
||||
|
||||
/* Forward declaration. */
|
||||
struct dasm_State;
|
||||
|
||||
@@ -66,6 +63,11 @@ typedef struct BuildReloc {
|
||||
int type;
|
||||
} BuildReloc;
|
||||
|
||||
typedef struct BuildSym {
|
||||
const char *name;
|
||||
int32_t ofs;
|
||||
} BuildSym;
|
||||
|
||||
/* Build context structure. */
|
||||
typedef struct BuildCtx {
|
||||
/* DynASM state pointer. Should be first member. */
|
||||
@@ -78,12 +80,13 @@ typedef struct BuildCtx {
|
||||
/* Code and symbols generated by DynASM. */
|
||||
uint8_t *code;
|
||||
size_t codesz;
|
||||
int npc, nglob, nsym, nreloc;
|
||||
int npc, nglob, nsym, nreloc, nrelocsym;
|
||||
void **glob;
|
||||
int *perm;
|
||||
int32_t *sym_ofs;
|
||||
BuildSym *sym;
|
||||
const char **relocsym;
|
||||
int32_t *bc_ofs;
|
||||
const char *beginsym;
|
||||
/* Strings generated by DynASM. */
|
||||
const char *const *extnames;
|
||||
const char *const *globnames;
|
||||
const char *dasm_ident;
|
||||
const char *dasm_arch;
|
||||
|
||||
Reference in New Issue
Block a user