From 338e9863c220462201fde0e725aba4002310c849 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 3 Jun 2013 17:30:35 +0200 Subject: PPC: Add plt suffix for external calls from assembler code. --- src/host/buildvm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/host') diff --git a/src/host/buildvm.c b/src/host/buildvm.c index ba8fbcba..2ce3b638 100644 --- a/src/host/buildvm.c +++ b/src/host/buildvm.c @@ -108,10 +108,16 @@ static const char *sym_decorate(BuildCtx *ctx, sprintf(name, "%s%s%s", symprefix, prefix, suffix); p = strchr(name, '@'); if (p) { +#if LJ_TARGET_X86ORX64 if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) name[0] = '@'; else *p = '\0'; +#elif (LJ_TARGET_PPC || LJ_TARGET_PPCSPE) && !LJ_TARGET_CONSOLE + /* Keep @plt. */ +#else + *p = '\0'; +#endif } p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ strcpy(p, name); -- cgit v1.2.3-55-g6feb