[LLVMgold.so][test] Make comdat-nodeduplicate.ll work with binutils<2.27
authorFangrui Song <i@maskray.me>
Wed, 25 Aug 2021 23:59:06 +0000 (16:59 -0700)
committerFangrui Song <i@maskray.me>
Wed, 25 Aug 2021 23:59:06 +0000 (16:59 -0700)
llvm/test/tools/gold/X86/comdat-nodeduplicate.ll

index c27d91a..e3104d4 100644 (file)
@@ -35,8 +35,9 @@
 ; RUN: opt --module-summary %t/b.ll -o %t/b.bc
 ; RUN: opt --module-summary %t/c.ll -o %t/c.bc
 
+;; gold from binutils>=2.27 discards b.bc:__profc_foo even in the absence of --gc-sections.
 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
-; RUN:   -u foo %t/a.bc --start-lib %t/b.bc %t/c.bc --end-lib -o %t/abc
+; RUN:   -u foo %t/a.bc --start-lib %t/b.bc %t/c.bc --end-lib -o %t/abc --gc-sections
 ; RUN: llvm-readelf -x .data %t/abc | FileCheck %s --check-prefix=DATA
 
 ;--- a.ll