[PATCH] Add .eh_frame_hdr search to Linux unwinder.
Ed Schouten
ed at 80386.nl
Fri Feb 27 01:15:17 PST 2015
Just stumbled upon this patch and thought I'd chime in briefly.
I am currently working on a POSIX-like environment that is completely built around the concept of capability-based security which I am planning on releasing under a BSD license 1-2 months from now. I'm leaning on LLVM components quite heavily (LLVM, Clang, libcxx, libcxxabi, compiler-rt).
To get exceptions working in my environment I previously used a small patch to ld's linker script to add symbols where .eh_frame begins/ends and a change for libcxxabi to use those. After discovering this patch I decided to add dl_iterate_phdr() as well and revert my local changes. So far things work great. All libcxx exception related tests pass properly. At least on x86-64.
That said, keep in mind that ElfW() does not exist on FreeBSD. Adding some code like this makes the code build properly.
#ifndef ElfW
#define ElfW(type) ElfW2(__INTPTR_WIDTH__, type)
#define ElfW2(width, type) ElfW3(width, type)
#define ElfW3(width, type) Elf##width##_##type
#endif
Thanks!
http://reviews.llvm.org/D6848
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list