| 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 <string.h> | 7 #include <string.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include "native_client/src/include/elf_auxv.h" | 10 #include "native_client/src/include/elf_auxv.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 __libnacl_mandatory_irt_query(ident, &__libnacl_irt_##name, \ | 90 __libnacl_mandatory_irt_query(ident, &__libnacl_irt_##name, \ |
| 91 sizeof(__libnacl_irt_##name)) | 91 sizeof(__libnacl_irt_##name)) |
| 92 | 92 |
| 93 /* | 93 /* |
| 94 * Initialize all our IRT function tables using the query function. | 94 * Initialize all our IRT function tables using the query function. |
| 95 * The query function's address is passed via AT_SYSINFO in auxv. | 95 * The query function's address is passed via AT_SYSINFO in auxv. |
| 96 */ | 96 */ |
| 97 void __libnacl_irt_init(Elf32_auxv_t *auxv) { | 97 void __libnacl_irt_init(Elf32_auxv_t *auxv) { |
| 98 grok_auxv(auxv); | 98 grok_auxv(auxv); |
| 99 | 99 |
| 100 /* @IGNORE_LINES_FOR_CODE_HYGIENE[1] */ |
| 101 #if defined(__pnacl__) |
| 102 /* |
| 103 * Let the irt know that this is pnacl nexe. |
| 104 * Code will have to be added here once we eliminate |
| 105 * src/untrusted/pnacl_irt_shim/ |
| 106 */ |
| 107 #endif |
| 100 DO_QUERY(NACL_IRT_BASIC_v0_1, basic); | 108 DO_QUERY(NACL_IRT_BASIC_v0_1, basic); |
| 101 DO_QUERY(NACL_IRT_FDIO_v0_1, fdio); | 109 DO_QUERY(NACL_IRT_FDIO_v0_1, fdio); |
| 102 DO_QUERY(NACL_IRT_FILENAME_v0_1, filename); | 110 DO_QUERY(NACL_IRT_FILENAME_v0_1, filename); |
| 103 DO_QUERY(NACL_IRT_MEMORY_v0_1, memory); | 111 DO_QUERY(NACL_IRT_MEMORY_v0_1, memory); |
| 104 DO_QUERY(NACL_IRT_DYNCODE_v0_1, dyncode); | 112 DO_QUERY(NACL_IRT_DYNCODE_v0_1, dyncode); |
| 105 DO_QUERY(NACL_IRT_TLS_v0_1, tls); | 113 DO_QUERY(NACL_IRT_TLS_v0_1, tls); |
| 106 DO_QUERY(NACL_IRT_BLOCKHOOK_v0_1, blockhook); | 114 DO_QUERY(NACL_IRT_BLOCKHOOK_v0_1, blockhook); |
| 107 } | 115 } |
| OLD | NEW |