aboutsummaryrefslogtreecommitdiff
path: root/src/host/buildvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/buildvm.c')
-rw-r--r--src/host/buildvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/host/buildvm.c b/src/host/buildvm.c
index 72b74f1f..b56ec1e1 100644
--- a/src/host/buildvm.c
+++ b/src/host/buildvm.c
@@ -100,6 +100,8 @@ static const char *sym_decorate(BuildCtx *ctx,
100 char *p; 100 char *p;
101#if LJ_64 101#if LJ_64
102 const char *symprefix = ctx->mode == BUILD_machasm ? "_" : ""; 102 const char *symprefix = ctx->mode == BUILD_machasm ? "_" : "";
103#elif LJ_TARGET_XBOX360
104 const char *symprefix = "";
103#else 105#else
104 const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : ""; 106 const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : "";
105#endif 107#endif
@@ -136,7 +138,11 @@ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type)
136 ctx->reloc[ctx->nreloc].sym = relocmap[idx]; 138 ctx->reloc[ctx->nreloc].sym = relocmap[idx];
137 ctx->reloc[ctx->nreloc].type = type; 139 ctx->reloc[ctx->nreloc].type = type;
138 ctx->nreloc++; 140 ctx->nreloc++;
141#if LJ_TARGET_XBOX360
142 return (int)(ctx->code - addr) + 4; /* Encode symbol offset of .text. */
143#else
139 return 0; /* Encode symbol offset of 0. */ 144 return 0; /* Encode symbol offset of 0. */
145#endif
140} 146}
141 147
142/* Naive insertion sort. Performance doesn't matter here. */ 148/* Naive insertion sort. Performance doesn't matter here. */