brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 8f6097e Raw
60 lines · plain
1# RUN: llvm-mc -filetype=obj -triple x86_64 %s -o %t2# RUN: llvm-readelf -SsX %t | FileCheck %s3# RUN: llvm-readelf -g %t | FileCheck %s --check-prefix=GROUP4 5## Test that we produce the group sections and that they are before the members6 7# CHECK:       [ 3] .group            GROUP           0000000000000000 {{.*}} 00000c 04     14   1  48# CHECK-NEXT:  [ 4] .foo              PROGBITS        0000000000000000 {{.*}} 000001 00 AXG  0   0  19# CHECK-NEXT:  [ 5] .bar              PROGBITS        0000000000000000 {{.*}} 000001 00 AXG  0   0  110# CHECK-NEXT:  [ 6] .group            GROUP           0000000000000000 {{.*}} 000008 04     14   2  411# CHECK-NEXT:  [ 7] .zed              PROGBITS        0000000000000000 {{.*}} 000001 00 AXG  0   0  112# CHECK-NEXT:  [ 8] .group            GROUP           0000000000000000 {{.*}} 00000c 04     14   4  413# CHECK-NEXT:  [ 9] .baz              PROGBITS        0000000000000000 {{.*}} 000004 00 AXG  0   0  114# CHECK-NEXT:  [10] .rela.baz         RELA            0000000000000000 {{.*}} 000018 18   G 14   9  815# CHECK-NEXT:  [11] sec               PROGBITS        0000000000000000 {{.*}} 000000 00      0   0  116# CHECK-NEXT:  [12] .group            GROUP           0000000000000000 {{.*}} 000008 04     14   3  417# CHECK-NEXT:  [13] .qux              PROGBITS        0000000000000000 {{.*}} 000000 00 AXG  0   0  118# CHECK-NEXT:  [14] .symtab           SYMTAB19 20## Test that g1 and g2 are local, but g3 is an undefined global.21 22# CHECK:      0000000000000000     0 NOTYPE  LOCAL  DEFAULT    4 (.foo)    g123# CHECK-NEXT: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    6 (.group)  g224# CHECK-NEXT: 0000000000000000     0 SECTION LOCAL  DEFAULT   11 (sec)     sec25# CHECK-NEXT: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND           g326 27# GROUP:       COMDAT group section [    3] `.group' [g1] contains 2 sections:28# GROUP-NEXT:     [Index]    Name29# GROUP-NEXT:     [    4]   .foo30# GROUP-NEXT:     [    5]   .bar31# GROUP-EMPTY:32# GROUP-NEXT:  COMDAT group section [    6] `.group' [g2] contains 1 sections:33# GROUP-NEXT:     [Index]    Name34# GROUP-NEXT:     [    7]   .zed35# GROUP-EMPTY:36# GROUP-NEXT:  COMDAT group section [    8] `.group' [g3] contains 2 sections:37# GROUP-NEXT:     [Index]    Name38# GROUP-NEXT:     [    9]   .baz39# GROUP-NEXT:     [   10]   .rela.baz40# GROUP-EMPTY:41# GROUP-NEXT:  group section [   12] `.group' [] contains 1 sections:42# GROUP-NEXT:     [Index]    Name43# GROUP-NEXT:     [   13]   .qux44 45	.section	.foo,"axG",@progbits,g1,comdat46g1:47        nop48 49        .section	.bar,"ax?",@progbits50        nop51 52        .section	.zed,"axG",@progbits,g2,comdat53        nop54 55        .section	.baz,"axG",@progbits,g3,comdat56        .long g357 58.section sec59.section .qux,"axG",@progbits,sec60