<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Can't use -fsanitize=address with GNU gold linker"
href="https://bugs.llvm.org/show_bug.cgi?id=40808">40808</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Can't use -fsanitize=address with GNU gold linker
</td>
</tr>
<tr>
<th>Product</th>
<td>Packaging
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>deb packages
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pesa@gentoo.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>When building with -fsanitize=address with the ubuntu xenial packages from
apt.llvm.org, I get some strange link errors on libclang_rt.asan-x86_64.a
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 115 refers to earlier section 16
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 116 refers to earlier section 26
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 117 refers to earlier section 28
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 118 refers to earlier section 31
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 119 refers to earlier section 35
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 120 refers to earlier section 37
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 121 refers to earlier section 40
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 122 refers to earlier section 43
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 123 refers to earlier section 58
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 124 refers to earlier section 68
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 125 refers to earlier section 73
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 126 refers to earlier section 74
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 127 refers to earlier section 75
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 128 refers to earlier section 76
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 129 refers to earlier section 77
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 130 refers to earlier section 78
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 131 refers to earlier section 79
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 132 refers to earlier section 80
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 133 refers to earlier section 81
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 134 refers to earlier section 82
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 135 refers to earlier section 83
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 136 refers to earlier section 84
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 137 refers to earlier section 85
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 138 refers to earlier section 86
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 139 refers to earlier section 87
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 140 refers to earlier section 88
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 141 refers to earlier section 89
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 142 refers to earlier section 90
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 143 refers to earlier section 91
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 144 refers to earlier section 92
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 145 refers to earlier section 93
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 146 refers to earlier section 94
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 147 refers to earlier section 95
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 148 refers to earlier section 96
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 149 refers to earlier section 97
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 150 refers to earlier section 98
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 151 refers to earlier section 99
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 152 refers to earlier section 100
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 153 refers to earlier section 101
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 154 refers to earlier section 102
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 155 refers to earlier section 103
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 156 refers to earlier section 104
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 157 refers to earlier section 106
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 158 refers to earlier section 107
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 159 refers to earlier section 108
/usr/bin/ld.gold: error:
/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.a(asan_allocator.cc.o):
invalid section group 160 refers to earlier section 109
...and a lot more similar errors
This is with
clang version 7.0.1-svn348686-1~exp1~20181221231927.53 (branches/release_70)
but I can also reproduce with
clang version 8.0.0-svn354257-1~exp1~20190218104312.36 (branches/release_80)
and with
clang version 9.0.0-svn354303-1~exp1+0~20190219021401.2088~1.gbp23705f (trunk)</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>