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

Unified Diff: src/trusted/service_runtime/linux/nacl_bootstrap.c

Issue 10832040: Support 64-bit reserved_at_zero value nacl-side (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: inline template digits Created 8 years, 5 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
Index: src/trusted/service_runtime/linux/nacl_bootstrap.c
diff --git a/src/trusted/service_runtime/linux/nacl_bootstrap.c b/src/trusted/service_runtime/linux/nacl_bootstrap.c
index 607a6f815eb685428b009bc00630a768fc0fa7e2..22dfd8bc8192f438239311ee4e8c20e4d45ea989 100644
--- a/src/trusted/service_runtime/linux/nacl_bootstrap.c
+++ b/src/trusted/service_runtime/linux/nacl_bootstrap.c
@@ -44,16 +44,14 @@ typedef uintptr_t __attribute__((may_alias)) stack_val_t;
* us from having to reformat the whole stack to find space for a string longer
* than the original argument.
*/
+#define TEMPLATE_DIGITS "XXXXXXXXXXXXXXXX"
#define R_DEBUG_TEMPLATE_PREFIX "--r_debug=0x"
-#define R_DEBUG_TEMPLATE_DIGITS "XXXXXXXXXXXXXXXX"
-static const char kRDebugTemplate[] =
- R_DEBUG_TEMPLATE_PREFIX R_DEBUG_TEMPLATE_DIGITS;
+static const char kRDebugTemplate[] = R_DEBUG_TEMPLATE_PREFIX TEMPLATE_DIGITS;
static const size_t kRDebugPrefixLen = sizeof(R_DEBUG_TEMPLATE_PREFIX) - 1;
#define RESERVED_AT_ZERO_TEMPLATE_PREFIX "--reserved_at_zero=0x"
-#define RESERVED_AT_ZERO_TEMPLATE_DIGITS "XXXXXXXX"
static const char kReservedAtZeroTemplate[] =
- RESERVED_AT_ZERO_TEMPLATE_PREFIX RESERVED_AT_ZERO_TEMPLATE_DIGITS;
+ RESERVED_AT_ZERO_TEMPLATE_PREFIX TEMPLATE_DIGITS;
static const size_t kReservedAtZeroPrefixLen =
sizeof(RESERVED_AT_ZERO_TEMPLATE_PREFIX) - 1;
extern size_t RESERVE_TOP;
@@ -418,7 +416,7 @@ struct r_debug _r_debug __attribute__((nocommon, section(".r_debug")));
static int check_r_debug_arg(char *arg) {
if (my_strcmp(arg, kRDebugTemplate) == 0) {
fill_in_template_digits(arg + kRDebugPrefixLen,
- sizeof(R_DEBUG_TEMPLATE_DIGITS) - 1,
+ sizeof(TEMPLATE_DIGITS) - 1,
(uintptr_t) &_r_debug);
return 1;
}
@@ -433,7 +431,7 @@ static int check_r_debug_arg(char *arg) {
static int check_reserved_at_zero_arg(char *arg) {
if (my_strcmp(arg, kReservedAtZeroTemplate) == 0) {
fill_in_template_digits(arg + kReservedAtZeroPrefixLen,
- sizeof(RESERVED_AT_ZERO_TEMPLATE_DIGITS) - 1,
+ sizeof(TEMPLATE_DIGITS) - 1,
(uintptr_t) &RESERVE_TOP);
return 1;
}
« no previous file with comments | « src/trusted/nonnacl_util/sel_ldr_launcher_standalone.cc ('k') | src/trusted/service_runtime/linux/nacl_bootstrap_args.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698