Skip to content

Commit 08c16f9

Browse files
committed
gn: build arm sel_ldr and nacl_helper_bootstrap with 16K page size
1 parent c7e187f commit 08c16f9

File tree

1 file changed

+6
-1
lines changed
  • src/trusted/service_runtime/linux

1 file changed

+6
-1
lines changed

src/trusted/service_runtime/linux/BUILD.gn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,22 @@ if (current_toolchain == bootstrap_toolchain) {
2525
linker_script_path = rebase_path("nacl_bootstrap.x")
2626

2727
if (current_cpu == "x64") {
28+
max_page_size = "0x1000"
2829
nacl_reserve_top = "0x0"
2930
linker_emulation = "elf_x86_64"
3031
}
3132
if (current_cpu == "x86") {
33+
max_page_size = "0x1000"
3234
nacl_reserve_top = "0x40000000"
3335
linker_emulation = "elf_i386"
3436
}
3537
if (current_cpu == "arm") {
38+
max_page_size = "0x10000"
3639
nacl_reserve_top = "0x40002000"
3740
linker_emulation = "armelf_linux_eabi"
3841
}
3942
if (current_cpu == "mipsel") {
43+
max_page_size = "0x1000"
4044
nacl_reserve_top = "0x40008000"
4145
linker_emulation = "elf32ltsmip"
4246
}
@@ -72,6 +76,7 @@ if (current_toolchain == bootstrap_toolchain) {
7276
"-fno-PIE",
7377
# Automatic initialization generates memset calls
7478
"-ftrivial-auto-var-init=uninitialized",
79+
"-Wl,-z,max-page-size=" + max_page_size,
7580
]
7681

7782
sources = [
@@ -117,7 +122,7 @@ if (current_toolchain == bootstrap_toolchain) {
117122
# incompatible with our custom linker script's special layout.
118123
# NOTE: It's important that this option come before --script!
119124
"-z",
120-
"max-page-size=0x1000",
125+
"max-page-size=" + max_page_size,
121126

122127
# Link with custom linker script for special
123128
# layout. The script uses the symbol RESERVE_TOP.

0 commit comments

Comments
 (0)