File tree Expand file tree Collapse file tree
src/trusted/service_runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2683,6 +2683,8 @@ def MakeGenericLinuxEnv(platform=None):
26832683 LINK = '$CXX' ,
26842684 )
26852685
2686+ linux_env .SetDefault (MAX_PAGE_SIZE = '0x1000' )
2687+
26862688 # Prepend so we can disable warnings via Append
26872689 linux_env .Prepend (
26882690 CPPDEFINES = [['_POSIX_C_SOURCE' , '199506' ],
@@ -2705,6 +2707,7 @@ def MakeGenericLinuxEnv(platform=None):
27052707 LINKFLAGS = ['-m64' ] + sysroot_flags ,
27062708 )
27072709 elif linux_env .Bit ('build_arm' ):
2710+ linux_env .Replace (MAX_PAGE_SIZE = '0x10000' )
27082711 SetUpLinuxEnvArm (linux_env )
27092712 elif linux_env .Bit ('build_mips32' ):
27102713 SetUpLinuxEnvMips (linux_env )
@@ -2730,7 +2733,8 @@ def MakeGenericLinuxEnv(platform=None):
27302733 linux_env .Prepend (SHLINKFLAGS = ['$COMMON_LINKFLAGS' ])
27312734 linux_env .Prepend (COMMON_LINKFLAGS = ['-Wl,-z,relro' ,
27322735 '-Wl,-z,now' ,
2733- '-Wl,-z,noexecstack' ])
2736+ '-Wl,-z,noexecstack' ,
2737+ '-Wl,-z,max-page-size=${MAX_PAGE_SIZE}' ])
27342738 linux_env .Prepend (LINKFLAGS = ['-pie' ])
27352739 # The ARM toolchain has a linker that doesn't handle the code its
27362740 # compiler generates under -fPIE.
Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ if (env.Bit('linux') and not env.Bit('built_elsewhere')):
427427 'nacl_bootstrap_raw' ,
428428 [bootstrap_obj ],
429429 ("env CXX='${CXX}' ${PYTHON} %s %s " +
430- '-m %s --build-id -static -z max-page-size=0x1000 ' +
430+ '-m %s --build-id -static -z max-page-size=${MAX_PAGE_SIZE} ' +
431431 '--orphan-handling=discard ' +
432432 '--defsym RESERVE_TOP=%s --script %s -o ${TARGET} ${SOURCES}' ) %
433433 (bootstrap_env .File ('linux/ld_bfd.py' ), compiler_override , ld_emul ,
You can’t perform that action at this time.
0 commit comments