http://llvm.org/bugs/show_bug.cgi?id=13749
Bug #: 13749
Summary: x86-64 psABI requires .eh_frame sections
Product: libraries
Version: 3.1
Platform: PC
OS/Version: OpenBSD
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
The x86-64 psABI [1] requires .eh_frame sections to always be generated: "For
successful unwinding on AMD64 every function must provide a valid debug
information in the DWARF Debugging Information Format."
GCC implements this by default but Clang does not:
$ cat bar.c
extern int foo(void);
int bar() {
return foo() + 1;
}
$ gcc -c bar.c
$ readelf -S bar.o | grep eh_frame
[ 6] .eh_frame PROGBITS 0000000000000000 00000080
[ 7] .rela.eh_frame RELA 0000000000000000 00000578
$ clang -c bar.c
$ readelf -S bar.o | grep eh_frame
$
Clang should enable -fasynchronous-unwind-tables by default for amd64 targets
compiling to the x86-64 ELF psABI like Linux and OpenBSD. The above was run on
OpenBSD, but similar behavior can be seen on Linux.
(Tangentially, it also requires the unwind tables to be accurate at every
instruction, which currently isn't correct with LLVM either; see bug 13161.)
[1] http://www.x86-64.org/documentation/abi.pdf
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs