[llvm] r309075 - [gold] Enable data-sections by default for the gold-plugin.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 13:28:17 PDT 2017


Hi Davide,

I've started getting these test failures from check-llvm. My gold version
is 2.24. Maybe need to make the checks less precise?

FAIL: LLVM :: tools/gold/X86/multiple-data.s (21000 of 21507)
******************** TEST 'LLVM :: tools/gold/X86/multiple-data.s' FAILED
********************
Script:
--
echo ".data.tin" >
ra/test/tools/gold/X86/Output/multiple-data.s.tmp_order_lto.txt
echo ".data.dipsy" >>
ra/test/tools/gold/X86/Output/multiple-data.s.tmp_order_lto.txt
echo ".data.pat" >>
ra/test/tools/gold/X86/Output/multiple-data.s.tmp_order_lto.txt
ra/./bin/llvm-mc llvm/test/tools/gold/X86/multiple-data.s -o
ra/test/tools/gold/X86/Output/multiple-data.s.tmp.o -filetype=obj
-triple=x86_64-unknown-linux-gnu
ra/./bin/llvm-as llvm/test/tools/gold/X86/Inputs/multiple-data.ll -o
ra/test/tools/gold/X86/Output/multiple-data.s.tmp2.o
/usr/bin/ld.gold -plugin ra/./lib/LLVMgold.so      -m elf_x86_64 -o
ra/test/tools/gold/X86/Output/multiple-data.s.tmp.exe
ra/test/tools/gold/X86/Output/multiple-data.s.tmp2.o
ra/test/tools/gold/X86/Output/multiple-data.s.tmp.o
--section-ordering-file=ra/test/tools/gold/X86/Output/multiple-data.s.tmp_order_lto.txt
ra/./bin/llvm-readobj -elf-output-style=GNU -t
ra/test/tools/gold/X86/Output/multiple-data.s.tmp.exe | ra/./bin/FileCheck
llvm/test/tools/gold/X86/multiple-data.s
--
Exit Code: 1

Command Output (stderr):
--
llvm/test/tools/gold/X86/multiple-data.s:16:15: error: expected string not
found in input
# CHECK-NEXT: 2: 0000000000401104 0 NOTYPE GLOBAL DEFAULT ABS _end
              ^
<stdin>:6:2: note: scanning from here
 2: 0000000000401100 4 OBJECT GLOBAL DEFAULT 2 pat
 ^
<stdin>:12:2: note: possible intended match here
 8: 0000000000401104 0 NOTYPE GLOBAL DEFAULT ABS _end
 ^

--

********************
FAIL: LLVM :: tools/gold/X86/multiple-sections.ll (21005 of 21507)
******************** TEST 'LLVM :: tools/gold/X86/multiple-sections.ll'
FAILED ********************
Script:
--
echo ".text.tin" >
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp_order_lto.txt
echo ".text._start" >>
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp_order_lto.txt
echo ".text.pat" >>
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp_order_lto.txt
ra/./bin/llvm-as llvm/test/tools/gold/X86/multiple-sections.ll -o
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp.o
/usr/bin/ld.gold -plugin ra/./lib/LLVMgold.so      -m elf_x86_64 -o
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp.exe
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp.o
 --section-ordering-file=ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp_order_lto.txt
ra/./bin/llvm-readobj -elf-output-style=GNU -t
ra/test/tools/gold/X86/Output/multiple-sections.ll.tmp.exe |
ra/./bin/FileCheck llvm/test/tools/gold/X86/multiple-sections.ll
--
Exit Code: 1

Command Output (stderr):
--
llvm/test/tools/gold/X86/multiple-sections.ll:18:15: error: expected string
not found in input
; CHECK-NEXT: 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT ABS _end
              ^
<stdin>:8:2: note: scanning from here
 4: 00000000004000c0 15 FUNC GLOBAL DEFAULT 1 _start
 ^
<stdin>:11:2: note: possible intended match here
 7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT ABS _end
 ^

--

********************
Testing Time: 44.69s
********************
Failing Tests (2):
    LLVM :: tools/gold/X86/multiple-data.s
    LLVM :: tools/gold/X86/multiple-sections.ll

  Expected Passes    : 21086
  Expected Failures  : 137
  Unsupported Tests  : 282
  Unexpected Failures: 2

Peter

