1// RUN: not llvm-mc -filetype=obj -triple wasm32 %s -o /dev/null 2>&1 | FileCheck %s 2 3 .section .data.foo,"",@ 4foo: 5 .int8 1 6 .size foo, 1 7foo_other: 8 .int8 1 9 .size foo_other, 1 10 11 .section .data.bar,"",@ 12bar: 13 .int8 1 14 .size bar, 1 15 16 .text 17 .section .text.main,"",@ 18main: 19 .functype main () -> (i32) 20// Expressions involving symbols within the same sections can be evaluated 21// prior to writing the object file. 22// CHECK-NOT: foo 23 i32.const foo-foo_other+2 24 i32.const foo_other-foo-10 25 26// CHECK: 'bar': unsupported subtraction expression used in relocation 27 i32.const foo-bar 28// CHECK: 'undef_baz': unsupported subtraction expression used in relocation 29 i32.const foo-undef_baz 30// CHECK: 'foo': unsupported subtraction expression used in relocation 31 i32.const undef_baz-foo 32 end_function 33