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

Side by Side Diff: src/untrusted/irt/nacl.scons

Issue 7605029: Extend IRT with nacl_irt_resource_open interface (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: more lint warnings Created 9 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 6
7 Import('env') 7 Import('env')
8 8
9 # This module shouldn't be built in an environment that uses glibc. 9 # This module shouldn't be built in an environment that uses glibc.
10 if env.Bit('nacl_glibc'): 10 if env.Bit('nacl_glibc'):
11 raise UserError('src/untrusted/irt/nacl.scons in the wrong environment?') 11 raise UserError('src/untrusted/irt/nacl.scons in the wrong environment?')
12 12
13 blob_env = env.Clone() 13 blob_env = env.Clone()
14 blob_env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_BLOB_DATA_START}') 14 blob_env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_BLOB_DATA_START}')
15 # The PNaCl linker (gold) does not implement the "-Ttext-segment" 15 # The PNaCl linker (gold) does not implement the "-Ttext-segment"
16 # option. However, with the linker for x86, the "-Ttext" option does 16 # option. However, with the linker for x86, the "-Ttext" option does
17 # not affect the executable's base address. 17 # not affect the executable's base address.
18 if blob_env.Bit('bitcode'): 18 if blob_env.Bit('bitcode'):
19 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}') 19 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}')
20 else: 20 else:
21 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}') 21 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}')
22 22
23 irt_support_sources = [ 23 irt_support_sources = [
24 'irt_entry.c',
25 'irt_malloc.c', 24 'irt_malloc.c',
26 'irt_sbrk.c', 25 'irt_sbrk.c',
27 'irt_private_pthread.c', 26 'irt_private_pthread.c',
28 'irt_private_tls.c', 27 'irt_private_tls.c',
29 ] 28 ]
30 29
31 # The bitcode build must use -mtls-use-call to separate user TLS 30 # The bitcode build must use -mtls-use-call to separate user TLS
32 # from IRT-private TLS. 31 # from IRT-private TLS.
33 if env.Bit('bitcode'): 32 if env.Bit('bitcode'):
34 blob_env.Append(LINKFLAGS='-Wl,--add-translate-option=-mtls-use-call') 33 blob_env.Append(LINKFLAGS='-Wl,--add-translate-option=-mtls-use-call')
(...skipping 30 matching lines...) Expand all
65 64
66 if env.Bit('target_arm'): 65 if env.Bit('target_arm'):
67 blob_env.Append(LINKFLAGS='--pnacl-allow-native') 66 blob_env.Append(LINKFLAGS='--pnacl-allow-native')
68 native_env = blob_env.Clone() 67 native_env = blob_env.Clone()
69 native_env.PNaClForceNative() 68 native_env.PNaClForceNative()
70 irt_support_objs.append(native_env.ComponentObject('aeabi_read_tp.o', 69 irt_support_objs.append(native_env.ComponentObject('aeabi_read_tp.o',
71 'aeabi_read_tp.S')) 70 'aeabi_read_tp.S'))
72 71
73 # These go into only one image or the other. 72 # These go into only one image or the other.
74 irt_nonbrowser = ['irt_interfaces.c', 73 irt_nonbrowser = ['irt_interfaces.c',
74 'irt_entry.c',
75 ] 75 ]
76 76
77 irt_browser = ['irt_interfaces_ppapi.c', 77 irt_browser = ['irt_interfaces_ppapi.c',
78 'irt_entry_ppapi.c',
78 'irt_ppapi.c', 79 'irt_ppapi.c',
80 'irt_manifest.c',
79 ] 81 ]
80 82
81 def LinkIrt(output, files, libs): 83 def LinkIrt(output, files, libs):
82 return blob_env.ComponentProgram(output, irt_support_objs + files, 84 return blob_env.ComponentProgram(output, irt_support_objs + files,
83 EXTRA_LIBS=libs + irt_support_libs) 85 EXTRA_LIBS=libs + irt_support_libs)
84 86
85 irt_core_library = LinkIrt('irt_core', irt_nonbrowser, []) 87 irt_core_library = LinkIrt('irt_core', irt_nonbrowser, [])
86 irt_library = LinkIrt('irt', irt_browser, ['ppruntime', 88 irt_library = LinkIrt('irt', irt_browser, ['ppruntime',
87 'srpc', 89 'srpc',
88 'imc_syscalls', 90 'imc_syscalls',
(...skipping 12 matching lines...) Expand all
101 # call to __nacl_read_tp, which the IRT code overrides to segregate 103 # call to __nacl_read_tp, which the IRT code overrides to segregate
102 # IRT-private TLS from user TLS. 104 # IRT-private TLS from user TLS.
103 node = env.CommandTest('irt_tls_test.out', 105 node = env.CommandTest('irt_tls_test.out',
104 ['${PYTHON}', env.File('check_tls.py'), 106 ['${PYTHON}', env.File('check_tls.py'),
105 '${OBJDUMP}', irt_library]) 107 '${OBJDUMP}', irt_library])
106 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test') 108 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test')
107 node = env.CommandTest('irt_core_tls_test.out', 109 node = env.CommandTest('irt_core_tls_test.out',
108 ['${PYTHON}', env.File('check_tls.py'), 110 ['${PYTHON}', env.File('check_tls.py'),
109 '${OBJDUMP}', irt_core_library]) 111 '${OBJDUMP}', irt_core_library])
110 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test') 112 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698