On Tue, Jul 25, 2017 at 6:47 PM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: davide
> Date: Tue Jul 25 18:47:17 2017
> New Revision: 309075
>
> URL: http://llvm.org/viewvc/llvm-project?rev=309075&view=rev
> Log:
> [gold] Enable data-sections by default for the gold-plugin.
>
> Follow up to r309056.
>
> Added:
>     llvm/trunk/test/tools/gold/X86/Inputs/multiple-data.ll
>     llvm/trunk/test/tools/gold/X86/multiple-data.s
> Modified:
>     llvm/trunk/tools/gold/gold-plugin.cpp
>
> Added: llvm/trunk/test/tools/gold/X86/Inputs/multiple-data.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/
> gold/X86/Inputs/multiple-data.ll?rev=309075&view=auto
> ============================================================
> ==================
> --- llvm/trunk/test/tools/gold/X86/Inputs/multiple-data.ll (added)
> +++ llvm/trunk/test/tools/gold/X86/Inputs/multiple-data.ll Tue Jul 25
> 18:47:17 2017
> @@ -0,0 +1,6 @@
> +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
> +target triple = "x86_64-unknown-linux-gnu"
> +
> + at pat = global i32 33, align 4
> + at tin = global i32 33, align 4
> + at dipsy = global i32 33, align 4
>
> Added: llvm/trunk/test/tools/gold/X86/multiple-data.s
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/
> gold/X86/multiple-data.s?rev=309075&view=auto
> ============================================================
> ==================
> --- llvm/trunk/test/tools/gold/X86/multiple-data.s (added)
> +++ llvm/trunk/test/tools/gold/X86/multiple-data.s Tue Jul 25 18:47:17
> 2017
> @@ -0,0 +1,28 @@
> +# RUN: echo ".data.tin" > %t_order_lto.txt
> +# RUN: echo ".data.dipsy" >> %t_order_lto.txt
> +# RUN: echo ".data.pat" >> %t_order_lto.txt
> +
> +# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-unknown-linux-gnu
> +# RUN: llvm-as %p/Inputs/multiple-data.ll -o %t2.o
> +# RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
> +# RUN:     -m elf_x86_64 -o %t.exe %t2.o %t.o  \
> +# RUN:     --section-ordering-file=%t_order_lto.txt
> +# RUN: llvm-readobj -elf-output-style=GNU -t %t.exe | FileCheck %s
> +
> +# CHECK: Symbol table '.symtab' contains 9 entries:
> +# CHECK-NEXT:    Num:    Value          Size Type    Bind   Vis      Ndx
> Name
> +# CHECK-NEXT:      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
> +# CHECK-NEXT:      1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS
> ld-temp.o
> +# CHECK-NEXT:      2: 0000000000401104     0 NOTYPE  GLOBAL DEFAULT  ABS
> _end
> +# CHECK-NEXT:      3: 0000000000401104     0 NOTYPE  GLOBAL DEFAULT  ABS
> __bss_start
> +# CHECK-NEXT:      4: 0000000000401104     0 NOTYPE  GLOBAL DEFAULT  ABS
> _edata
> +# CHECK-NEXT:      5: 00000000004000e8     0 NOTYPE  GLOBAL DEFAULT    1
> _start
> +# CHECK-NEXT:      6: 00000000004010fc     4 OBJECT  GLOBAL DEFAULT    2
> dipsy
> +# CHECK-NEXT:      7: 00000000004010f8     4 OBJECT  GLOBAL DEFAULT    2
> tin
> +# CHECK-NEXT:      8: 0000000000401100     4 OBJECT  GLOBAL DEFAULT    2
> pat
> +
> +.globl _start
> +_start:
> +  movl $pat, %ecx
> +  movl $dipsy, %ebx
> +  movl $tin, %eax
>
> Modified: llvm/trunk/tools/gold/gold-plugin.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/
> gold-plugin.cpp?rev=309075&r1=309074&r2=309075&view=diff
> ============================================================
> ==================
> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
> +++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Jul 25 18:47:17 2017
> @@ -750,8 +750,9 @@ static std::unique_ptr<LTO> createLTO()
>    // FIXME: Check the gold version or add a new option to enable them.
>    Conf.Options.RelaxELFRelocations = false;
>
> -  // Enable function sections by default.
> +  // Enable function/data sections by default.
>    Conf.Options.FunctionSections = true;
> +  Conf.Options.DataSections = true;
>
>    Conf.MAttrs = MAttrs;
>    Conf.RelocModel = RelocationModel;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170726/01c4f611/attachment.html>


More information about the llvm-commits mailing list