OLD | NEW |
1 /* The COOKIE is the argument to _dl_start, which is passed through from | 1 /* The COOKIE is the argument to _dl_start, which is passed through from |
2 the first C function argument set up by the NaCl trusted runtime's | 2 the first C function argument set up by the NaCl trusted runtime's |
3 startup sequence. We extract the arguments et al from here rather | 3 startup sequence. We extract the arguments et al from here rather |
4 than from the traditional Unix/ELF stack setup. */ | 4 than from the traditional Unix/ELF stack setup. */ |
5 | 5 |
6 #define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ | 6 #define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ |
7 do { \ | 7 do { \ |
8 uint32_t *_info = (void *) (cookie); \ | 8 uint32_t *_info = (void *) (cookie); \ |
9 int _envc = _info[1]; \ | 9 int _envc = _info[1]; \ |
10 (argc) = _info[2]; \ | 10 (argc) = _info[2]; \ |
11 (argv) = (void *) &_info[3]; \ | 11 (argv) = (void *) &_info[3]; \ |
12 (envp) = &(argv)[(argc) + 1]; \ | 12 (envp) = &(argv)[(argc) + 1]; \ |
13 (auxp) = (void *) &(envp)[_envc + 1]; \ | 13 (auxp) = (void *) &(envp)[_envc + 1]; \ |
14 } while (0) | 14 } while (0) |
15 | 15 |
16 #include <sysdeps/unix/sysv/linux/dl-sysdep.c> | 16 #include <linux/dl-sysdep.c> |
OLD | NEW |