brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 4950846 Raw
119 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=x86_64 %s | llvm-readelf -s - | FileCheck %s2# RUN: not llvm-mc -filetype=obj -triple=x86_64 --defsym ERR=1 %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:3# RUN: not llvm-mc -filetype=obj -triple=x86_64 --defsym ERR2=1 %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2 --implicit-check-not=error:4 5// This is a long test that checks that the aliases created by weakref are6// never in the symbol table and that the only case it causes a symbol to7// be output as a weak undefined symbol is if that variable is not defined8// in this file and all the references to it are done via the alias.9 10# CHECK:      Num:    Value          Size Type    Bind   Vis       Ndx Name11# CHECK-NEXT:   0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT   UND 12# CHECK-NEXT:   1: 0000000000000000     0 SECTION LOCAL  DEFAULT     2 .text13# CHECK-NEXT:   2: 0000000000000018     0 NOTYPE  LOCAL  DEFAULT     2 bar614# CHECK-NEXT:   3: 0000000000000018     0 NOTYPE  LOCAL  DEFAULT     2 bar715# CHECK-NEXT:   4: 000000000000001c     0 NOTYPE  LOCAL  DEFAULT     2 bar816# CHECK-NEXT:   5: 0000000000000020     0 NOTYPE  LOCAL  DEFAULT     2 bar917# CHECK-NEXT:      0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND bar218# CHECK-NEXT:      0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND bar419# CHECK-NEXT:      0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND bar520# CHECK-NEXT:      0000000000000028     0 NOTYPE  GLOBAL DEFAULT     2 bar1021# CHECK-NEXT:      0000000000000030     0 NOTYPE  GLOBAL DEFAULT     2 bar1122# CHECK-NEXT:      0000000000000030     0 NOTYPE  GLOBAL DEFAULT     2 bar1223# CHECK-NEXT:      0000000000000034     0 NOTYPE  GLOBAL DEFAULT     2 bar1324# CHECK-NEXT:      0000000000000038     0 NOTYPE  GLOBAL DEFAULT     2 bar1425# CHECK-NEXT:      0000000000000040     0 NOTYPE  GLOBAL DEFAULT     2 bar1526# CHECK-NEXT:      0000000000000000     0 NOTYPE  WEAK   DEFAULT   UND bar327# CHECK-NEXT:      0000000000000000     0 NOTYPE  WEAK   DEFAULT   UND bar1628# CHECK-EMPTY:29 30        .weakref foo1, bar131 32        .weakref foo2, bar233        .long bar234 35        .weakref foo3, bar336        .long foo337 38        .weakref foo4, bar439        .long foo440        .long bar441 42        .weakref foo5, bar543        .long bar544        .long foo545 46bar6:47        .weakref foo6, bar648 49bar7:50        .weakref foo7, bar751        .long bar752 53bar8:54        .weakref foo8, bar855        .long foo856 57bar9:58        .weakref foo9, bar959        .long foo960        .long bar961 62bar10:63        .global bar1064        .weakref foo10, bar1065        .long bar1066        .long foo1067 68bar11:69        .global bar1170        .weakref foo11, bar1171 72bar12:73        .global bar1274        .weakref foo12, bar1275        .long bar1276 77bar13:78        .global bar1379        .weakref foo13, bar1380        .long foo1381 82bar14:83        .global bar1484        .weakref foo14, bar1485        .long foo1486        .long bar1487 88bar15:89        .global bar1590        .weakref foo15, bar1591        .long bar1592        .long foo1593 94.long foo1695.weakref foo16, bar1696 97.ifdef ERR98alias:99.weakref alias, target100# ERR: [[#@LINE-1]]:1: error: symbol 'alias' is already defined101 102.set alias1, 1103.weakref alias1, target104# ERR: [[#@LINE-1]]:1: error: symbol 'alias1' is already defined105 106.weakref alias2, target107.set alias2, 1108# ERR: [[#@LINE-1]]:14: error: redefinition of 'alias2'109.endif110 111.ifdef ERR2112.weakref cycle0, cycle1113.weakref cycle1, cycle0114call cycle0115# ERR2: <unknown>:0: error: cyclic dependency detected for symbol 'cycle0'116# ERR2: [[#@LINE-2]]:6: error: expected relocatable expression117 118.endif119