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

Side by Side Diff: native_client/src/trusted/service_runtime/arch/arm/springboard.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 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 22 matching lines...) Expand all
33 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h " 33 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h "
34 34
35 /* 35 /*
36 * Assembly code template. This is linked into the service runtime 36 * Assembly code template. This is linked into the service runtime
37 * but is unused as code -- it is used as data to be patched into 37 * but is unused as code -- it is used as data to be patched into
38 * a NaCl app's address space as a "hidden" part of its trampoline 38 * a NaCl app's address space as a "hidden" part of its trampoline
39 * region. This code takes the last slot in trampoline region, and it is 39 * region. This code takes the last slot in trampoline region, and it is
40 * loaded by NaClLoadSpringboard() (sel_ldr.c). 40 * loaded by NaClLoadSpringboard() (sel_ldr.c).
41 */ 41 */
42 42
43 .globl IDENTIFIER(NaCl_springboard)
44 .globl IDENTIFIER(NaCl_springboard_end)
45
46 /* 43 /*
47 * NaCl_springboard is used for syscall return and any time we want 44 * NaCl_springboard is used for syscall return and any time we want
48 * to do an upcall into NaCl application. 45 * to do an upcall into NaCl application.
49 */ 46 */
50 47
48 .globl IDENTIFIER(NaCl_springboard)
49 HIDDEN(NaCl_springboard)
51 IDENTIFIER(NaCl_springboard): 50 IDENTIFIER(NaCl_springboard):
52 /* 51 /*
53 * r0 -- syscall return value 52 * r0 -- syscall return value
54 * r1 -- new pc 53 * r1 -- new pc
55 * == user srack == 54 * == user srack ==
56 * top 55 * top
57 * ===== 56 * =====
58 * arg 1 57 * arg 1
59 * arg 2 58 * arg 2
60 * ..... 59 * .....
61 * arg N 60 * arg N
62 */ 61 */
63 62
64 /* 63 /*
65 * This instruction guards springboard from unauthorized execution. 64 * This instruction guards springboard from unauthorized execution.
66 * Service runtime jumps to the instruction following the NACL_HALT one. If 65 * Service runtime jumps to the instruction following the NACL_HALT one. If
67 * any other code tries to reach springboard without performing a jump it will 66 * any other code tries to reach springboard without performing a jump it will
68 * be halted by the NACL_HALT 67 * be halted by the NACL_HALT
69 */ 68 */
70 NACL_HALT 69 NACL_HALT
71 70
72 add sp, #16 /* popping four arguments placed by trampoline code */ 71 add sp, #16 /* popping four arguments placed by trampoline code */
73 #if !defined(DANGEROUS_DEBUG_MODE_DISABLE_INNER_SANDBOX) 72 #if !defined(DANGEROUS_DEBUG_MODE_DISABLE_INNER_SANDBOX)
74 bic r1, r1, #0xF000000F 73 bic r1, r1, #0xF000000F
75 #endif 74 #endif
76 bx r1 75 bx r1
76 .globl IDENTIFIER(NaCl_springboard_end)
77 HIDDEN(NaCl_springboard_end)
77 IDENTIFIER(NaCl_springboard_end): 78 IDENTIFIER(NaCl_springboard_end):
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698