Skip to content

Commit 94bab16

Browse files
authored
Add fixes to libunwind (#1069)
1 parent cafea9a commit 94bab16

File tree

5 files changed

+7
-78
lines changed

5 files changed

+7
-78
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ COSMOPOLITAN_OBJECTS = \
441441
LIBC_TIME \
442442
THIRD_PARTY_MUSL \
443443
THIRD_PARTY_ZLIB_GZ \
444+
THIRD_PARTY_LIBUNWIND \
444445
LIBC_STDIO \
445446
THIRD_PARTY_GDTOA \
446447
THIRD_PARTY_REGEX \

libc/runtime/unwind.c

Lines changed: 0 additions & 37 deletions
This file was deleted.

libc/runtime/unwind.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

third_party/libunwind/README.cosmo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ ORIGIN
1111
Author: Tobias Hieta <[email protected]>
1212
Date: Tue, 28 Nov 2023 09:52:28 +0100
1313

14+
LOCAL CHANGES
15+
- Fixed `_Unwind_FunctionContext` struct to be ABI-compatible with code
16+
generated by GCC.

third_party/libunwind/Unwind-sjlj.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#if defined(_LIBUNWIND_BUILD_SJLJ_APIS)
3030

31+
typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)));
32+
3133
struct _Unwind_FunctionContext {
3234
// next function in stack of handlers
3335
struct _Unwind_FunctionContext *prev;
@@ -47,7 +49,7 @@ struct _Unwind_FunctionContext {
4749
uint32_t resumeLocation;
4850

4951
// set by personality handler to be parameters passed to landing pad function
50-
uint32_t resumeParameters[4];
52+
_Unwind_Word resumeParameters[4];
5153
#endif
5254

5355
// set by calling function before registering

0 commit comments

Comments
 (0)