On Sunday 24 October 2010 03:14, Rob Landley wrote:
> I've decided that every time I rant about something on the list, I need to
> provide a patch to make up for it, so here's an #ifdefectomy for awk.c.
Applied, thanks!
> In gcc 4.3.3, this bloats the code by one byte, and does so in the function
> "fsrealloc" which I didn't even _touch_. I boggled at this a bit, and did
> this little bit of black magic to take a closer look:
>
> diff -u <(scripts/showasm busybox_old fsrealloc | cut -b 11-) \
> <(scripts/showasm busybox_unstripped fsrealloc | cut -b 11-) | less
>
> For some reason, the optimizer is spilling r13 into a global instead of being
> able to cache it in edx. I have NO idea why, looks like a bug in gcc to be
> honest, and I suspect different gcc versions will behave differently here.
>
> Possibly the above bit of black magic should become a
> "scripts/bloatcheckdiff"
> or similar, with fsrealloc becoming $1 and probably the "cut -b 11-" replaced
> with something less hackish...
It is already there:
scripts/mkdiff_obj
==================
#!/bin/sh
filter() {
# sed removes " address: " prefixes which mess up diff
sed $'s/^\\(\t*\\)[ ]*[0-9a-f][0-9a-f]*:[ \t]*/\\1/' \
| sed 's/__GI_//g'
}
test -d "$1" || exit 1
test -d "$2" || exit 1
{
(
cd "$1" || exit 1
find -name '*.o' -o -name '*.os' # -o -name '*.so'
)
(
cd "$2" || exit 1
find -name '*.o' -o -name '*.os' # -o -name '*.so'
)
} | sed 's:^\./::' | sort | uniq | \
(
IFS=''
while read -r oname; do
if ! test -f "$1/$oname"; then
echo "Only $2/$oname"
continue
fi
if ! test -f "$2/$oname"; then
echo "Only $1/$oname"
continue
fi
diff -q -- "$1/$oname" "$2/$oname" >/dev/null && continue
(cd "$1"; objdump -dr "$oname" | filter >"$oname.disasm")
(cd "$2"; objdump -dr "$oname" | filter >"$oname.disasm")
diff -u "$1/$oname.disasm" "$2/$oname.disasm"
done
)
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox