OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2011 The Native Client Authors. All rights reserved. | 2 # Copyright 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # We do not expect the blob library to be produced by linking against | 8 # We do not expect the blob library to be produced by linking against |
9 # nacl-glibc. | 9 # nacl-glibc. |
10 if env.Bit('nacl_glibc'): | 10 if env.Bit('nacl_glibc'): |
11 Return() | 11 Return() |
12 # Although the regular PNaCl frontend is able to link object files | 12 # Although the regular PNaCl frontend is able to link object files |
13 # generated from assembly code, the sandboxed version cannot. | 13 # generated from assembly code, the sandboxed version cannot. |
14 if env.Bit('use_sandboxed_translator'): | 14 if env.Bit('use_sandboxed_translator'): |
15 Return() | 15 Return() |
16 | 16 |
17 env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_DATA_REGION_START}') | 17 env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_DATA_REGION_START}') |
18 # An explicit output name is specified so an object file is created in the | 18 # An explicit output name is specified so an object file is created in the |
19 # blob_library_loading output directory. | 19 # blob_library_loading output directory. |
20 hw_o = env.ComponentObject('hello_world.o', '../hello_world/hello_world.c') | 20 hw_o = env.ComponentObject('hello_world.o', '../hello_world/hello_world.c') |
21 user_executable = env.ComponentProgram( | 21 user_executable = env.ComponentProgram( |
22 'hello_world_with_segment_gap.nexe', | 22 'hello_world_with_segment_gap', |
23 hw_o) | 23 hw_o) |
24 | 24 |
25 node = env.CommandSelLdrTestNacl( | 25 node = env.CommandSelLdrTestNacl( |
26 'blob_library_loading_test.out', | 26 'blob_library_loading_test.out', |
| 27 user_executable, |
27 sel_ldr_flags=['-B', env.GetIrtNexe()], | 28 sel_ldr_flags=['-B', env.GetIrtNexe()], |
28 command=[user_executable], | |
29 stdout_golden=env.File('${SCONSTRUCT_DIR}/tests/hello_world' | 29 stdout_golden=env.File('${SCONSTRUCT_DIR}/tests/hello_world' |
30 '/hello_world.stdout')) | 30 '/hello_world.stdout')) |
31 env.AddNodeToTestSuite(node, ['small_tests'], 'run_blob_library_loading_test') | 31 env.AddNodeToTestSuite(node, ['small_tests'], 'run_blob_library_loading_test') |
OLD | NEW |