Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 95 14:59 EST
From:      sawmill!rjk@uunet.uu.net (Richard Kuhns)
To:        freebsd-hackers@freebsd.org
Subject:   BSDI 2 (or is it BSD/OS?) binaries
Message-ID:  <m0sVlTL-000BCpC@sawmill.uucp>

next in thread | raw e-mail | index | archive | help
Here's a little more info on the problem with running BSDI v2 binaries.

The relevant assembly code:

(gdb) disass start
Dump of assembler code for function start:
0x102c <start>:	pushl  %ebp
0x102d <start+1>:	movl   %esp,%ebp
0x102f <start+3>:	pushl  %esi
0x1030 <start+4>:	pushl  %ebx
0x1031 <start+5>:	cmpl   $0x0,0x393d0
0x1038 <start+12>:	jne    0x1044 <start+24>
0x103a <start+14>:	movl   $0xefbfdff0,0x393d0
0x1044 <start+24>:	movl   0x393d0,%esi
0x104a <start+30>:	movl   0x8(%esi),%edx
0x104d <start+33>:	movl   %edx,0x3a42c
0x1053 <start+39>:	movl   (%esi),%eax
0x1055 <start+41>:	movl   (%eax),%ebx
0x1057 <start+43>:	testl  %ebx,%ebx
0x1059 <start+45>:	je     0x1076 <start+74>
0x105b <start+47>:	pushl  $0x2f
0x105d <start+49>:	pushl  %ebx
0x105e <start+50>:	call   0x12f1c <strrchr>
0x1063 <start+55>:	addl   $0x8,%esp
0x1066 <start+58>:	testl  %eax,%eax
0x1068 <start+60>:	je     0x106d <start+65>
0x106a <start+62>:	incl   %eax
0x106b <start+63>:	jmp    0x106f <start+67>
0x106d <start+65>:	movl   %ebx,%eax
0x106f <start+67>:	movl   %eax,0x39494
0x1074 <start+72>:	jmp    0x1080 <start+84>
0x1076 <start+74>:	movl   $0x1028,0x39494
0x1080 <start+84>:	movl   $0x0,0x3a43c
0x108a <start+94>:	pushl  0x8(%esi)
0x108d <start+97>:	pushl  (%esi)
0x108f <start+99>:	pushl  0x4(%esi)
0x1092 <start+102>:	call   0x1494 <main>
0x1097 <start+107>:	pushl  %eax
0x1098 <start+108>:	call   0x2bcb0 <exit>
0x109d <start+113>:	leal   0xfffffff8(%ebp),%esp
0x10a0 <start+116>:	popl   %ebx
0x10a1 <start+117>:	popl   %esi
0x10a2 <start+118>:	leave  
0x10a3 <start+119>:	ret    
...

The program terminates with a segmentation fault at 0x1055 in start ().
Asking gdb for a backtrace gives

(gdb) bt
#0  0x1055 in start ()
Cannot access memory at address 0xefbfd9e0
(gdb)

According to nm, the symbols around a couple of interesting addresses are:

...
000393d0 B ___ps_strings
000393d4 B _DHOME
000393d8 B ___cleanup
000393dc B __derrf
000393e0 B __derr
000393e4 B __derri
000393e8 B __derrs
...
and
...
0003a42c B _environ
0003a430 B _oldmod
0003a438 B _group
0003a43c B _errno
0003a440 B _fls_file
...

Anyone have any brainstorms?  I'm still playing with this under FreeBSD 2.0
(my CDs haven't arrived yet), and I'm looking for someone with a BSDI 2
system that would be willing to give me a little info, too.
--
Rich Kuhns			rjk@grauel.com
PO Box 6249
100 Sawmill Road
Lafayette, IN  47903
(317)477-6000 x319



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0sVlTL-000BCpC>