Fix TLS issues
This commit is contained in:
parent
af35816c0b
commit
4c86842b7f
2
deps/premake/chaiscript.lua
vendored
2
deps/premake/chaiscript.lua
vendored
@ -6,7 +6,7 @@ function chaiscript.import()
|
||||
chaiscript.includes()
|
||||
|
||||
defines {
|
||||
"CHAISCRIPT_NO_THREADS" -- :(
|
||||
--"CHAISCRIPT_NO_THREADS" -- :(
|
||||
}
|
||||
end
|
||||
|
||||
|
5
src/a.cpp
Normal file
5
src/a.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "std_include.hpp"
|
||||
|
||||
// The naming of the file enforces early linking and thus
|
||||
// a better placement in the tls segment
|
||||
__declspec(thread) char tls_data[TLS_PAYLOAD_SIZE];
|
@ -9,8 +9,6 @@
|
||||
|
||||
//#define GENERATE_DIFFS
|
||||
|
||||
__declspec(thread) char tls_data[TLS_PAYLOAD_SIZE];
|
||||
|
||||
DECLSPEC_NORETURN void WINAPI exit_hook(const int code)
|
||||
{
|
||||
module_loader::pre_destroy();
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
|
||||
// Moved to main.cpp to enforce early linking
|
||||
//__declspec(thread) char tls_data[TLS_PAYLOAD_SIZE];
|
||||
|
||||
#pragma bss_seg(".payload")
|
||||
char payload_data[BINARY_PAYLOAD_SIZE];
|
||||
|
||||
|
@ -60,3 +60,5 @@
|
||||
#include "resource.hpp"
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
extern __declspec(thread) char tls_data[TLS_PAYLOAD_SIZE];
|
Loading…
x
Reference in New Issue
Block a user