summaryrefslogtreecommitdiff
path: root/chromium/native_client/src/trusted/validator
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/native_client/src/trusted/validator')
-rw-r--r--chromium/native_client/src/trusted/validator/driver/ncval.gyp26
-rw-r--r--chromium/native_client/src/trusted/validator/ncfileutils.gyp71
-rw-r--r--chromium/native_client/src/trusted/validator/validator.gyp72
-rw-r--r--chromium/native_client/src/trusted/validator/x86/32/validator_x86_32.gyp87
-rw-r--r--chromium/native_client/src/trusted/validator/x86/64/validator_x86_64.gyp94
-rw-r--r--chromium/native_client/src/trusted/validator/x86/decoder/ncdis_decode_tables.gyp71
-rw-r--r--chromium/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp181
-rw-r--r--chromium/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp140
-rw-r--r--chromium/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp179
-rw-r--r--chromium/native_client/src/trusted/validator/x86/validate_x86.gyp142
10 files changed, 1063 insertions, 0 deletions
diff --git a/chromium/native_client/src/trusted/validator/driver/ncval.gyp b/chromium/native_client/src/trusted/validator/driver/ncval.gyp
new file mode 100644
index 00000000000..239b5607cf8
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/driver/ncval.gyp
@@ -0,0 +1,26 @@
+# Copyright (c) 2013 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'includes': [
+ '../../../../build/common.gypi',
+ ],
+ 'conditions': [
+ ['target_arch=="ia32" or target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'ncval_new',
+ 'type': 'executable',
+ 'sources': ['ncval.cc', 'elf_load.cc'],
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
+ '<(DEPTH)/native_client/src/trusted/validator_arm/validator_arm.gyp:arm_validator_core',
+ '<(DEPTH)/native_client/src/trusted/validator_arm/validator_arm.gyp:arm_validator_reporters',
+ '<(DEPTH)/native_client/src/trusted/validator_ragel/rdfa_validator.gyp:rdfa_validator',
+ ],
+ },
+ ]
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/ncfileutils.gyp b/chromium/native_client/src/trusted/validator/ncfileutils.gyp
new file mode 100644
index 00000000000..ae35f061b11
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/ncfileutils.gyp
@@ -0,0 +1,71 @@
+# -*- gyp -*-
+# Copyright (c) 2012 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'includes': [
+ '../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncfileutils"', {
+ 'sources': ['ncfileutil.c'],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncfileutils_x86_32',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncfileutils',
+ },
+ }],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncfileutils_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncfileutils',
+ 'win_target': 'x64',
+ },
+ }],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'ncfileutils_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncfileutils',
+ },
+ }],
+ }],
+ ['target_arch=="arm"', {
+ 'targets': [],
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/validator.gyp b/chromium/native_client/src/trusted/validator/validator.gyp
new file mode 100644
index 00000000000..f73a0f687f6
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/validator.gyp
@@ -0,0 +1,72 @@
+# -*- gyp -*-
+# Copyright (c) 2012 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'includes': [
+ '../../../build/common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'validators',
+ 'type': 'static_library',
+ 'sources' : [
+ 'validator_init.c',
+ ],
+ 'conditions': [
+ ['nacl_validator_ragel!=0', {
+ 'defines': [
+ 'NACL_VALIDATOR_RAGEL=1',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'validation_cache',
+ 'type': 'static_library',
+ 'sources' : [
+ 'validation_cache.c',
+ ],
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
+ ],
+ },
+ ],
+ 'conditions': [
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'validators64',
+ 'type': 'static_library',
+ 'sources' : [
+ 'validator_init.c',
+ ],
+ 'variables': {
+ 'win_target': 'x64',
+ },
+ 'conditions': [
+ ['nacl_validator_ragel!=0', {
+ 'defines': [
+ 'NACL_VALIDATOR_RAGEL=1',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'validation_cache64',
+ 'type': 'static_library',
+ 'sources' : [
+ 'validation_cache.c',
+ ],
+ 'variables': {
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform64',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/x86/32/validator_x86_32.gyp b/chromium/native_client/src/trusted/validator/x86/32/validator_x86_32.gyp
new file mode 100644
index 00000000000..8618fc71b65
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/32/validator_x86_32.gyp
@@ -0,0 +1,87 @@
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Build the specific library dependencies for validating on x86-32
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncvalidate_x86_32"', {
+ 'sources': [
+ 'ncvalidate.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'defines': [ 'NACL_TRUSTED_BUT_NOT_TCB' ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="ncvalidate_verbose_x86_32"', {
+ 'sources': [
+ 'ncvalidate_verbose.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'defines': [ 'NACL_TRUSTED_BUT_NOT_TCB' ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ # ----------------------------------------------------------------------
+ {
+ 'target_name': 'ncvalidate_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncvalidate_x86_32',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp:ncval_seg_sfi_x86_32',
+ ],
+ 'hard_dependency': 1,
+ },
+ {
+ 'target_name': 'ncvalidate_verbose_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncvalidate_verbose_x86_32',
+ },
+ 'dependencies': [
+ 'ncvalidate_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp:ncdis_seg_sfi_verbose_x86_32',
+ ],
+ 'hard_dependency': 1,
+ },
+ ],
+ }],
+ [ 'target_arch=="arm" or target_arch=="x64"', {
+ 'targets': []
+ }],
+ ],
+}
+
diff --git a/chromium/native_client/src/trusted/validator/x86/64/validator_x86_64.gyp b/chromium/native_client/src/trusted/validator/x86/64/validator_x86_64.gyp
new file mode 100644
index 00000000000..0d063a4b7a5
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/64/validator_x86_64.gyp
@@ -0,0 +1,94 @@
+# Copyright (c) 2012 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Build the specific library dependencies for validating on x86-64
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncvalidate_x86_64"', {
+ 'sources': [
+ 'ncvalidate.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'defines': [ 'NACL_TRUSTED_BUT_NOT_TCB' ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="ncvalidate_verbose_x86_64"', {
+ 'sources': [
+ 'ncvalidate_verbose.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'defines': [ 'NACL_TRUSTED_BUT_NOT_TCB' ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ 'conditions': [
+ ['OS=="win" and target_arch=="ia32"', {
+ 'variables': {
+ 'win_target': 'x64',
+ },
+ }],
+ ],
+ },
+ 'conditions': [
+ ['OS=="win" or target_arch=="x64"', {
+ 'targets': [
+ # ----------------------------------------------------------------------
+ {
+ 'target_name': 'ncvalidate_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncvalidate_x86_64',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp:ncval_reg_sfi_x86_64'
+ ],
+ 'hard_dependency': 1,
+ },
+ {
+ 'target_name': 'ncvalidate_verbose_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncvalidate_verbose_x86_64',
+ },
+ 'dependencies': [
+ 'ncvalidate_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp:ncval_reg_sfi_verbose_x86_64'
+ ],
+ 'hard_dependency': 1,
+ },
+ ],
+ }],
+ [ 'target_arch=="arm" or target_arch=="ia32"', {
+ 'targets': []
+ }],
+ ],
+}
+
diff --git a/chromium/native_client/src/trusted/validator/x86/decoder/ncdis_decode_tables.gyp b/chromium/native_client/src/trusted/validator/x86/decoder/ncdis_decode_tables.gyp
new file mode 100644
index 00000000000..9b8cb881b64
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/decoder/ncdis_decode_tables.gyp
@@ -0,0 +1,71 @@
+# -*- gyp -*-
+# Copyright (c) 2012 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncdis_decode_tables"', {
+ 'sources': ['ncdis_decode_tables.c'],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_decode_tables_x86_32',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncdis_decode_tables',
+ },
+ }],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_decode_tables_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncdis_decode_tables',
+ 'win_target': 'x64',
+ },
+ }],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_decode_tables_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'ncdis_decode_tables',
+ },
+ }],
+ }],
+ ['target_arch=="arm"', {
+ 'targets': [],
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp b/chromium/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp
new file mode 100644
index 00000000000..92e70c1dc72
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp
@@ -0,0 +1,181 @@
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Build the specific library dependencies for decoding x86 instructions.
+# Used to define a "full" decoder (used by ncdis). Currently used to decode
+# instructions for the x86-64 validator. Future plans is to encorporate the
+# decoder into the x86-32 validator.
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="nc_opcode_modeling"', {
+ 'sources': ['ncopcode_desc.c'],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="nc_opcode_modeling_verbose"', {
+ 'sources': ['ncopcode_desc_verbose.c'],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ]
+ },
+ }],
+ ['target_base=="nc_decoder"', {
+ 'sources': [
+ 'nc_inst_iter.c',
+ 'nc_inst_state.c',
+ 'nc_inst_trans.c',
+ 'ncop_exps.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ # ----------------------------------------------------------------------
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'nc_opcode_modeling_x86_32',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_32',
+ ],
+ }, {
+ 'target_name': 'nc_opcode_modeling_verbose_x86_32',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling_verbose',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_32',
+ ],
+ }, {
+ 'target_name': 'nc_decoder_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'nc_decoder',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_32',
+ ],
+ }],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'nc_opcode_modeling_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ ],
+ }, {
+ 'target_name': 'nc_opcode_modeling_verbose_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling_verbose',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_64',
+ ],
+ }, {
+ 'target_name': 'nc_decoder_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'nc_decoder',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ ],
+ }],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'nc_opcode_modeling_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ ],
+ }, {
+ 'target_name': 'nc_opcode_modeling_verbose_x86_64',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'target_base': 'nc_opcode_modeling_verbose',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_64',
+ ],
+ }, {
+ 'target_name': 'nc_decoder_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'nc_decoder',
+ },
+ 'dependencies': [
+ 'nc_opcode_modeling_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ ],
+ }],
+ }],
+ [ 'target_arch=="arm"', {
+ 'targets': []
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp b/chromium/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp
new file mode 100644
index 00000000000..9db4c892ac6
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_reg_sfi.gyp
@@ -0,0 +1,140 @@
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO(bradchen): eliminate need for the warning flag removals below
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncval_reg_sfi"', {
+ # we depend on ncvalidate build to generate the headers
+ 'sources': [ 'ncvalidate_iter.c',
+ 'ncvalidate_iter_detailed.c',
+ 'nc_cpu_checks.c',
+ 'nc_illegal.c',
+ 'nc_jumps.c',
+ 'address_sets.c',
+ 'nc_jumps_detailed.c',
+ 'nc_opcode_histogram.c',
+ 'nc_protect_base.c',
+ 'nc_memory_protect.c',
+ 'ncvalidate_utils.c',
+ 'ncval_decode_tables.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ]
+ },
+ }],
+ ['target_base=="ncval_reg_sfi_verbose"', {
+ 'sources': ['ncvalidate_iter_verbose.c'],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ]
+ },
+ }],
+ ],
+ },
+ # ----------------------------------------------------------------------
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncval_reg_sfi_x86_32',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp:nc_decoder_x86_32',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi',
+ },
+ }, {
+ 'target_name': 'ncval_reg_sfi_verbose_x86_32',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'ncval_reg_sfi_x86_32',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi_verbose',
+ },
+ }],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncval_reg_sfi_x86_64',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp:nc_decoder_x86_64',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi',
+ 'win_target': 'x64',
+ },
+ }, {
+ 'target_name': 'ncval_reg_sfi_verbose_x86_64',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'ncval_reg_sfi_x86_64',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi_verbose',
+ 'win_target': 'x64',
+ },
+ }],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'ncval_reg_sfi_x86_64',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/decoder/ncval_x86_decoder.gyp:nc_decoder_x86_64',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi',
+ },
+ }, {
+ 'target_name': 'ncval_reg_sfi_verbose_x86_64',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'ncval_reg_sfi_x86_64',
+ ],
+ 'variables': {
+ 'target_base': 'ncval_reg_sfi_verbose',
+ },
+ }],
+ }],
+ [ 'target_arch=="arm"', {
+ 'targets': []
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp b/chromium/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp
new file mode 100644
index 00000000000..ce72d749d1c
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/ncval_seg_sfi/ncval_seg_sfi.gyp
@@ -0,0 +1,179 @@
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO(bradchen): eliminate need for the warning flag removals below
+{
+ 'includes': [
+ '../../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncdis_seg_sfi"', {
+ 'sources': [
+ 'ncdecode.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="ncdis_seg_sfi_verbose"', {
+ 'sources': [
+ 'ncdecode_verbose.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="ncval_seg_sfi"', {
+ 'sources': [
+ 'ncvalidate.c',
+ 'ncvalidate_detailed.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ # ----------------------------------------------------------------------
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_seg_sfi_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi',
+ },
+ }, {
+ 'target_name': 'ncdis_seg_sfi_verbose_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi_verbose',
+ },
+ 'dependencies': [
+ 'ncdis_seg_sfi_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_verbose_x86_32'
+ ],
+ 'hard_dependency': 1,
+ }, {
+ 'target_name': 'ncval_seg_sfi_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_seg_sfi',
+ },
+ 'dependencies': [
+ 'ncdis_seg_sfi_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_32',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_32'
+ ],
+ 'hard_dependency': 1,
+ # VS2010 does not correctly incrementally link obj files generated
+ # from asm files. This flag disables UseLibraryDependencyInputs to
+ # avoid this problem.
+ 'msvs_2010_disable_uldi_when_referenced': 1,
+ }],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_seg_sfi_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi',
+ 'win_target': 'x64',
+ },
+ }, {
+ 'target_name': 'ncdis_seg_sfi_verbose_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi_verbose',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ 'ncval_seg_sfi_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_verbose_x86_64'
+ ],
+ 'hard_dependency': 1,
+ }, {
+ 'target_name': 'ncval_seg_sfi_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_seg_sfi',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ 'ncdis_seg_sfi_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64'
+ ],
+ 'hard_dependency': 1,
+ }],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ {
+ 'target_name': 'ncdis_seg_sfi_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi',
+ },
+ }, {
+ 'target_name': 'ncdis_seg_sfi_verbose_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncdis_seg_sfi_verbose',
+ },
+ 'dependencies': [
+ 'ncval_seg_sfi_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_verbose_x86_64' ],
+ 'hard_dependency': 1,
+ }, {
+ 'target_name': 'ncval_seg_sfi_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_seg_sfi',
+ },
+ 'dependencies': [
+ 'ncdis_seg_sfi_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
+ '<(DEPTH)/native_client/src/trusted/validator/x86/validate_x86.gyp:ncval_base_x86_64' ],
+ 'hard_dependency': 1,
+ }],
+ }],
+ [ 'target_arch=="arm"', {
+ 'targets': []
+ }],
+ ],
+}
diff --git a/chromium/native_client/src/trusted/validator/x86/validate_x86.gyp b/chromium/native_client/src/trusted/validator/x86/validate_x86.gyp
new file mode 100644
index 00000000000..d3e4f47bcb2
--- /dev/null
+++ b/chromium/native_client/src/trusted/validator/x86/validate_x86.gyp
@@ -0,0 +1,142 @@
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Build the specific library dependencies for validating x86 code, used
+# by both the x86-32 and x86-64 validators.
+# Note: Would like to name this file validator_x86.gyp, but that name is
+# already used, and on mac's, this is not allowed.
+{
+ 'includes': [
+ '../../../../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'variables': {
+ 'target_base': 'none',
+ },
+ 'target_conditions': [
+ ['target_base=="ncval_base"', {
+ 'sources': [
+ 'error_reporter.c',
+ 'halt_trim.c',
+ 'ncinstbuffer.c',
+ 'x86_insts.c',
+ 'nc_segment.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ # VS2010 does not correctly incrementally link obj files generated
+ # from asm files. This flag disables UseLibraryDependencyInputs to
+ # avoid this problem.
+ 'msvs_2010_disable_uldi_when_referenced': 1,
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ['target_base=="ncval_base_verbose"', {
+ 'sources': [
+ 'error_reporter_verbose.c',
+ 'x86_insts_verbose.c',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wextra',
+ '-Wswitch-enum',
+ '-Wsign-compare'
+ ],
+ },
+ }],
+ ],
+ },
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'targets': [
+ { 'target_name': 'ncval_base_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
+ '<(DEPTH)/native_client/src/trusted/cpu_features/cpu_features.gyp:cpu_features',
+ '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validation_cache',
+ ],
+ },
+ { 'target_name': 'ncval_base_verbose_x86_32',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base_verbose',
+ },
+ 'dependencies': [
+ 'ncval_base_x86_32',
+ ],
+ },
+ ],
+ }],
+ ['OS=="win" and target_arch=="ia32"', {
+ 'targets': [
+ { 'target_name': 'ncval_base_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base',
+ 'win_target': 'x64',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform64',
+ '<(DEPTH)/native_client/src/trusted/cpu_features/cpu_features.gyp:cpu_features64',
+ '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validation_cache64',
+ ],
+ },
+ { 'target_name': 'ncval_base_verbose_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base_verbose',
+ 'win_target': 'x64',
+ 'dependencies': [
+ 'ncval_base_x86_64',
+ ],
+ },
+ },
+ ],
+ }],
+ ['target_arch=="x64"', {
+ 'targets': [
+ { 'target_name': 'ncval_base_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base',
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
+ '<(DEPTH)/native_client/src/trusted/cpu_features/cpu_features.gyp:cpu_features',
+ '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validation_cache',
+ ],
+ },
+ { 'target_name': 'ncval_base_verbose_x86_64',
+ 'type': 'static_library',
+ 'variables': {
+ 'target_base': 'ncval_base_verbose',
+ },
+ 'dependencies': [
+ 'ncval_base_x86_64',
+ ],
+ },
+ ],
+ }],
+ [ 'target_arch=="arm"', {
+ 'targets': []
+ }],
+ ],
+}