summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src
diff options
context:
space:
mode:
authorsbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 19:48:34 +0000
committersbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 19:48:34 +0000
commit1993f4bc01363c253627b2edbc221500ecd9071e (patch)
tree10ea7ad464ab833818085885f2df670c09556d8a /native_client_sdk/src
parent810fb99c9a623a3ae4699f3406d131795dce9a46 (diff)
downloadchromium_src-1993f4bc01363c253627b2edbc221500ecd9071e.zip
chromium_src-1993f4bc01363c253627b2edbc221500ecd9071e.tar.gz
chromium_src-1993f4bc01363c253627b2edbc221500ecd9071e.tar.bz2
[NaCl SDK] Fix sel_ldr.py so it uses nacl_helper_bootstrap correctly.
BUG=266952 TEST=bots R=mcgrathr@chromium.org Review URL: https://codereview.chromium.org/93133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238155 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src')
-rwxr-xr-xnative_client_sdk/src/tools/sel_ldr.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/native_client_sdk/src/tools/sel_ldr.py b/native_client_sdk/src/tools/sel_ldr.py
index 97adf24..911a853 100755
--- a/native_client_sdk/src/tools/sel_ldr.py
+++ b/native_client_sdk/src/tools/sel_ldr.py
@@ -81,15 +81,23 @@ def main(argv):
Log('ROOT = %s' % NACL_SDK_ROOT)
Log('SEL_LDR = %s' % sel_ldr)
Log('IRT = %s' % irt)
- cmd = [sel_ldr, '-a', '-B', irt, '-l', os.devnull]
-
- if options.debug:
- cmd.append('-g')
+ cmd = [sel_ldr]
if osname == 'linux':
+ # Run sel_ldr under nacl_helper_bootstrap
helper = os.path.join(SCRIPT_DIR, 'nacl_helper_bootstrap_%s' % arch_suffix)
Log('HELPER = %s' % helper)
cmd.insert(0, helper)
+ cmd.append('--r_debug=0xXXXXXXXXXXXXXXXX')
+ cmd.append('--reserved_at_zero=0xXXXXXXXXXXXXXXXX')
+
+ cmd += ['-a', '-B', irt]
+
+ if options.debug:
+ cmd.append('-g')
+
+ if not options.verbose:
+ cmd += ['-l', os.devnull]
if dynamic:
if options.debug_libs:
@@ -107,13 +115,16 @@ def main(argv):
sdk_lib_dir = os.path.join(sdk_lib_dir, 'lib32')
ldso = os.path.join(sdk_lib_dir, 'runnable-ld.so')
cmd.append(ldso)
- Log('LD.SO = %s' % ldso)
+ Log('LD.SO = %s' % ldso)
libpath += ':' + sdk_lib_dir
cmd.append('--library-path')
cmd.append(libpath)
- cmd += args
+ if args:
+ # Append arguments for the executable itself.
+ cmd += args
+
Log(cmd)
rtn = subprocess.call(cmd)
return rtn