1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-30 21:21:45 +02:00

Encode the address of _U_dyn_info_list in a special (no-op) unwind-table entry,

so that a remote-unwinder can find it.

(Logical change 1.30)
This commit is contained in:
mostang.com!davidm 2002-12-12 09:17:41 +00:00
parent 75c710131e
commit d3147b1f2c

View file

@ -29,5 +29,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <libunwind.h>
unw_dyn_info_list_t _U_dyn_info_list
__attribute__ ((section (".data.unwind_dynamic")));
/* Note: It might be tempting to use the LSDA to store
_U_dyn_info_list, but that wouldn't work because the
unwind-info is generally mapped read-only. */
unw_dyn_info_list_t _U_dyn_info_list;
/* Now create a special unwind-table entry which makes it easy for an
unwinder to locate the dynamic registration list. The special
entry covers address range [0-0) and is therefore guaranteed to
be the first in the unwind-table. */
asm (
" .section \".IA_64.unwind_info\", \"a\"\n"
".info: data8 (1<<48) | 1\n" /* v1, length==1 (8-byte word) */
" data8 0\n" /* 8 empty .prologue directives (nops) */
" data8 0\n" /* personality routine (ignored) */
" data8 @segrel(_U_dyn_info_list)\n" /* lsda */
"\n"
" .section \".IA_64.unwind\", \"a\"\n"
" data8 0, 0, @segrel(.info)\n"
" .previous\n");