SEGV in uselib under 1.3.61

Christopher J. Tengi (tengi@cs.princeton.edu)
Tue, 20 Feb 1996 12:20:50 -0500


I have just started looking into the development kernels because I have a need
to make a Linux box a client and server for AppleShare and at least a client
for NetWare. I have run into a problem running some a.out shared library
binaries. I have had problems with netscape-v20, raplayer, and the dip
program that was shipped in the latest Slackware CD. I fixed my dip problem
by compiling an ELF version.

However, for the others, I am getting a SEGV (and an Oops) when the program
starts up and make a 'uselib' call to load /lib/ld.so. When I run under
1.2.13, all is well. However, when I try to run on either 1.3.59 or 1.3.61,
the output of strace doesn't even finish printing the complete line for the
uselib call before I get a SEGV.

So, I went into fs/exec.c and added a few printk's to sys_uselib, to see what
was going on. As best as I can tell, the 'library' argument is pointing to
garbage, rather than the expected string of "/lib/ld.so." Unfortunately, the
open actually returns an fd (3, I believe), so things fail a bit further into
the code of uselib.

At this point, I haven't a clue as to how system calls are processed, so I
don't know where to look to see if the library name is getting correctly
passed to anything. I believe that I have all of the appropriate links in
place to get the right include files when I build the kernel, and I get no
errors from the build.

Is this something that has been seen and fixed already, or am I breaking new
code. :-) Any and all help.pointers would be appreciated. If somebody can
tell me which bit of documentation to read concerning system call processing,
I would be happy to muddle through this one myself for awhile.

/Chris