@@ -16,7 +16,9 @@ G_BEGIN_DECLS
16
16
17
17
typedef struct _GumProcMapsIter GumProcMapsIter ;
18
18
19
+ #ifndef HAVE_GLIBC
19
20
typedef struct _GumLinuxPThread GumLinuxPThread ;
21
+ #endif
20
22
typedef struct _GumGlibcList GumGlibcList ;
21
23
typedef int GumGlibcLock ;
22
24
@@ -33,9 +35,12 @@ struct _GumLinuxPThreadSpec
33
35
int (* set_name ) (pthread_t thread , const char * name );
34
36
35
37
#if defined (HAVE_GLIBC )
38
+ gsize flink_offset ;
39
+ gsize blink_offset ;
36
40
GumGlibcList * stack_used ;
37
41
GumGlibcList * stack_user ;
38
42
GumGlibcLock * stack_lock ;
43
+ gsize tid_offset ;
39
44
#elif defined (HAVE_MUSL )
40
45
GumLinuxPThread * main_thread ;
41
46
void (* tl_lock ) (void );
@@ -59,29 +64,20 @@ struct _GumGlibcList
59
64
GumGlibcList * prev ;
60
65
};
61
66
67
+ #ifndef HAVE_GLIBC
62
68
struct _GumLinuxPThread
63
69
{
64
- #if defined (HAVE_GLIBC )
65
- union
66
- {
67
- # if defined (HAVE_I386 ) && GLIB_SIZEOF_VOID_P == 8
68
- guint8 tcb_header [704 ];
69
- # endif
70
- gpointer padding [24 ];
71
- } header ;
72
- GumGlibcList list ;
73
- pid_t tid ;
74
- #elif defined (HAVE_MUSL )
70
+ # if defined (HAVE_MUSL )
75
71
gpointer self ;
76
- # ifdef HAVE_I386
72
+ # ifdef HAVE_I386
77
73
gpointer dtv ;
78
- # endif
74
+ # endif
79
75
GumLinuxPThread * prev ;
80
76
GumLinuxPThread * next ;
81
77
gpointer sysinfo ;
82
- # ifdef HAVE_I386
78
+ # ifdef HAVE_I386
83
79
gsize canary ;
84
- # endif
80
+ # endif
85
81
int tid ;
86
82
int errno_val ;
87
83
volatile int detach_state ;
@@ -93,12 +89,13 @@ struct _GumLinuxPThread
93
89
guint8 * map_base ;
94
90
gsize map_size ;
95
91
gpointer stack ;
96
- #elif defined (HAVE_ANDROID )
92
+ # elif defined (HAVE_ANDROID )
97
93
GumLinuxPThread * next ;
98
94
GumLinuxPThread * prev ;
99
95
pid_t tid ;
100
- #endif
96
+ # endif
101
97
};
98
+ #endif
102
99
103
100
G_GNUC_INTERNAL const Dl_info * _gum_process_get_libc_info (void );
104
101
0 commit comments