From 4a66a112860f56841a847ae3c667b05934e9513a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 25 Aug 2021 16:59:06 -0700 Subject: [PATCH] [LLVMgold.so][test] Make comdat-nodeduplicate.ll work with binutils<2.27 --- llvm/test/tools/gold/X86/comdat-nodeduplicate.ll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll b/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll index c27d91a..e3104d4 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 -- 2.7.4