Subject: /rescue/ksh does not work
To: None <current-users@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: current-users
Date: 02/25/2004 02:21:55
Hello,

On a recent -current, /rescue/ksh can't execute any commands. /bin/ksh
works fine.

# /rescue/ksh
# pwd
[1]   Segmentation fault (core dumped) /rescue/ksh
#

Revision 1.54 of src/usr.bin/crunch/crunchgen/crunchgen.c seems to work
fine for the rescue. `-dc' option for ld(1) has been removed in revision
1.55. With revision 1.55, following warnings appeared when built the
rescue.

/usr/tools/lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `history' changed from 4 in ksh.cro to 688 in /usr/lib/
libedit.a(history.o)
/usr/tools/lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld:
 Warning: type of symbol `history' changed from 1 to 2 in /usr/lib/libedit.a(his
tory.o)

If I add `-dc' to src/rescue/rescue.mk and rebuild the rescue, /resuce/ksh
works fine.

# cd /usr/src/rescue
# make rescue.mk
# sed 's/${LD} -r/${LD} -r -dc/g' rescue.mk > tmp.mk; mv tmp.mk rescue.mk
# make && make install
# /rescue/ksh
# pwd
/usr/src/rescue
#

Is `-dc' option necessary for ld(1) when building a crunched binary?

best regards.

-- 
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp