[SDK][HOST-TOOLS] Add load_config workaround for gcc builds

Since binutils can not add this, we re-introduce pefixup.
It searches for the exported symbol '_load_config_used',
and uses that to fill out the LOAD_CONFIG directory in the PE header
This commit is contained in:
Mark Jansen 2020-04-13 12:20:47 +02:00
parent 2ed06c9588
commit 0b948581fc
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
8 changed files with 176 additions and 385 deletions

View file

@ -345,6 +345,14 @@ if(NOT ARCH STREQUAL "i386")
set(DECO_OPTION "-@")
endif()
function(fixup_load_config _target)
get_target_property(PEFIXUP native-pefixup IMPORTED_LOCATION_NOCONFIG)
add_custom_command(TARGET ${_target} POST_BUILD
COMMAND "${PEFIXUP}"
"$<TARGET_FILE:${_target}>"
COMMENT "Patching in LOAD_CONFIG")
endfunction()
function(generate_import_lib _libname _dllname _spec_file)
# Generate the def for the import lib
add_custom_command(