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

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

Issue 7276050: Change startup ABI for untrusted code to be C-compatible (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: disable bogus stack_frame.cc test for now Created 9 years, 5 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
« no previous file with comments | « src/untrusted/irt/irt_entry.c ('k') | src/untrusted/nacl/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # Since the integrated runtime will be built with newlib, 9 # Since the integrated runtime will be built with newlib,
10 # there's no need to build this module against glibc. 10 # there's no need to build this module against glibc.
(...skipping 20 matching lines...) Expand all
31 if blob_env.Bit('bitcode'): 31 if blob_env.Bit('bitcode'):
32 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}') 32 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}')
33 # To allow elf_restart_*.o in the link line 33 # To allow elf_restart_*.o in the link line
34 blob_env.Append(LINKFLAGS='--pnacl-allow-native') 34 blob_env.Append(LINKFLAGS='--pnacl-allow-native')
35 # Without this llc asserts 35 # Without this llc asserts
36 # c.f. http://code.google.com/p/nativeclient/issues/detail?id=1225 36 # c.f. http://code.google.com/p/nativeclient/issues/detail?id=1225
37 # blob_env.Append(LINKFLAGS=['-O0']) 37 # blob_env.Append(LINKFLAGS=['-O0'])
38 else: 38 else:
39 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}') 39 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}')
40 40
41 asm_env = blob_env.Clone()
42 if asm_env.Bit('bitcode'):
43 asm_env.Replace(OBJSUFFIX='.o')
44 asm_env.Append(ASFLAGS=['-arch', '${TARGET_FULLARCH}'])
45
46 asm_helper = asm_env.ComponentObject(
47 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_'))
48
49 irt_support_sources = [ 41 irt_support_sources = [
50 'irt_entry.c', 42 'irt_entry.c',
51 'irt_malloc.c', 43 'irt_malloc.c',
52 'irt_sbrk.c', 44 'irt_sbrk.c',
53 'irt_elf_utils.c', 45 'irt_elf_utils.c',
54 ] 46 ]
55 47
56 # The bitcode build does not yet use -mtls-use-call and so it improperly 48 # The bitcode build does not yet use -mtls-use-call and so it improperly
57 # pollutes user TLS with IRT-private TLS. But until that's fixed, 49 # pollutes user TLS with IRT-private TLS. But until that's fixed,
58 # overriding the entry points with the irt_tls.c versions would cause a 50 # overriding the entry points with the irt_tls.c versions would cause a
59 # mismatch where library code using (what should be reserved for) user TLS 51 # mismatch where library code using (what should be reserved for) user TLS
60 # will crash because it hasn't been initialized. 52 # will crash because it hasn't been initialized.
61 if not env.Bit('bitcode'): 53 if not env.Bit('bitcode'):
62 irt_support_sources.append('irt_tls.c') 54 irt_support_sources.append('irt_tls.c')
63 55
64 # TODO(mcgrathr): most of these live in ../nacl/irt_*.c now because 56 # TODO(mcgrathr): most of these live in ../nacl/irt_*.c now because
65 # of the dismal kludge state of building everything. Eventually 57 # of the dismal kludge state of building everything. Eventually
66 # all that should move here. 58 # all that should move here.
67 irt_common_interfaces = [] 59 irt_common_interfaces = []
68 60
69 # These are the objects and libraries that go into every IRT image. 61 # These are the objects and libraries that go into every IRT image.
70 irt_support_objs = asm_helper + [blob_env.ComponentObject(x) for x in 62 irt_support_objs = [blob_env.ComponentObject(x) for x in
71 (irt_support_sources + irt_common_interfaces)] 63 (irt_support_sources + irt_common_interfaces)]
72 irt_support_libs = ['pthread'] 64 irt_support_libs = ['pthread']
73 65
74 # These go into only one image or the other. 66 # These go into only one image or the other.
75 irt_nonbrowser = ['irt_interfaces.c', 67 irt_nonbrowser = ['irt_interfaces.c',
76 ] 68 ]
77 69
78 irt_browser = ['irt_interfaces_ppapi.c', 70 irt_browser = ['irt_interfaces_ppapi.c',
79 'irt_ppapi.c', 71 'irt_ppapi.c',
80 ] 72 ]
81 73
(...skipping 20 matching lines...) Expand all
102 # call to __nacl_read_tp, which the IRT code overrides to segregate 94 # call to __nacl_read_tp, which the IRT code overrides to segregate
103 # IRT-private TLS from user TLS. 95 # IRT-private TLS from user TLS.
104 node = env.CommandTest('irt_tls_test.out', 96 node = env.CommandTest('irt_tls_test.out',
105 ['${PYTHON}', env.File('check_tls.py'), 97 ['${PYTHON}', env.File('check_tls.py'),
106 '${OBJDUMP}', irt_library]) 98 '${OBJDUMP}', irt_library])
107 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test') 99 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test')
108 node = env.CommandTest('irt_core_tls_test.out', 100 node = env.CommandTest('irt_core_tls_test.out',
109 ['${PYTHON}', env.File('check_tls.py'), 101 ['${PYTHON}', env.File('check_tls.py'),
110 '${OBJDUMP}', irt_core_library]) 102 '${OBJDUMP}', irt_core_library])
111 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test') 103 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test')
OLDNEW
« no previous file with comments | « src/untrusted/irt/irt_entry.c ('k') | src/untrusted/nacl/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698