1check_set_linker_property(TARGET linker PROPERTY memusage "${LINKERFLAGPREFIX},--print-memory-usage") 2 3# -no-pie is not supported until binutils 2.37. 4# If -no-pie is passed to old binutils <= 2.36, it is parsed 5# as separate arguments -n and -o, which results in output file 6# called "-pie". 7if("${GNULD_VERSION_STRING}" VERSION_GREATER_EQUAL 2.37) 8 set_property(TARGET linker PROPERTY no_position_independent "${LINKERFLAGPREFIX},-no-pie") 9else() 10 set_property(TARGET linker PROPERTY no_position_independent) 11endif() 12 13set_property(TARGET linker PROPERTY partial_linking "-r") 14 15# Some linker flags might not be purely ld specific, but a combination of 16# linker and compiler, such as: 17# --coverage for clang 18# --gcov for gcc 19# So load those flags now. 20include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/${COMPILER}/linker_flags.cmake OPTIONAL) 21