diff options
Diffstat (limited to 'src/buildvm_asm.c')
-rw-r--r-- | src/buildvm_asm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildvm_asm.c b/src/buildvm_asm.c index 5daab13b..31b6f61e 100644 --- a/src/buildvm_asm.c +++ b/src/buildvm_asm.c | |||
@@ -26,6 +26,14 @@ static void emit_asm_bytes(BuildCtx *ctx, uint8_t *p, int n) | |||
26 | static void emit_asm_reloc(BuildCtx *ctx, BuildReloc *r) | 26 | static void emit_asm_reloc(BuildCtx *ctx, BuildReloc *r) |
27 | { | 27 | { |
28 | const char *sym = ctx->extnames[r->sym]; | 28 | const char *sym = ctx->extnames[r->sym]; |
29 | const char *p = strchr(sym, '@'); | ||
30 | char buf[80]; | ||
31 | if (p) { | ||
32 | /* Always strip fastcall suffix. Wrong for (unused) COFF on Win32. */ | ||
33 | strncpy(buf, sym, p-sym); | ||
34 | buf[p-sym] = '\0'; | ||
35 | sym = buf; | ||
36 | } | ||
29 | switch (ctx->mode) { | 37 | switch (ctx->mode) { |
30 | case BUILD_elfasm: | 38 | case BUILD_elfasm: |
31 | if (r->type) | 39 | if (r->type) |