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

Unified Diff: src/untrusted/stubs/crt1_x86_32.S

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/stubs/crt1_x86.S ('k') | src/untrusted/stubs/crt1_x86_64.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/stubs/crt1_x86_32.S
diff --git a/src/untrusted/stubs/crt1_x86_32.S b/src/untrusted/stubs/crt1_x86_32.S
deleted file mode 100644
index 1e0e544939eac861288dc8f355d8740b3361431f..0000000000000000000000000000000000000000
--- a/src/untrusted/stubs/crt1_x86_32.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2010 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
- */
-
-/* Native Client crt0 startup code for x86-64 */
-
- .text
- .p2align NACLENTRYALIGN,0xf4
-
- .global _start
-_start:
- /*
- * The i386 ELF ABI specifies that on entry the stack looks like:
- * --------------------------------
- * | Unspecified |
- * --------------------------------
- * | Information block, including |
- * | argument strings, |
- * | environment strings, |
- * | auxiliary information |
- * | ... |
- * | (size varies) |
- * --------------------------------
- * | Unspecified |
- * --------------------------------
- * | Null auxiliary vector entry |
- * --------------------------------
- * | Auxiliary vector |
- * | ... |
- * | (2-word entries) |
- * --------------------------------
- * | 0 word |
- * --------------------------------
- * | Environment pointers |
- * | ... |
- * | (one word each) |
- * --------------------------------
- * | Argument pointers |
- * | ... |
- * 4(%esp) | (Argument count words) |
- * --------------------------------
- * 0(%esp) | Argument count |
- * --------------------------------
- * | Undefined |
- * --------------------------------
- * TODO(sehr): fix stack alignments of atexit, _init, _fini, and
- * exit.
- */
-
- /*
- * The ABI uses a null frame pointer to say when to stop backtracing.
- * In x86-64 case we don't need this because RBP handling is special
- * and so loader will load proper value in RBP.
- */
-
- xorl %ebp, %ebp
-
- /*
- * Because we are going to align the stack 0mod16 for SSE2,
- * We need to gather the argc, argv, and envp pointers before
- * moving esp.
- */
- popl %esi /* Remove argc from the top of the stack */
- movl %esp, %ecx /* Save the argv pointer */
-
- /*
- * Finding envp requires skipping over argc+1 words.
- */
- leal 4(%esp, %esi, 4), %ebx
-
- /*
- * Align the stack 0mod16, for SSE2
- */
- andl $0xfffffff0, %esp
-
- /*
- * Push the arguments to main.
- */
- pushl %ebp /* Padding to maintain 0mod16 alignment */
- pushl %ebx /* Push envp onto the stack */
- pushl %ecx /* Push argv onto the stack */
- pushl %esi /* Push argc back onto the stack */
-
- naclcall __nacl_startup
-
-halt_loop:
- hlt
- jmp halt_loop
- .p2align 5
-
« no previous file with comments | « src/untrusted/stubs/crt1_x86.S ('k') | src/untrusted/stubs/crt1_x86_64.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698