[llvm-bugs] [Bug 37065] New: .symver directive not properly handled with -flto=thin
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 9 17:25:35 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37065
Bug ID: 37065
Summary: .symver directive not properly handled with -flto=thin
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: thomasanderson at google.com
CC: llvm-bugs at lists.llvm.org
clang version 7.0.0 (trunk 328716)
Using .symver to bind an imported symbol to a specific version causes problems
with LTO. The symbol with the version appears to be defined when it shouldn't
be. This causes a build failure when linking multiple bitcode files that both
want to import the symbol as now the symbol is duplicated.
$ cat test.c
#include <math.h>
__asm__(".symver exp2f, exp2f at GLIBC_2.2.5");
float test(float f) {
return exp2f(f);
}
$ clang test.c -c -o test.o
$ nm test.o | grep exp2f
U exp2f at GLIBC_2.2.5
$ clang test.c -c -o test.o -flto=thin
$ llvm-nm-5.0 test.o | grep exp2f
U exp2f
U exp2f
---------------- T exp2f at GLIBC_2.2.5
--
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/20180410/05863494/attachment.html>
More information about the llvm-bugs
mailing list