Subject: Re: NetBSD/hpcsh snapshot with X11 sets uploaded to ftp.n.o
To: None <port-hpcsh@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-hpcsh
Date: 03/05/2004 22:21:34
On Fri, Mar 05, 2004 at 21:46:43 +0300, Valeriy E. Ushakov wrote:

> > % gdb /usr/bin/groff groff.core
> > Core was generated by `groff'.
> > Program terminated with signal 11, Segmentation fault.
> > (gdb) bt
> > #0  0x0041abfc in __sF ()
> > #1  0x20524b60 in __udivdi3 () from /usr/lib/libgcc_s.so.1
> > #2  0x205cd522 in __eqdf2 () from /usr/lib/libc.so.12
> > 
> > This occurs in both NetBSD/hpcsh on my Jornada680 and NetBSD/dreamcast.
> 
> Hmm...  Running in a chroot I see:
> 
> (gdb) where
> #0  0x0041abec in __udivsi3 ()
> #1  0x20524b60 in __udivdi3 () from /usr/lib/libgcc_s.so.1
> #2  0x205cd522 in __eqdf2 () from /usr/lib/libc.so.12
> 
> which is obviously a problem.  There should have been a ".hidden" copy
> of __udivsi3 in libgcc_s.so.
> 
> Also, there was recently a discussion on port-dreamcast about similar
> problems with apache6 (__udivdi3 was also involved).

Actually. 

Relocation section '.rela.dyn' at offset 0xc70 contains 13 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
[...]
0041abe8  000029a2 R_SH_COPY         0041abe8   __sys_siglist14 + 0
0041abe8  000012a2 R_SH_COPY         0041abe8   __udivsi3 + 0
0041abe8  000004a2 R_SH_COPY         0041abe8   __sdivsi3 + 0
0041abf0  000030a2 R_SH_COPY         0041abf0   __sF + 0
[...]


And dab(6) also dies in a similar way:

(gdb) where
#0  0x00414aa4 in optarg ()
#1  0x0040419e in RANDOM::operator()() ()
[...]
(gdb) x/i $pc
0x414aa4 <optarg>:      .word 0x0000
(gdb)

Relocation section '.rela.dyn' at offset 0xc24 contains 17 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
[...]
00414aa4  00000da2 R_SH_COPY         00414aa4   __udivsi3 + 0
00414aa4  00000fa2 R_SH_COPY         00414aa4   optarg + 0

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen