16 Jul 2012 10:56
[PATCH] include/libbb.h: declare messages with ALIGN1
Aurelien Jarno <aurelien <at> aurel32.net>
2012-07-16 08:56:41 GMT
2012-07-16 08:56:41 GMT
Some messages strings are defined with ALIGN1 in libbb/messages.c
to make sure strings are not aligned and thus to save some bytes. The
corresponding declaration in include/libbb.h should also use ALIGN1,
otherwise the compiler may assume they are aligned and generate wrong
code to access them. This is the case on at least s390x.
Signed-off-by: Aurelien Jarno <aurelien <at> aurel32.net>
---
include/libbb.h | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/include/libbb.h b/include/libbb.h
index 322a28c..f22e58e 100644
--- a/include/libbb.h
+++ b/include/libbb.h
<at> <at> -1612,8 +1612,8 <at> <at> unsigned get_cpu_count(void) FAST_FUNC;
char *percent_decode_in_place(char *str, int strict) FAST_FUNC;
-extern const char bb_uuenc_tbl_base64[];
-extern const char bb_uuenc_tbl_std[];
+extern const char bb_uuenc_tbl_base64[] ALIGN1;
+extern const char bb_uuenc_tbl_std[] ALIGN1;
void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC;
enum {
BASE64_FLAG_UU_STOP = 0x100,
<at> <at> -1694,24 +1694,24 <at> <at> extern const char *applet_name;
* Therefore now we use #defines.
*/
/* "BusyBox vN.N.N (timestamp or extra_version)" */
(Continue reading)
RSS Feed