From 0e3278a087daa25cba541d7c1dae19dfd4e2d422 Mon Sep 17 00:00:00 2001 From: spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:11:10 +0200 Subject: Misc MSVC/CMake fixes, also fixed childexec example --- examples/system/childexec/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples/system/childexec') diff --git a/examples/system/childexec/CMakeLists.txt b/examples/system/childexec/CMakeLists.txt index 8092bec..c9983c4 100644 --- a/examples/system/childexec/CMakeLists.txt +++ b/examples/system/childexec/CMakeLists.txt @@ -27,6 +27,13 @@ psn00bsdk_add_executable( psn00bsdk_add_executable(child STATIC ${_child_sources}) #psn00bsdk_add_cd_image(childexec_iso childexec iso.xml DEPENDS parent) +# Relocate the child executable to a non-default address to prevent it from +# overlapping with the main one at 0x80010000. +# NOTE: child executables are not position-independent and can't be relocated +# at runtime. If you need your code to be relocatable (e.g. to load it into a +# dynamically-allocated buffer), consider using a DLL instead. +target_link_options(child PRIVATE -Ttext=0x80030000) + # Make sure the child executable is built before the parent (so it can be # embedded via child_exe.s). add_dependencies(parent child) -- cgit v1.2.3