brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · ecfdc75 Raw
46 lines · plain
1; REQUIRES: x862 3;; Test we don't get "duplicate symbol" error when bitcode/regular object4;; comdats are used together.5 6; RUN: llvm-as %s -o %t.o7; RUN: llvm-mc -triple=x86_64-pc-linux %p/Inputs/comdat.s -o %t2.o -filetype=obj8; RUN: ld.lld %t.o %t2.o -o %t.so -shared9; RUN: llvm-readobj --symbols %t.so | FileCheck %s10; RUN: ld.lld %t2.o %t.o -o %t2.so -shared11; RUN: llvm-readobj --symbols %t2.so | FileCheck %s --check-prefix=OTHER12 13 14target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"15target triple = "x86_64-unknown-linux-gnu"16 17$c = comdat any18 19define protected void @foo() comdat($c) {20  ret void21}22 23; CHECK: Symbol {24; CHECK:   Name: foo25; CHECK-NEXT:   Value:26; CHECK-NEXT:   Size: 127; CHECK-NEXT:   Binding: Global28; CHECK-NEXT:   Type: Function29; CHECK-NEXT:   Other [30; CHECK-NEXT:     STV_PROTECTED31; CHECK-NEXT:   ]32; CHECK-NEXT:   Section: .text33; CHECK-NEXT: }34 35; OTHER: Symbol {36; OTHER:   Name: foo37; OTHER-NEXT:   Value:38; OTHER-NEXT:   Size: 039; OTHER-NEXT:   Binding: Global40; OTHER-NEXT:   Type: None41; OTHER-NEXT:   Other [42; OTHER-NEXT:     STV_PROTECTED43; OTHER-NEXT:   ]44; OTHER-NEXT:   Section: .text45; OTHER-NEXT: }46