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

Side by Side Diff: native_client/src/trusted/service_runtime/arch/x86_32/nacl_switch.S

Issue 293009: Mark assembly routines that don't need to be exported as hidden (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2008, Google Inc. 2 * Copyright 2008, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 /* 32 /*
33 * NaCl Secure Runtime 33 * NaCl Secure Runtime
34 */ 34 */
35 35
36 #include "native_client/src/trusted/service_runtime/nacl_config.h" 36 #include "native_client/src/trusted/service_runtime/nacl_config.h"
37 37
38 .text 38 .text
39 .globl IDENTIFIER(NaClSwitch) 39 .globl IDENTIFIER(NaClSwitch)
40 HIDDEN(NaClSwitch)
40 IDENTIFIER(NaClSwitch): 41 IDENTIFIER(NaClSwitch):
41 popl %eax /* throw away the return addr */ 42 popl %eax /* throw away the return addr */
42 43
43 /* do not leak info to app */ 44 /* do not leak info to app */
44 xorl %ecx, %ecx 45 xorl %ecx, %ecx
45 /* xorl will leave eflags in a known state, so no info leaks */ 46 /* xorl will leave eflags in a known state, so no info leaks */
46 popl %ecx 47 popl %ecx
47 movl 0x30(%ecx), %edx /* new_eip */ 48 movl 0x30(%ecx), %edx /* new_eip */
48 movl 0x14(%ecx), %ebp /* frame_ptr.ptr_32.ptr */ 49 movl 0x14(%ecx), %ebp /* frame_ptr.ptr_32.ptr */
49 movl 0x8(%ecx), %edi /* edi */ 50 movl 0x8(%ecx), %edi /* edi */
50 movl 0x4(%ecx), %esi /* esi */ 51 movl 0x4(%ecx), %esi /* esi */
51 movl 0(%ecx), %ebx /* ebx */ 52 movl 0(%ecx), %ebx /* ebx */
52 53
53 mov 0x2e(%ecx), %gs /* gs */ 54 mov 0x2e(%ecx), %gs /* gs */
54 mov 0x2c(%ecx), %fs /* fs */ 55 mov 0x2c(%ecx), %fs /* fs */
55 mov 0x2a(%ecx), %es /* es */ 56 mov 0x2a(%ecx), %es /* es */
56 57
57 ljmp *0x38(%ecx) /* springboard address */ 58 ljmp *0x38(%ecx) /* springboard address */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698