Fix PE object build for fastcall entry points into interpreter.

This commit is contained in:
Mike Pall
2010-01-05 22:13:20 +01:00
parent 9df01f96b9
commit b3e3bad0ff
4 changed files with 20 additions and 6 deletions

View File

@@ -284,8 +284,18 @@ void emit_peobj(BuildCtx *ctx)
for (i = nzsym; i < ctx->nsym; i++) {
int pi = ctx->perm[i];
if (pi >= ctx->npc) {
sprintf(name, PEOBJ_SYM_PREFIX LABEL_PREFIX "%s",
ctx->globnames[pi-ctx->npc]);
const char *sym = ctx->globnames[pi-ctx->npc];
const char *p = strchr(sym, '@');
if (p) {
#ifdef PEOBJ_SYMF_PREFIX
sprintf(name, PEOBJ_SYMF_PREFIX LABEL_PREFIX "%s", sym);
#else
sprintf(name, LABEL_PREFIX "%s", sym);
name[p+sizeof(LABEL_PREFIX)] = '\0';
#endif
} else {
sprintf(name, PEOBJ_SYM_PREFIX LABEL_PREFIX "%s", sym);
}
emit_peobj_sym_func(ctx, name, ctx->sym_ofs[pi]);
#if LJ_HASJIT
} else {