mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-19 22:27:39 +01: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:
parent
75c710131e
commit
d3147b1f2c
1 changed files with 20 additions and 2 deletions
|
@ -29,5 +29,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
#include <libunwind.h>
|
#include <libunwind.h>
|
||||||
|
|
||||||
unw_dyn_info_list_t _U_dyn_info_list
|
/* Note: It might be tempting to use the LSDA to store
|
||||||
__attribute__ ((section (".data.unwind_dynamic")));
|
_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");
|
||||||
|
|
Loading…
Reference in a new issue