Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall
2013-06-03 17:32:09 +02:00
3 changed files with 15 additions and 9 deletions

View File

@@ -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);