aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--coroutine/amd64/Context.S10
-rw-r--r--coroutine/x86/Context.S11
3 files changed, 11 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index 6e9a96b9ad..62ee3fe592 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -419,7 +419,7 @@ $(srcdir)/enc/jis/props.h: enc/jis/props.kwd
.$(ASMEXT).@OBJEXT@:
@$(ECHO) assembling $<
- $(Q) $(CC) $(ASFLAGS) -o $@ -c $<
+ $(Q) $(CC) $(ASFLAGS) -DSYMBOL_PREFIX=$(SYMBOL_PREFIX) -o $@ -c $<
.c.$(ASMEXT):
@$(ECHO) translating $<
diff --git a/coroutine/amd64/Context.S b/coroutine/amd64/Context.S
index 6193993e03..42fe79c164 100644
--- a/coroutine/amd64/Context.S
+++ b/coroutine/amd64/Context.S
@@ -5,14 +5,14 @@
## Copyright, 2018, by Samuel Williams. All rights reserved.
##
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
.text
-# For older linkers
-.globl _coroutine_transfer
-_coroutine_transfer:
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
-.globl coroutine_transfer
-coroutine_transfer:
# Save caller state
pushq %rbp
pushq %rbx
diff --git a/coroutine/x86/Context.S b/coroutine/x86/Context.S
index d6a0a2def7..001b699a30 100644
--- a/coroutine/x86/Context.S
+++ b/coroutine/x86/Context.S
@@ -5,14 +5,13 @@
## Copyright, 2018, by Samuel Williams. All rights reserved.
##
-.text
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
-.globl coroutine_transfer
-coroutine_transfer:
+.text
-# For older linkers
-.globl _coroutine_transfer
-_coroutine_transfer:
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# Save caller registers
pushl %ebp