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

Unified Diff: src/untrusted/stubs/crt1.x

Issue 7276050: Change startup ABI for untrusted code to be C-compatible (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: disable bogus stack_frame.cc test for now 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
« no previous file with comments | « src/untrusted/nacl/start.c ('k') | src/untrusted/stubs/crt1_arm.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/stubs/crt1.x
diff --git a/src/untrusted/stubs/crt1.x b/src/untrusted/stubs/crt1.x
new file mode 100644
index 0000000000000000000000000000000000000000..52a49213d0f580f52eebbdff0754bd38676be3f3
--- /dev/null
+++ b/src/untrusted/stubs/crt1.x
@@ -0,0 +1,13 @@
+/*
+ * This is a dummy linker script used as crt1.o.
+ * The actual startup code is just the _start function defined in a library.
+ * We provide this file for two purposes:
+ * 1. To keep with the traditional linking sequence that puts crt1.o first.
+ * 2. To generate references to the main and exit symbols like the real
+ * startup code would, so that they will be brought in from libraries
+ * before -lc is encountered in the link. Otherwise a main defined in
+ * a library wouldn't be referenced until after that library had already
+ * been examined, and _start's call would get an undefined reference.
+ */
+
+EXTERN ( main exit )
« no previous file with comments | « src/untrusted/nacl/start.c ('k') | src/untrusted/stubs/crt1_arm.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698