[llvm-bugs] [Bug 27150] New: LTO linked llvm-tblgen crashes on startup

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 30 17:26:38 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27150

            Bug ID: 27150
           Summary: LTO linked llvm-tblgen crashes on startup
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Output:
$ ./llvm-tblgen 
Could not open input file '': Bad address

It seems that static constructors aren't properly called.
I noticed the following difference between gold-plugin and lld:

gold-plugin:
$ readelf -SW ./llvm-tblgen |grep "init"
  [11] .init             PROGBITS        0000000000402e00 002e00 00001a 00  AX 
0   0  4
  [25] .init_array       INIT_ARRAY      00000000005a9990 1a8990 000048 00  WA 
0   0  8
$ readelf -SW ./llvm-tblgen |grep "ctors"

#############

lld:
$  readelf -SW ./llvm-tblgen |grep "init"
  [18] .init             PROGBITS        00000000001e4f78 1d4f78 00001a 00  AX 
0   0  4
  [24] .init_array       INIT_ARRAY      00000000001e6010 1d6010 000008 00  WA 
0   0  8

$  readelf -SW ./llvm-tblgen |grep "ctors"
  [25] .ctors            PROGBITS        00000000001e6018 1d6018 000040 00  WA 
0   0  8

Shouldn't we get only an .init_array of size 48 on lld as well?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160331/fbde7a10/attachment.html>


More information about the llvm-bugs mailing list