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

Side by Side Diff: native_client/src/trusted/service_runtime/nacl_config.h

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 | « native_client/src/trusted/service_runtime/arch/x86_64/nacl_syscall.S ('k') | no next file » | 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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * NACL_TRAMPOLINE_END gives the address of the first byte after the 113 * NACL_TRAMPOLINE_END gives the address of the first byte after the
114 * trampolines. 114 * trampolines.
115 */ 115 */
116 #define NACL_NULL_REGION_SHIFT 16 116 #define NACL_NULL_REGION_SHIFT 16
117 #define NACL_TRAMPOLINE_START (1 << NACL_NULL_REGION_SHIFT) 117 #define NACL_TRAMPOLINE_START (1 << NACL_NULL_REGION_SHIFT)
118 #define NACL_TRAMPOLINE_SHIFT 16 118 #define NACL_TRAMPOLINE_SHIFT 16
119 #define NACL_TRAMPOLINE_SIZE (1 << NACL_TRAMPOLINE_SHIFT) 119 #define NACL_TRAMPOLINE_SIZE (1 << NACL_TRAMPOLINE_SHIFT)
120 #define NACL_TRAMPOLINE_END (NACL_TRAMPOLINE_START + NACL_TRAMPOLINE_SIZE) 120 #define NACL_TRAMPOLINE_END (NACL_TRAMPOLINE_START + NACL_TRAMPOLINE_SIZE)
121 /* 121 /*
122 * macros to provide uniform access to identifiers from assembly due 122 * macros to provide uniform access to identifiers from assembly due
123 * to different C -> asm name mangling convention 123 * to different C -> asm name mangling conventions and other platform-specific
124 * requirements
124 */ 125 */
125 #if NACL_WINDOWS || NACL_OSX 126 #if NACL_WINDOWS || NACL_OSX
126 # define IDENTIFIER(n) _##n 127 # define IDENTIFIER(n) _##n
127 #else /* Linux */ 128 #else /* Linux */
128 # define IDENTIFIER(n) n 129 # define IDENTIFIER(n) n
129 #endif 130 #endif
130 131
132 #if NACL_OSX
133 # define HIDDEN(n) .private_extern IDENTIFIER(n)
134 #elif NACL_LINUX
135 # define HIDDEN(n) .hidden IDENTIFIER(n)
136 #else /* Windows */
137 /* On Windows, symbols are hidden by default. */
138 # define HIDDEN(n)
139 #endif
140
131 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 141 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86
132 142
133 #if NACL_BUILD_SUBARCH == 32 143 #if NACL_BUILD_SUBARCH == 32
134 #define NACL_USERRET_FIX 0x8 144 #define NACL_USERRET_FIX 0x8
135 #elif NACL_BUILD_SUBARCH == 64 145 #elif NACL_BUILD_SUBARCH == 64
136 #define NACL_USERRET_FIX 0xc 146 #define NACL_USERRET_FIX 0xc
137 #else /* NACL_BUILD_SUBARCH */ 147 #else /* NACL_BUILD_SUBARCH */
138 #error Unknown platform! 148 #error Unknown platform!
139 #endif /* NACL_BUILD_SUBARCH */ 149 #endif /* NACL_BUILD_SUBARCH */
140 150
141 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm 151 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
142 152
143 #define NACL_HALT mov pc, #0 153 #define NACL_HALT mov pc, #0
144 #define NACL_CF_MASK 0xF000000F /* assumes 16-byte bundles */ 154 #define NACL_CF_MASK 0xF000000F /* assumes 16-byte bundles */
145 #define NACL_USERRET_FIX 0x4 155 #define NACL_USERRET_FIX 0x4
146 156
147 #else /* NACL_ARCH(NACL_BUILD_ARCH) */ 157 #else /* NACL_ARCH(NACL_BUILD_ARCH) */
148 158
149 #error Unknown platform! 159 #error Unknown platform!
150 160
151 #endif /* NACL_ARCH(NACL_BUILD_ARCH) */ 161 #endif /* NACL_ARCH(NACL_BUILD_ARCH) */
152 162
153 #define NACL_SYSARGS_FIX NACL_USERRET_FIX + 0x4 163 #define NACL_SYSARGS_FIX NACL_USERRET_FIX + 0x4
154 164
155 #endif /* NATIVE_CLIENT_SERVICE_RUNTIME_NACL_CONFIG_H_ */ 165 #endif /* NATIVE_CLIENT_SERVICE_RUNTIME_NACL_CONFIG_H_ */
156 166
OLDNEW
« no previous file with comments | « native_client/src/trusted/service_runtime/arch/x86_64/nacl_syscall.S ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698