File tree 2 files changed +16
-1
lines changed
src/trusted/service_runtime/linux
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ if (NOT MSVC)
4
4
option (USE_STATIC_LIBS "Tries to use static libs where possible." OFF )
5
5
endif ()
6
6
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
+
7
12
macro (set_ASM_flag FLAG)
8
13
set (lang ASM)
9
14
if (${ARGC} GREATER 1)
@@ -93,6 +98,10 @@ if (USE_STATIC_LIBS)
93
98
set_linker_flag("-static" )
94
99
endif ()
95
100
101
+ if (USE_ARMHF_16K_PAGESIZE)
102
+ set_linker_flag("-Wl,-z,max-page-size=16384" )
103
+ endif ()
104
+
96
105
#TODO: Import from SetUpClang() from (root)/SConstruct.
97
106
#TODO: This is mostly ASAN configurations.
98
107
Original file line number Diff line number Diff line change @@ -84,14 +84,20 @@ string(REPLACE ";" " " BOOTSTRAP_FLAGS_STRING "${BOOTSTRAP_FLAGS}")
84
84
add_library (nacl_bootstrap OBJECT "nacl_bootstrap.c" )
85
85
set_target_properties (nacl_bootstrap PROPERTIES COMPILE_FLAGS ${BOOTSTRAP_FLAGS_STRING} )
86
86
87
+ if (USE_ARMHF_16K_PAGESIZE)
88
+ set (MAX_PAGE_SIZE 0x4000)
89
+ else ()
90
+ set (MAX_PAGE_SIZE 0x1000)
91
+ endif ()
92
+
87
93
add_custom_target (nacl_bootstrap_raw
88
94
COMMAND env "${PYTHON} "
89
95
"${CMAKE_CURRENT_LIST_DIR} /ld_bfd.py"
90
96
--compiler "${COMPILER_OVERRIDE} "
91
97
-m "${LD_EMUL} "
92
98
--build -id
93
99
-static
94
- -z "max-page-size=0x1000 "
100
+ -z "max-page-size=${MAX_PAGE_SIZE} "
95
101
--defsym RESERVE_TOP="${RESERVE_TOP} "
96
102
--script "${CMAKE_CURRENT_LIST_DIR} /nacl_bootstrap.x"
97
103
-o "${CMAKE_CURRENT_BINARY_DIR} /nacl_bootstrap_raw"
You can’t perform that action at this time.
0 commit comments