Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / data_below_data_start / nacl.scons
1 # -*- python -*-
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 Import('env')
7
8 # This is MIPS specific test.
9 if not env.Bit('target_mips32') or env.Bit('pnacl_generate_pexe'):
10   Return()
11
12 text_segment_start = 0x00020000
13 # Arbitrary address below NACL_DATA_SEGMENT_START, but above the end of text
14 # section.
15 rodata_segment_start = 0x00120000
16
17 nexe = env.ComponentProgram(
18     'data_below_data_start',
19     ['data_below_data_start.c'],
20     EXTRA_LIBS=['${NONIRT_LIBS}'],
21     EXTRA_LINKFLAGS=['-arch', 'mips32', '--pnacl-allow-native',
22                      '-Wl,-Ttext-segment=0x%x' % text_segment_start,
23                      '-Wl,-Trodata-segment=0x%x' % rodata_segment_start])
24
25 node = env.CommandSelLdrTestNacl('data_below_data_start.out', nexe,
26                                  exit_status=1)
27
28 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
29                        'run_data_below_data_start_test')