<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - ld: section __DATA/__thread_bss extends beyond end of file, file 'fail.o' for architecture x86_64"
href="https://llvm.org/bugs/show_bug.cgi?id=27059">27059</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ld: section __DATA/__thread_bss extends beyond end of file, file 'fail.o' for architecture x86_64
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Object
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>deadalnix@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>On OSX:
Sample IR:
; ModuleID = '<stdin>'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
%C6object9ClassInfo = type { %C6object9ClassInfo__vtbl*, %C6object9ClassInfo* }
%C6object9ClassInfo__vtbl = type {}
%C6object8TypeInfo__vtbl = type {}
%C6object6Object__vtbl = type {}
%C8test01761A__vtbl = type {}
%C8test01761A = type { %C8test01761A__vtbl* }
%C6object6Object = type { %C6object6Object__vtbl* }
@C6object9ClassInfo__Metadata = linkonce_odr constant { %C6object9ClassInfo,
%C6object9ClassInfo__vtbl } { %C6object9ClassInfo { %C6object9ClassInfo__vtbl*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object9ClassInfo__vtbl }, {
%C6object9ClassInfo, %C6object9ClassInfo__vtbl }*
@C6object9ClassInfo__Metadata, i32 0, i32 1), %C6object9ClassInfo*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object8TypeInfo__vtbl }, {
%C6object9ClassInfo, %C6object8TypeInfo__vtbl }* @C6object8TypeInfo__Metadata,
i32 0, i32 0) }, %C6object9ClassInfo__vtbl zeroinitializer }
@C6object8TypeInfo__Metadata = linkonce_odr constant { %C6object9ClassInfo,
%C6object8TypeInfo__vtbl } { %C6object9ClassInfo { %C6object9ClassInfo__vtbl*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object9ClassInfo__vtbl }, {
%C6object9ClassInfo, %C6object9ClassInfo__vtbl }*
@C6object9ClassInfo__Metadata, i32 0, i32 1), %C6object9ClassInfo*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object6Object__vtbl }, {
%C6object9ClassInfo, %C6object6Object__vtbl }* @C6object6Object__Metadata, i32
0, i32 0) }, %C6object8TypeInfo__vtbl zeroinitializer }
@C6object6Object__Metadata = linkonce_odr constant { %C6object9ClassInfo,
%C6object6Object__vtbl } { %C6object9ClassInfo { %C6object9ClassInfo__vtbl*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object9ClassInfo__vtbl }, {
%C6object9ClassInfo, %C6object9ClassInfo__vtbl }*
@C6object9ClassInfo__Metadata, i32 0, i32 1), %C6object9ClassInfo*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object6Object__vtbl }, {
%C6object9ClassInfo, %C6object6Object__vtbl }* @C6object6Object__Metadata, i32
0, i32 0) }, %C6object6Object__vtbl zeroinitializer }
@C8test01761A__Metadata = linkonce_odr constant { %C6object9ClassInfo,
%C8test01761A__vtbl } { %C6object9ClassInfo { %C6object9ClassInfo__vtbl*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object9ClassInfo__vtbl }, {
%C6object9ClassInfo, %C6object9ClassInfo__vtbl }*
@C6object9ClassInfo__Metadata, i32 0, i32 1), %C6object9ClassInfo*
getelementptr inbounds ({ %C6object9ClassInfo, %C6object6Object__vtbl }, {
%C6object9ClassInfo, %C6object6Object__vtbl }* @C6object6Object__Metadata, i32
0, i32 0) }, %C8test01761A__vtbl zeroinitializer }
@_D8test01762asG65536C8test01761A = thread_local global [65536 x
%C8test01761A*] zeroinitializer
define void @_D8test01764mainFMZv() {
body:
br label %bound_ok
bound_ok: ; preds = %bound_ok, %body
%indvars.iv = phi i64 [ 0, %body ], [ %indvars.iv.next, %bound_ok ]
%0 = getelementptr inbounds [65536 x %C8test01761A*], [65536 x
%C8test01761A*]* @_D8test01762asG65536C8test01761A, i64 0, i64 %indvars.iv
%1 = tail call noalias i8* @_d_allocmemory(i64 8)
%2 = bitcast i8* %1 to i8**
store i8* bitcast (%C6object9ClassInfo__vtbl** getelementptr inbounds ({
%C6object9ClassInfo, %C8test01761A__vtbl }, { %C6object9ClassInfo,
%C8test01761A__vtbl }* @C8test01761A__Metadata, i64 1, i32 0, i32 0) to i8*),
i8** %2, align 8
%3 = bitcast i8* %1 to %C6object6Object*
tail call void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object*
%3)
%4 = bitcast %C8test01761A** %0 to i8**
store i8* %1, i8** %4, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%5 = icmp slt i64 %indvars.iv.next, 65536
br i1 %5, label %bound_ok, label %loop.exit
loop.exit: ; preds = %bound_ok
ret void
}
declare void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object*)
declare i8* @_d_allocmemory(i64)
Compilation:
$ ./bin/llc < fail.ll -o fail.o -filetype=obj
$ gcc -o 'a.out' 'failopt.o'
ld: section __DATA/__thread_bss extends beyond end of file, file 'failopt.o'
for architecture x86_64
collect2: error: ld returned 1 exit status
For reference:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc5/5.3.0/libexec/gcc/x86_64-apple-darwin15.3.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin15.3.0
Configured with: ../configure --build=x86_64-apple-darwin15.3.0
--prefix=/usr/local/Cellar/gcc5/5.3.0
--libdir=/usr/local/Cellar/gcc5/5.3.0/lib/gcc/5
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl014
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking
--enable-checking=release --enable-lto --disable-werror
--with-pkgversion='Homebrew gcc5 5.3.0'
--with-bugurl=<a href="https://github.com/Homebrew/homebrew-versions/issues">https://github.com/Homebrew/homebrew-versions/issues</a>
--enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc5 5.3.0)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>