File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ GLOBAL(__stacker_morestack_stack_limit):
42
42
43
43
GLOBAL(__stacker_set_morestack_stack_limit):
44
44
ret
45
+
46
+ GLOBAL(__stacker_get_tib_64):
47
+ mov %gs :0x30 , %rax
48
+ ret
45
49
#else
46
50
#error "unsupported arch"
47
51
#endif
Original file line number Diff line number Diff line change @@ -145,9 +145,9 @@ cfg_if! {
145
145
fn get_tib_address( ) -> * const usize ;
146
146
}
147
147
#[ cfg( target_pointer_width = "64" ) ]
148
- #[ link( name = "ntdll" ) ]
149
148
extern "system" {
150
- #[ link_name = "NtCurrentTeb" ]
149
+ #[ cfg_attr( target_env = "msvc" , link_name = "NtCurrentTeb" ) ]
150
+ #[ cfg_attr( target_env = "gnu" , link_name = "__stacker_get_tib_64" ) ]
151
151
fn get_tib_address( ) -> * const usize ;
152
152
}
153
153
// https://en.wikipedia.org/wiki/Win32_Thread_Information_Block for
You can’t perform that action at this time.
0 commit comments