[llvm-bugs] [Bug 40808] New: Can't use -fsanitize=address with GNU gold linker

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 21 12:11:56 PST 2019


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

            Bug ID: 40808
           Summary: Can't use -fsanitize=address with GNU gold linker
           Product: Packaging
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: deb packages
          Assignee: unassignedbugs at nondot.org
          Reporter: pesa at gentoo.org
                CC: llvm-bugs at lists.llvm.org

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)

-- 
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/20190221/7697599c/attachment.html>


More information about the llvm-bugs mailing list