[llvm] 4a66a11 - [LLVMgold.so][test] Make comdat-nodeduplicate.ll work with binutils<2.27

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 16:59:11 PDT 2021


Author: Fangrui Song
Date: 2021-08-25T16:59:06-07:00
New Revision: 4a66a112860f56841a847ae3c667b05934e9513a

URL: https://github.com/llvm/llvm-project/commit/4a66a112860f56841a847ae3c667b05934e9513a
DIFF: https://github.com/llvm/llvm-project/commit/4a66a112860f56841a847ae3c667b05934e9513a.diff

LOG: [LLVMgold.so][test] Make comdat-nodeduplicate.ll work with binutils<2.27

Added: 
    

Modified: 
    llvm/test/tools/gold/X86/comdat-nodeduplicate.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll b/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
index c27d91a1d437a..e3104d463317e 100644
--- a/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
+++ b/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
@@ -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


        


More information about the llvm-commits mailing list