Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: native_client_sdk/src/tools/sel_ldr.py

Issue 93133002: [NaCl SDK] Fix sel_ldr.py so it uses nacl_helper_bootstrap correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/sel_ldr.py
diff --git a/native_client_sdk/src/tools/sel_ldr.py b/native_client_sdk/src/tools/sel_ldr.py
index 97adf241dc5c5fe28009158ff406680da216559c..911a853f91e228698060eb6492b5959e14073321 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698