| Index: sysdeps/nacl/dl-sysdep.c
|
| diff --git a/sysdeps/nacl/dl-sysdep.c b/sysdeps/nacl/dl-sysdep.c
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8cd36549b1bc665cc09ff808515d2d232c28ef1b
|
| --- /dev/null
|
| +++ b/sysdeps/nacl/dl-sysdep.c
|
| @@ -0,0 +1,16 @@
|
| +/* The COOKIE is the argument to _dl_start, which is passed through from
|
| + the first C function argument set up by the NaCl trusted runtime's
|
| + startup sequence. We extract the arguments et al from here rather
|
| + than from the traditional Unix/ELF stack setup. */
|
| +
|
| +#define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
|
| + do { \
|
| + uint32_t *_info = (void *) (cookie); \
|
| + int _envc = _info[1]; \
|
| + (argc) = _info[2]; \
|
| + (argv) = (void *) &_info[3]; \
|
| + (envp) = &(argv)[(argc) + 1]; \
|
| + (auxp) = (void *) &(envp)[_envc + 1]; \
|
| + } while (0)
|
| +
|
| +#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
|
|
|