AW: AW: AW: AW: segfaults with ver 1.10.0 on sh3 based board

Denys Vlasenko vda.linux at googlemail.com
Wed Apr 2 06:18:30 PDT 2008


On Wednesday 02 April 2008 14:31, EXTERNAL Tetz Torsten (Praktikant; ST-FIR/ENG1) wrote:
> Hello,
> 
> it is this change that makes a segfaulting version out of 1.2.1.
> 
> --- busybox-1.2.1/Rules.mak	Sat Jul 29 00:55:51 2006
> +++ busybox-1.2.2/Rules.mak	Tue Oct 24 22:22:03 2006
> (...)
> @@ -265,7 +265,7 @@
> (...)
> -    CHECKED_LDFLAGS += $(call check_ld,--gc-sections,)
> +    CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,)
> (...)
> 
> 
> I made a test by removing "$(LD)," from the 1.2.2. version
> and it worked (produced no segfault).

Ok. Now we need to figure out how to fix that in 1.10.0.
1.10.0 build system is very different, so you
will have to find how the change above affect link command line
(how "good" and "bad" ones differ).

Please make two 1.2.2 trees which have only the aboce difference
and build both with "make V=1". The output will end with something
like:

...
<many more gcc calls>
...
gcc -I/.local/tmp/busybox-1.2.2.1/include -I/.local/tmp/busybox-1.2.2.1/include -I/.local/tmp/busybox-1.2.2.1/libbb -D_GNU_SOURCE -Wall -Wstrict-prototypes -Wshadow -funsigned-char -fno-builtin-strlen -DNDEBUG -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fno-branch-count-reg -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -Wstrict-prototypes -Wshadow -funsigned-char -fno-builtin-strlen -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections -o busybox_unstripped -Wl,--start-group /.local/tmp/busybox-1.2.2.1/applets/applets.c /.local/tmp/busybox-1.2.2.1/applets/busybox.c /.local/tmp/busybox-1.2.2.1/applets/version.c /.local/tmp/busybox-1.2.2.1/applets/applets.a /.local/tmp/busybox-1.2.2.1/archival/libunarchive/libunarchive.a /.local/tmp/busybox-1.2.2.1/coreutils/coreutils.a /.local/tmp/busybox-1.2.2.1/libpwdgrp/libpwdgrp.a /.local/tmp/busybox-1.2.2.1/libbb/libbb.a -Wl,--end-group
cp busybox_unstripped busybox
strip -s --remove-section=.note --remove-section=.comment busybox
/bin/sh /.local/tmp/busybox-1.2.2.1/applets/busybox.mkll include/bb_config.h /.local/tmp/busybox-1.2.2.1/include/applets.h >busybox.links
mkdir -p docs
( cat /.local/tmp/busybox-1.2.2.1/docs/busybox_header.pod ; \
    /.local/tmp/busybox-1.2.2.1/docs/autodocifier.pl /.local/tmp/busybox-1.2.2.1/include/usage.h ; \
    cat /.local/tmp/busybox-1.2.2.1/docs/busybox_footer.pod ; ) > docs/busybox.pod
mkdir -p docs
pod2text docs/busybox.pod > docs/BusyBox.txt
mkdir -p docs
pod2man --center=BusyBox --release="version 1.2.2" \
        docs/busybox.pod > docs/BusyBox.1
mkdir -p docs/busybox.net
pod2html --noindex docs/busybox.pod > \
    docs/busybox.net/BusyBox.html
rm -f pod2htm*
mkdir -p docs
rm -f docs/BusyBox.html
cp docs/busybox.net/BusyBox.html docs/BusyBox.html


that last gcc command calls the linker,
and I bet it will be slightly different.
What exactly will be the difference?
--
vda


More information about the busybox mailing list