File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/trusted/service_runtime/linux Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ if (NOT MSVC)
44 option (USE_STATIC_LIBS "Tries to use static libs where possible." OFF )
55endif ()
66
7+ if (ARCH_armhf)
8+ option (USE_ARMHF_16K_PAGESIZE "Build armhf binaries with 16K PageSize." OFF )
9+ list (APPEND INHERITED_OPTIONS "USE_ARMHF_16K_PAGESIZE" )
10+ endif ()
11+
712macro (set_ASM_flag FLAG)
813 set (lang ASM)
914 if (${ARGC} GREATER 1)
@@ -93,6 +98,10 @@ if (USE_STATIC_LIBS)
9398 set_linker_flag("-static" )
9499endif ()
95100
101+ if (USE_ARMHF_16K_PAGESIZE)
102+ set_linker_flag("-Wl,-z,max-page-size=16384" )
103+ endif ()
104+
96105#TODO: Import from SetUpClang() from (root)/SConstruct.
97106#TODO: This is mostly ASAN configurations.
98107
Original file line number Diff line number Diff line change @@ -99,14 +99,20 @@ string(REPLACE ";" " " BOOTSTRAP_FLAGS_STRING "${BOOTSTRAP_FLAGS}")
9999add_library (nacl_bootstrap OBJECT "nacl_bootstrap.c" )
100100set_target_properties (nacl_bootstrap PROPERTIES COMPILE_FLAGS ${BOOTSTRAP_FLAGS_STRING} )
101101
102+ if (USE_ARMHF_16K_PAGESIZE)
103+ set (MAX_PAGE_SIZE 0x4000)
104+ else ()
105+ set (MAX_PAGE_SIZE 0x1000)
106+ endif ()
107+
102108add_custom_target (nacl_bootstrap_raw
103109 COMMAND env "${PYTHON} "
104110 "${CMAKE_CURRENT_LIST_DIR} /ld_bfd.py"
105111 --compiler "${COMPILER_OVERRIDE} "
106112 -m "${LD_EMUL} "
107113 --build -id
108114 -static
109- -z "max-page-size=0x1000 "
115+ -z "max-page-size=${MAX_PAGE_SIZE} "
110116 --defsym RESERVE_TOP="${RESERVE_TOP} "
111117 --script "${CMAKE_CURRENT_LIST_DIR} /nacl_bootstrap.x"
112118 -o "${CMAKE_CURRENT_BINARY_DIR} /nacl_bootstrap_raw"
You can’t perform that action at this time.
0 commit comments