diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
commit | 6ca409e0e4c198fe3081346eebbae3f068fe605a (patch) | |
tree | 060cb05d99220a1eda399194d1209c269f0e8cd8 /applets/applets.c | |
parent | 4185548984357df91311f30c8e43d95f33922576 (diff) | |
download | busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2 busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip |
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
Diffstat (limited to 'applets/applets.c')
-rw-r--r-- | applets/applets.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/applets/applets.c b/applets/applets.c index 89dea3e6a..6ff4301e4 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE | 35 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE |
36 | /* Define usage_messages[] */ | 36 | /* Define usage_messages[] */ |
37 | static const char usage_messages[] = "" | 37 | static const char usage_messages[] ALIGN1 = "" |
38 | #define MAKE_USAGE | 38 | #define MAKE_USAGE |
39 | #include "usage.h" | 39 | #include "usage.h" |
40 | #include "applets.h" | 40 | #include "applets.h" |
@@ -108,12 +108,12 @@ static char *get_trimmed_slice(char *s, char *e) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | /* Don't depend on the tools to combine strings. */ | 110 | /* Don't depend on the tools to combine strings. */ |
111 | static const char config_file[] = "/etc/busybox.conf"; | 111 | static const char config_file[] ALIGN1 = "/etc/busybox.conf"; |
112 | 112 | ||
113 | /* We don't supply a value for the nul, so an index adjustment is | 113 | /* We don't supply a value for the nul, so an index adjustment is |
114 | * necessary below. Also, we use unsigned short here to save some | 114 | * necessary below. Also, we use unsigned short here to save some |
115 | * space even though these are really mode_t values. */ | 115 | * space even though these are really mode_t values. */ |
116 | static const unsigned short mode_mask[] = { | 116 | static const unsigned short mode_mask[] ALIGN2 = { |
117 | /* SST sst xxx --- */ | 117 | /* SST sst xxx --- */ |
118 | S_ISUID, S_ISUID|S_IXUSR, S_IXUSR, 0, /* user */ | 118 | S_ISUID, S_ISUID|S_IXUSR, S_IXUSR, 0, /* user */ |
119 | S_ISGID, S_ISGID|S_IXGRP, S_IXGRP, 0, /* group */ | 119 | S_ISGID, S_ISGID|S_IXGRP, S_IXGRP, 0, /* group */ |
@@ -255,7 +255,7 @@ static void parse_config_file(void) | |||
255 | 255 | ||
256 | for (i = 0; i < 3; i++) { | 256 | for (i = 0; i < 3; i++) { |
257 | /* There are 4 chars + 1 nul for each of user/group/other. */ | 257 | /* There are 4 chars + 1 nul for each of user/group/other. */ |
258 | static const char mode_chars[] = "Ssx-\0" "Ssx-\0" "Ttx-"; | 258 | static const char mode_chars[] ALIGN1 = "Ssx-\0" "Ssx-\0" "Ttx-"; |
259 | 259 | ||
260 | const char *q; | 260 | const char *q; |
261 | q = strchrnul(mode_chars + 5*i, *e++); | 261 | q = strchrnul(mode_chars + 5*i, *e++); |
@@ -499,8 +499,8 @@ static void install_links(const char *busybox, int use_symbolic_links) | |||
499 | /* directory table | 499 | /* directory table |
500 | * this should be consistent w/ the enum, | 500 | * this should be consistent w/ the enum, |
501 | * busybox.h::bb_install_loc_t, or else... */ | 501 | * busybox.h::bb_install_loc_t, or else... */ |
502 | static const char usr_bin [] = "/usr/bin"; | 502 | static const char usr_bin [] ALIGN1 = "/usr/bin"; |
503 | static const char usr_sbin[] = "/usr/sbin"; | 503 | static const char usr_sbin[] ALIGN1 = "/usr/sbin"; |
504 | static const char *const install_dir[] = { | 504 | static const char *const install_dir[] = { |
505 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ | 505 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ |
506 | &usr_bin [4], /* "/bin" */ | 506 | &usr_bin [4], /* "/bin" */ |