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

Side by Side Diff: pydir/szbuild.py

Issue 1491473002: Subzero. ARM32. Initial sandboxing code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Renames run-pnacl-sz argument. Created 5 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 unified diff | Download patch
« no previous file with comments | « pydir/run-pnacl-sz.py ('k') | pydir/targets.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 2
3 import argparse 3 import argparse
4 import os 4 import os
5 import pipes 5 import pipes
6 import re 6 import re
7 import sys 7 import sys
8 8
9 from utils import shellcmd 9 from utils import shellcmd
10 from utils import FindBaseNaCl 10 from utils import FindBaseNaCl
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 echo=args.verbose) 311 echo=args.verbose)
312 shellcmd(( 312 shellcmd((
313 '{objcopy} --globalize-symbol={start} ' + 313 '{objcopy} --globalize-symbol={start} ' +
314 '--globalize-symbol=__Sz_block_profile_info {partial}' 314 '--globalize-symbol=__Sz_block_profile_info {partial}'
315 ).format(objcopy=objcopy, partial=obj_partial, 315 ).format(objcopy=objcopy, partial=obj_partial,
316 start='_start' if args.sandbox else '_user_start'), 316 start='_start' if args.sandbox else '_user_start'),
317 echo=args.verbose) 317 echo=args.verbose)
318 318
319 # Run the linker regardless of hybrid mode. 319 # Run the linker regardless of hybrid mode.
320 if args.sandbox: 320 if args.sandbox:
321 assert args.target in ['x8632'], \ 321 assert args.target in ('x8632', 'arm32'), \
322 '-sandbox is not available for %s' % args.target 322 '-sandbox is not available for %s' % args.target
323 target_lib_dir = {
324 'arm32': 'arm',
325 'x8632': 'x86-32',
326 }[args.target]
323 linklib = ('{root}/toolchain/linux_x86/pnacl_newlib_raw/translator/' + 327 linklib = ('{root}/toolchain/linux_x86/pnacl_newlib_raw/translator/' +
324 'x86-32/lib').format(root=nacl_root) 328 '{target_dir}/lib').format(root=nacl_root, target_dir=target_ lib_dir)
325 shellcmd(( 329 shellcmd((
326 '{gold} -nostdlib --no-fix-cortex-a8 --eh-frame-hdr -z text ' + 330 '{gold} -nostdlib --no-fix-cortex-a8 --eh-frame-hdr -z text ' +
327 '--build-id --entry=__pnacl_start -static ' + 331 '--build-id --entry=__pnacl_start -static ' +
328 '{linklib}/crtbegin.o {partial} ' + 332 '{linklib}/crtbegin.o {partial} ' +
329 '{root}/toolchain_build/src/subzero/build/runtime/' + 333 '{root}/toolchain_build/src/subzero/build/runtime/' +
330 'szrt_sb_{target}.o ' + 334 'szrt_sb_{target}.o ' +
331 '{linklib}/libpnacl_irt_shim_dummy.a --start-group ' + 335 '{linklib}/libpnacl_irt_shim_dummy.a --start-group ' +
332 '{linklib}/libgcc.a {linklib}/libcrt_platform.a ' + 336 '{linklib}/libgcc.a {linklib}/libcrt_platform.a ' +
333 '--end-group {linklib}/crtend.o --undefined=_start ' + 337 '--end-group {linklib}/crtend.o --undefined=_start ' +
334 '--defsym=__Sz_AbsoluteZero=0 ' + 338 '--defsym=__Sz_AbsoluteZero=0 ' +
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 374
371 # Put the extra verbose printing at the end. 375 # Put the extra verbose printing at the end.
372 if args.verbose and hybrid: 376 if args.verbose and hybrid:
373 print 'include={regex}'.format(regex=re_include_str) 377 print 'include={regex}'.format(regex=re_include_str)
374 print 'exclude={regex}'.format(regex=re_exclude_str) 378 print 'exclude={regex}'.format(regex=re_exclude_str)
375 print 'default_match={dm}'.format(dm=default_match) 379 print 'default_match={dm}'.format(dm=default_match)
376 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 380 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
377 381
378 if __name__ == '__main__': 382 if __name__ == '__main__':
379 main() 383 main()
OLDNEW
« no previous file with comments | « pydir/run-pnacl-sz.py ('k') | pydir/targets.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698