https://bugs.llvm.org/show_bug.cgi?id=36314
Bug ID: 36314
Summary: DFSan wrapper function sometimes gets wrong
'dso_local' attribute
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Miscellaneous Instrumentation passes
Assignee: unassignedb...@nondot.org
Reporter: sbu...@google.com
CC: llvm-bugs@lists.llvm.org
The "dfsw$" wrapper functions in DFSan are created using the
'GlobalValue::LinkOnceODRLinkage' linkage and inherit the attributes of the
original function by calling "NewF->copyAttributesFrom(F);".
However, when the original function (F) has internal linkage, it automatically
gets the 'dso_local' attribute via its GlobalValue constructor. This attribute
is thus inadvertently transferred to the wrapper (NewF), which has a public
linkage type and should not be marked 'dso_local'.
On x86_64, this behavior causes the wrapper symbol in the generated code to
have
a relocation table entry (R_X86_64_PC32) that triggers a linker error when
linking in a shared library.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs