[PATCH] include/libbb.h: declare messages with ALIGN1
Aurelien Jarno
aurelien at aurel32.net
Tue Jul 31 17:32:20 UTC 2012
On Tue, Jul 24, 2012 at 04:30:27PM +0200, Denys Vlasenko wrote:
> On Mon, Jul 16, 2012 at 10:56 AM, Aurelien Jarno <aurelien at aurel32.net> wrote:
> > 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.
>
> Applied, thanks!
>
> What is the bloatcheck result for this change on s390?
>
> IOW: does ALIGN1 make code bigger on s390?
>
Yes it does, here are the corresponding bloatcheck results on s390x:
function old new delta
.rodata 102702 103334 +632
xrealloc 56 68 +12
xmalloc 56 68 +12
write_wtmp 152 164 +12
validate_tm_time 56 68 +12
check_and_close 188 200 +12
xstrdup 56 62 +6
xsetenv 46 52 +6
xputenv 42 48 +6
xfdopen_helper 78 84 +6
xasprintf 116 122 +6
vfork_compressor 332 338 +6
tryexec 310 316 +6
optschanged 168 174 +6
open_socket 60 66 +6
malloc_or_warn 66 72 +6
invarg 34 40 +6
fflush_stdout_and_exit 90 96 +6
die_if_ferror_stdout 24 30 +6
BB_EXECVP 66 72 +6
uuencode_main 432 436 +4
parse_and_put_prompt 1060 1036 -24
mount_it_now 428 384 -44
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 21/2 up/down: 780/-68) Total: 712 bytes
text data bss dec hex filename
762072 3783 9624 775479 bd537 busybox_old
762900 3783 9624 776307 bd873 busybox_unstripped
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien at aurel32.net http://www.aurel32.net
More information about the busybox
mailing list