From e434ab505e52cc2cb4ae13b79e7bdf03014cfad7 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Fri, 11 Jan 2013 12:19:53 +0100 Subject: Fix PS3 build. --- src/host/buildvm_asm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/host/buildvm_asm.c') diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c index 08264c8b..2f589aad 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c @@ -147,10 +147,12 @@ static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc switch (ctx->mode) { case BUILD_elfasm: #if LJ_TARGET_PS3 - if (!strncmp(name, "lj_vm_", 6)) { + if (!strncmp(name, "lj_vm_", 6) && + strcmp(name, ctx->beginsym) && + !strstr(name, "hook")) { fprintf(ctx->fp, "\n\t.globl %s\n" - "\n\t.section \".opd\",\"aw\"\n" + "\t.section \".opd\",\"aw\"\n" "%s:\n" "\t.long .%s,.TOC.@tocbase32\n" "\t.size %s,8\n" @@ -215,7 +217,11 @@ void emit_asm(BuildCtx *ctx) fprintf(ctx->fp, "\t.text\n"); emit_asm_align(ctx, 4); +#if LJ_TARGET_PS3 + emit_asm_label(ctx, ctx->beginsym, ctx->codesz, 0); +#else emit_asm_label(ctx, ctx->beginsym, 0, 0); +#endif if (ctx->mode != BUILD_machasm) fprintf(ctx->fp, ".Lbegin:\n"); -- cgit v1.2.3-55-g6feb