Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 1999 17:55:13 +0100
From:      Damian Hamill <damian@cablenet.net>
To:        John Polstra <jdp@polstra.com>
Cc:        Doug Rabson <dfr@nlsystems.com>, hackers@FreeBSD.ORG
Subject:   Re: dlopen failure
Message-ID:  <37458FF0.FC9B24C8@cablenet.net>
References:  <XFMail.990521081849.jdp@polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I have found the problem and it is a problem with make.  By chance I did
an ls -l of the directory and noticed the shared object was only 371
bytes and thought nooooooooo that can't be right.

My makefile sez.

mysqlacc.so : mysqlacc.o
	ld -Bshareable -o $@ $< -u _floor ../../lib/libV.a ... {other libs}

The '$<' above which should be the implied source i.e. mysqlacc.o wasn't
in the ld line where it should have been, hence the error.  Replacing
'$<' with the implied source name of the object file works fine.

Thanks for your help anyway.

John Polstra wrote:
> 
> Doug Rabson wrote:
> > On Thu, 20 May 1999, John Polstra wrote:
> >
> >> In article <373C3F3F.A99DBD28@cablenet.net>,
> >> Damian Hamill  <damian@cablenet.net> wrote:
> >> > I have a program that is dumping core.
> >> >
> >> > -----------------------------------------------
> >> > Here's the gdb output;
> >> >
> >> > Program terminated with signal 6, Abort trap.
> >> > #0  0x800b728 in _kill ()
> >> > (gdb) bt
> >> > #0  0x800b728 in _kill ()
> >> > #1  0x800b34c in abort ()
> >> > #2  0x8004aa2 in __assert ()
> >> > #3  0x8003b4b in map_object ()
> >> > #4  0x8002e9e in find_symdef ()
> >> > #5  0x800334d in dlopen ()
> >> > #6  0x8049a68 in Get_SQL_Driver (name=0x804c7e4 "mysql") at Vdb.c:150
> >> > #7  0x8049ff9 in GetDefaultDriver () at Vdb.c:254
> >> > #8  0x804a141 in VdbInit (user=0x804bfb1 "nobody", passwd=0x0) at
> >> > Vdb.c:329
> >> > #9  0x8049316 in main ()
> >> > #10 0x8048be5 in _start ()
> >>
> >> I don't know what's going on here, but this stack trace can't be
> >> right.  dlopen doesn't call find_symdef, and find_symdef doesn't
> >> call map_object.
> >
> > Isn't map_object() part of the a.out rtld?
> 
> Both rtlds have functions named find_symdef() and map_object().  He
> indicated that it was an ELF system, so I assumed he was using the
> ELF rtld.  In any case, my statement about the stack trace would be
> equally true for the a.out dynamic linker. :-)

> 
> John
> ---
>   John Polstra                                               jdp@polstra.com
>   John D. Polstra & Co., Inc.                        Seattle, Washington USA
>   "Self-interest is the aphrodisiac of belief."           -- James V. DeLong
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message

-- 
*    Damian Hamill   M.D.       damian@cablenet.net
* CableNet & The Landscape Channel
* http://www.cablenet.net/   http://www.landscapetv.com/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37458FF0.FC9B24C8>