Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: sysdeps/nacl/dl-sysdep.c

Issue 7282019: Adjust for new NaCl startup ABI (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« make_sysd_rules.py ('K') | « sysdeps/nacl/Makefile ('k') | sysdeps/nacl/receive_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698