aboutsummaryrefslogtreecommitdiffstats
path: root/test/subsection.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-05-30 14:42:06 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2018-05-30 14:42:06 -0700
commitb7136487bd59b943645bbdc917b694340399ab9b (patch)
treebeb67c02211f136f5e734adbc08d3f7bb97c7b32 /test/subsection.asm
parent7310d0bd5b04ea270a6630efa759d3ecf2622b28 (diff)
downloadnasm-b7136487bd59b943645bbdc917b694340399ab9b.tar.gz
nasm-b7136487bd59b943645bbdc917b694340399ab9b.tar.xz
nasm-b7136487bd59b943645bbdc917b694340399ab9b.zip
pragma.c: make the generic "output" and "debug" pragma namespaces work
"output" and "debug" are supposed to redirect to the current output and debug formats. Fix it so it actually does. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'test/subsection.asm')
-rw-r--r--test/subsection.asm39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/subsection.asm b/test/subsection.asm
new file mode 100644
index 00000000..eb0f05d7
--- /dev/null
+++ b/test/subsection.asm
@@ -0,0 +1,39 @@
+;
+; subsection.asm
+;
+; Test of Mach-O subsection_by_symbol
+;
+
+%pragma output subsections_via_symbols
+
+ bits 32
+
+ global foo, bar, quux
+
+%define baz Lbaz
+
+foo:
+ jmp foo
+ jmp bar
+ jmp baz
+ jmp quux
+
+bar:
+ jmp foo
+ jmp bar
+ jmp baz
+ jmp quux
+
+baz:
+ jmp foo
+ jmp bar
+ jmp baz
+ jmp quux
+
+quux:
+ jmp foo
+ jmp bar
+ jmp baz
+ jmp quux
+
+