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

Side by Side Diff: native_client/src/trusted/service_runtime/arch/arm/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
« no previous file with comments | « no previous file | native_client/src/trusted/service_runtime/arch/arm/nacl_syscall.S » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, 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 14 matching lines...) Expand all
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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 #include "native_client/src/trusted/service_runtime/nacl_config.h" 32 #include "native_client/src/trusted/service_runtime/nacl_config.h"
33 33
34 .text 34 .text
35 .globl IDENTIFIER(NaClSwitch) 35 .globl IDENTIFIER(NaClSwitch)
36 HIDDEN(NaClSwitch)
36 IDENTIFIER(NaClSwitch): 37 IDENTIFIER(NaClSwitch):
37 38
38 /* 39 /*
39 * This code is executed when switching from the service runtime to a nacl 40 * This code is executed when switching from the service runtime to a nacl
40 * module. This happens when a main nacl thread is created and starting to 41 * module. This happens when a main nacl thread is created and starting to
41 * execute the nacle code, or when nacl module is returning from a system 42 * execute the nacle code, or when nacl module is returning from a system
42 * call. This piece of code lives in a service runtime part of address space. 43 * call. This piece of code lives in a service runtime part of address space.
43 * the one and only argument is in register r0 44 * the one and only argument is in register r0
44 * 45 *
45 * r0 -- address of thread context (struct NaClThreadContext) 46 * r0 -- address of thread context (struct NaClThreadContext)
46 */ 47 */
47 48
48 /* clear registers r2,r3, lr, flag and status fields in CPSR (status 49 /* clear registers r2,r3, lr, flag and status fields in CPSR (status
49 * register). This might be necessary to avoid information leaks, the rest 50 * register). This might be necessary to avoid information leaks, the rest
50 * register are overwritten by the following code and the code in springboard. 51 * register are overwritten by the following code and the code in springboard.
51 */ 52 */
52 mov r2, #0 53 mov r2, #0
53 mov r3, #0 54 mov r3, #0
54 mov lr, #0 55 mov lr, #0
55 msr cpsr_fs, #0 56 msr cpsr_fs, #0
56 57
57 ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, fp, sp} 58 ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, fp, sp}
58 add r0, #4 /* skip prog_ctr in struct NaClThreadContext */ 59 add r0, #4 /* skip prog_ctr in struct NaClThreadContext */
59 ldmia r0, {r0, r1, pc} 60 ldmia r0, {r0, r1, pc}
60
OLDNEW
« no previous file with comments | « no previous file | native_client/src/trusted/service_runtime/arch/arm/nacl_syscall.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698