1 // RUN
: not llvm-mc
-filetype
=obj
-triple wasm32
%s
-o
/dev
/null
2>&1 | FileCheck
%s
3 .section .data.foo,"",@
11 .section .data.bar,"",@
16 .section .data.fizz,"",@
21 .section .data.segment1,"",@
23 // CHECK
: 'bar' can
not be placed in
a different section
25 // CHECK
: 'undef_baz' can
not be undefined in
a subtraction expression
27 // CHECK
: 'fizz' can
not be placed in
a different section
33 .section .text.main,"",@
35 .functype main () -> (i32, i32, i32, i32, i32)
36 // Expressions involving symbols within the same sections can
be evaluated
37 // prior to writing the object file.
39 i32.const foo-foo_other+
2
40 i32.const foo_other-foo-
10
42 // CHECK
: 'bar' unsupported subtraction expression used in relocation in code section.
44 // CHECK
: 'undef_baz' unsupported subtraction expression used in relocation in code section.
45 i32.const foo-undef_baz
46 // CHECK
: 'foo' unsupported subtraction expression used in relocation in code section.
47 i32.const undef_baz-foo