summaryrefslogtreecommitdiffstats
path: root/chrome/nacl.gypi
diff options
context:
space:
mode:
authormcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 20:06:38 +0000
committermcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 20:06:38 +0000
commit25f23ffa4e529c8b3040faa03989d588191cab8b (patch)
treee1d4a13fcf280d7c6e0945145a21531963c1a7f1 /chrome/nacl.gypi
parent8f55ef5fab8238908c569420a321775abc292f74 (diff)
downloadchromium_src-25f23ffa4e529c8b3040faa03989d588191cab8b.zip
chromium_src-25f23ffa4e529c8b3040faa03989d588191cab8b.tar.gz
chromium_src-25f23ffa4e529c8b3040faa03989d588191cab8b.tar.bz2
nacl_helper_bootstrap: Reserve correct address space size for ARM, none for x86-64
The address space reservation has only been thoroughly used and tested on x86-32. It's also necessary on ARM, but it needs a different exact amount reserved. For x86-64, the reserved space is not used, so it's a waste of address space to consume a gigabyte for it. BUG= none TEST= nacl_integration R=mseaborn@chromium.org,bradchen@google.com Review URL: http://codereview.chromium.org/8588046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl.gypi')
-rw-r--r--chrome/nacl.gypi40
1 files changed, 32 insertions, 8 deletions
diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi
index 986abdc..0fcab27 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -127,6 +127,27 @@
],
}],
['OS=="linux" and coverage==0', {
+ 'conditions': [
+ ['target_arch=="x64"', {
+ 'variables': {
+ # No extra reservation.
+ 'nacl_reserve_top': [],
+ }
+ }],
+ ['target_arch=="ia32"', {
+ 'variables': {
+ # 1G address space.
+ 'nacl_reserve_top': ['--defsym', 'RESERVE_TOP=0x40000000'],
+ }
+ }],
+ ['target_arch=="arm"', {
+ 'variables': {
+ # 1G address space, plus 4K guard area above because
+ # immediate offsets are 12 bits.
+ 'nacl_reserve_top': ['--defsym', 'RESERVE_TOP=0x40001000'],
+ }
+ }],
+ ],
'targets': [
{
'target_name': 'nacl_helper',
@@ -274,8 +295,8 @@
['target_arch=="arm"', {
'variables': {
'linker_emulation': 'armelf_linux_eabi',
- # ARM requires linking against libc due to ABI dependencies on
- # memset
+ # ARM requires linking against libc due to ABI
+ # dependencies on memset.
'bootstrap_extra_lib' : "${SYSROOT}/usr/lib/libc.a",
}
}],
@@ -283,13 +304,16 @@
'action': ['../tools/ld_bfd/ld',
'-m', '<(linker_emulation)',
'--build-id',
- # This program is (almost) entirely standalone. It
- # has its own startup code, so no crt1.o for it. It is
- # statically linked, and on x86 it does not use
- # libc at all. However, on ARM it needs a few (safe)
- # things from libc.
+ # This program is (almost) entirely
+ # standalone. It has its own startup code, so
+ # no crt1.o for it. It is statically linked,
+ # and on x86 it does not use libc at all.
+ # However, on ARM it needs a few (safe) things
+ # from libc.
'-static',
- # Link with custom linker script for special layout.
+ # Link with custom linker script for special
+ # layout. The script uses the symbol RESERVE_TOP.
+ '<@(nacl_reserve_top)',
'--script=<(linker_script)',
'-o', '<@(_outputs)',
# On x86-64, the default page size with some