https://bugs.llvm.org/show_bug.cgi?id=48096
Bug ID: 48096
Summary: Non-constructor function pointers in .ctors are
dropped
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: d...@google.com
CC: llvm-bugs@lists.llvm.org, mask...@google.com,
smithp...@googlemail.com
LLD seems to drop function pointers in the `.ctors` section that are not C++
constructors.
Example:
https://compiler-explorer.com/z/9dcG7c
There's a lot going on here with priority ordering, but the upshot that BFD LD
preserves function pointers (which are not C++ constructors) explicitly placed
into `.ctors` or `.ctors.*` with both GCC and Clang, but Clang+LLD drops them.
(The same happens with C, where there are no actual C++ constructors:
https://compiler-explorer.com/z/Yrsbbx)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs