brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 4dc9a5e Raw
49 lines · plain
1// RUN: not llvm-mc -filetype=obj -triple wasm32 %s -o /dev/null 2>&1 | FileCheck %s2 3  .section    .data.foo,"",@4foo:5  .int8       16  .size       foo, 17foo_other:8  .int8       19  .size       foo_other, 110 11  .section    .data.bar,"",@12bar:13  .int8       114  .size       bar, 115 16  .section    .data.fizz,"",@17fizz:18  .int8       119  .size       fizz, 120 21  .section    .data.segment1,"",@22segment1:23// CHECK: 'bar' can not be placed in a different section24  .int32 fizz-bar25// CHECK: 'undef_baz' can not be undefined in a subtraction expression26  .int32 fizz-undef_baz27// CHECK: 'fizz' can not be placed in a different section28  .int32 undef_baz-fizz29  .size       segment1, 1230 31 32  .text33  .section    .text.main,"",@34main:35  .functype   main () -> (i32, i32, i32, i32, i32)36// Expressions involving symbols within the same sections can be evaluated37// prior to writing the object file.38// CHECK-NOT: foo39  i32.const foo-foo_other+240  i32.const foo_other-foo-1041 42// CHECK: 'bar' unsupported subtraction expression used in relocation in code section.43  i32.const foo-bar44// CHECK: 'undef_baz' unsupported subtraction expression used in relocation in code section.45  i32.const foo-undef_baz46// CHECK: 'foo' unsupported subtraction expression used in relocation in code section.47  i32.const undef_baz-foo48  end_function49