aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-09-30 13:29:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-09-30 13:30:15 -0700
commit0209ecb179d48d4a703444a919687cd36f378577 (patch)
treedbba230741a12bf88b9f0a72ba6704b22b8644e1
parentfb2a2d6697bcf099018473cd4249fb1c450dc0ee (diff)
downloadnasm-0209ecb179d48d4a703444a919687cd36f378577.tar.gz
nasm-0209ecb179d48d4a703444a919687cd36f378577.tar.xz
nasm-0209ecb179d48d4a703444a919687cd36f378577.zip
test: add a test for symbol prefixes via %pragma
Add a test for symbol prefixes via %pragma, including overlapping directives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--test/prefixsym.asm22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/prefixsym.asm b/test/prefixsym.asm
new file mode 100644
index 00000000..e35b697d
--- /dev/null
+++ b/test/prefixsym.asm
@@ -0,0 +1,22 @@
+; The FIRST definition of prefixes win, so more specific first
+
+
+%pragma win64 gprefix W64_
+
+%pragma win gprefix W_
+
+%pragma elf gprefix
+%pragma elf lprefix .L.
+
+%pragma output gprefix _
+%pragma output lprefix L.
+
+ extern malloc
+
+ global call_malloc
+call_malloc:
+ call malloc
+ ret
+
+myfunc:
+ jmp call_malloc