OLD | NEW |
1 /* | 1 /* |
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 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" | 7 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
8 | 8 |
9 #include "native_client/src/shared/platform/nacl_log.h" | 9 #include "native_client/src/shared/platform/nacl_log.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 case LOAD_NOT_64_BIT: | 39 case LOAD_NOT_64_BIT: |
40 return "Not a 64-bit ELF file"; | 40 return "Not a 64-bit ELF file"; |
41 case LOAD_BAD_ABI: | 41 case LOAD_BAD_ABI: |
42 return "ELF file has unexpected OS ABI"; | 42 return "ELF file has unexpected OS ABI"; |
43 case LOAD_NOT_EXEC: | 43 case LOAD_NOT_EXEC: |
44 return "ELF file type not executable"; | 44 return "ELF file type not executable"; |
45 case LOAD_BAD_MACHINE: | 45 case LOAD_BAD_MACHINE: |
46 return "ELF file for wrong architecture"; | 46 return "ELF file for wrong architecture"; |
47 case LOAD_BAD_ELF_VERS: | 47 case LOAD_BAD_ELF_VERS: |
48 return "ELF version mismatch"; | 48 return "ELF version mismatch"; |
49 case LOAD_TOO_MANY_SECT: | 49 case LOAD_EHDR_OVERFLOW: |
50 return "Too many section headers"; | 50 return "ELFCLASS64 file header has fields that overflow 32 bits"; |
51 case LOAD_BAD_SECT: | 51 case LOAD_PHDR_OVERFLOW: |
52 return "ELF bad sections"; | 52 return "ELFCLASS64 program header has fields that overflow 32 bits"; |
53 case LOAD_NO_MEMORY: | 53 case LOAD_NO_MEMORY: |
54 return "Insufficient memory to load file"; | 54 return "Insufficient memory to load file"; |
55 case LOAD_SECT_HDR: | 55 case LOAD_BAD_EHSIZE: |
56 return "ELF section header string table load error"; | 56 return "ELFCLASS64 file header has wrong e_ehsize value"; |
57 case LOAD_ADDR_SPACE_TOO_SMALL: | 57 case LOAD_ADDR_SPACE_TOO_SMALL: |
58 return "Address space too small"; | 58 return "Address space too small"; |
59 case LOAD_ADDR_SPACE_TOO_BIG: | 59 case LOAD_ADDR_SPACE_TOO_BIG: |
60 return "Address space too big"; | 60 return "Address space too big"; |
61 case LOAD_DATA_OVERLAPS_STACK_SECTION: | 61 case LOAD_DATA_OVERLAPS_STACK_SECTION: |
62 return ("Memory \"hole\" between end of BSS and start of stack" | 62 return ("Memory \"hole\" between end of BSS and start of stack" |
63 " is negative in size"); | 63 " is negative in size"); |
64 case LOAD_RODATA_OVERLAPS_DATA: | 64 case LOAD_RODATA_OVERLAPS_DATA: |
65 return "Read-only data segment overlaps data segment"; | 65 return "Read-only data segment overlaps data segment"; |
66 case LOAD_DATA_NOT_LAST_SEGMENT: | 66 case LOAD_DATA_NOT_LAST_SEGMENT: |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 /* | 139 /* |
140 * do not use default case label, to make sure that the compiler | 140 * do not use default case label, to make sure that the compiler |
141 * will generate a warning with -Wswitch-enum for new codes | 141 * will generate a warning with -Wswitch-enum for new codes |
142 * introduced in nacl_error_codes.h for which there is no | 142 * introduced in nacl_error_codes.h for which there is no |
143 * corresponding entry here. instead, we pretend that fall-through | 143 * corresponding entry here. instead, we pretend that fall-through |
144 * from the switch is possible. (otherwise -W complains control | 144 * from the switch is possible. (otherwise -W complains control |
145 * reaches end of non-void function.) | 145 * reaches end of non-void function.) |
146 */ | 146 */ |
147 return "BAD ERROR CODE"; | 147 return "BAD ERROR CODE"; |
148 } | 148 } |
OLD | NEW |