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__) | |
Roland McGrath
2012/08/06 23:32:24
This does not belong here.
The shim only has to do
Robert Muth (chromium)
2012/08/07 14:45:40
I think it makes sense to keep it here.
It is conc
| |
102 /* switch irt to use pnacl shim wrappers */ | |
103 /* enable this when removing src/untrusted/pnacl_irt_shim/ */ | |
104 /* __libnacl_mandatory_irt_query("@nacl-cc-shim-mode", NULL, 0); */ | |
Mark Seaborn
2012/08/06 23:30:29
This is not an appropriate place to enable the shi
Robert Muth (chromium)
2012/08/07 14:45:40
Moving it elsewhere will likely be quite messy.
As
| |
105 #endif | |
100 DO_QUERY(NACL_IRT_BASIC_v0_1, basic); | 106 DO_QUERY(NACL_IRT_BASIC_v0_1, basic); |
101 DO_QUERY(NACL_IRT_FDIO_v0_1, fdio); | 107 DO_QUERY(NACL_IRT_FDIO_v0_1, fdio); |
102 DO_QUERY(NACL_IRT_FILENAME_v0_1, filename); | 108 DO_QUERY(NACL_IRT_FILENAME_v0_1, filename); |
103 DO_QUERY(NACL_IRT_MEMORY_v0_1, memory); | 109 DO_QUERY(NACL_IRT_MEMORY_v0_1, memory); |
104 DO_QUERY(NACL_IRT_DYNCODE_v0_1, dyncode); | 110 DO_QUERY(NACL_IRT_DYNCODE_v0_1, dyncode); |
105 DO_QUERY(NACL_IRT_TLS_v0_1, tls); | 111 DO_QUERY(NACL_IRT_TLS_v0_1, tls); |
106 DO_QUERY(NACL_IRT_BLOCKHOOK_v0_1, blockhook); | 112 DO_QUERY(NACL_IRT_BLOCKHOOK_v0_1, blockhook); |
107 } | 113 } |
OLD | NEW |