Add ability to produce linker map file
This commit is contained in:
parent
acacc3f2e8
commit
39208ac1cd
@ -88,14 +88,6 @@ function(set_install_target TARGET DESTINATION)
|
|||||||
install(TARGETS ${TARGET} DESTINATION ${EXECTOS_BINARY_DIR}/output/binaries/${DESTINATION})
|
install(TARGETS ${TARGET} DESTINATION ${EXECTOS_BINARY_DIR}/output/binaries/${DESTINATION})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# This function enables or disables binary ordinals export for specified module
|
|
||||||
function(set_ordinals MODULE STATE)
|
|
||||||
if(NOT ${ARGC} EQUAL 2)
|
|
||||||
message(FATAL_ERROR "Invalid number of arguments passed to set_ordinals() function")
|
|
||||||
endif()
|
|
||||||
set_module_property(${MODULE} ENABLE_EXPORTS ${STATE})
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# This function is responsible for compiling module SPEC file
|
# This function is responsible for compiling module SPEC file
|
||||||
function(set_specfile SPECFILE)
|
function(set_specfile SPECFILE)
|
||||||
if(NOT ${ARGC} EQUAL 1)
|
if(NOT ${ARGC} EQUAL 1)
|
||||||
|
@ -80,6 +80,24 @@ function(set_imagebase MODULE IMAGEBASE)
|
|||||||
add_module_linker_flags(${MODULE} "/BASE:${IMAGEBASE}")
|
add_module_linker_flags(${MODULE} "/BASE:${IMAGEBASE}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# This function enables or disables map file generation for specified module
|
||||||
|
function(set_linker_map MODULE STATE)
|
||||||
|
if(NOT ${ARGC} EQUAL 2)
|
||||||
|
message(FATAL_ERROR "Invalid number of arguments passed to set_ordinals() function")
|
||||||
|
endif()
|
||||||
|
if(STATE STREQUAL "TRUE")
|
||||||
|
add_module_linker_flags(${MODULE} "/MAP:${CMAKE_CURRENT_BINARY_DIR}/${MODULE}.map")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# This function enables or disables binary ordinals export for specified module
|
||||||
|
function(set_ordinals MODULE STATE)
|
||||||
|
if(NOT ${ARGC} EQUAL 2)
|
||||||
|
message(FATAL_ERROR "Invalid number of arguments passed to set_ordinals() function")
|
||||||
|
endif()
|
||||||
|
set_module_property(${MODULE} ENABLE_EXPORTS ${STATE})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# This functions sets PE/COFF subsystem and XTOS version of the binary
|
# This functions sets PE/COFF subsystem and XTOS version of the binary
|
||||||
function(set_subsystem MODULE SUBSYSTEM)
|
function(set_subsystem MODULE SUBSYSTEM)
|
||||||
string(TOUPPER ${SUBSYSTEM} SUBSYSTEM)
|
string(TOUPPER ${SUBSYSTEM} SUBSYSTEM)
|
||||||
|
Loading…
Reference in New Issue
Block a user