| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 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 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <elf.h> | |
| 9 #include <inttypes.h> | |
| 10 #include <stdio.h> | 8 #include <stdio.h> |
| 11 #include <stdlib.h> | 9 #include <stdlib.h> |
| 12 #include <string.h> | 10 #include <string.h> |
| 13 #include "validator.h" | 11 |
| 12 #include "native_client/src/include/elf32.h" |
| 13 #include "native_client/src/include/elf64.h" |
| 14 #include "native_client/src/trusted/validator_ragel/unreviewed/validator.h" |
| 14 | 15 |
| 15 #undef TRUE | 16 #undef TRUE |
| 16 #define TRUE 1 | 17 #define TRUE 1 |
| 17 | 18 |
| 18 #undef FALSE | 19 #undef FALSE |
| 19 #define FALSE 0 | 20 #define FALSE 0 |
| 20 | 21 |
| 21 /* This may help with portability but makes code less readable. */ | 22 /* This may help with portability but makes code less readable. */ |
| 22 #pragma GCC diagnostic ignored "-Wdeclaration-after-statement" | 23 #pragma GCC diagnostic ignored "-Wdeclaration-after-statement" |
| 23 | 24 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 for (index = initial_index; index < argc; ++index) { | 165 for (index = initial_index; index < argc; ++index) { |
| 165 const char *filename = argv[index]; | 166 const char *filename = argv[index]; |
| 166 int rc = ValidateFile(filename, repeat_count); | 167 int rc = ValidateFile(filename, repeat_count); |
| 167 if (rc != 0) { | 168 if (rc != 0) { |
| 168 printf("file '%s' can not be fully validated\n", filename); | 169 printf("file '%s' can not be fully validated\n", filename); |
| 169 return 1; | 170 return 1; |
| 170 } | 171 } |
| 171 } | 172 } |
| 172 return 0; | 173 return 0; |
| 173 } | 174 } |
| OLD | NEW |