Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 May 2000 08:12:59 -0500 (CDT)
From:      Conrad Sabatier <conrads@home.com>
To:        questions@freebsd.org
Subject:   "No reference to __DYNAMIC" when linking aout binaries
Message-ID:  <XFMail.000503081259.conrads@home.com>

next in thread | raw e-mail | index | archive | help
Recently, while in the process of doing a port of XSwallow, I ran into
some problems linking the final shared library (xswallow.so) in aout
format.

The strategy used in the dist Makefile for FreeBSD is to compile the two
files that make up the final binary separately, producing two *.o files,
which are then linked together in the final step.  When I tried doing
this, I kept getting a "No reference to __DYNAMIC" error from the linker.
Even adding includes for link.h, etc. to the source did no good.  I
finally gave up and just did a straight one-step compile, which worked
fine.  But I'm still wondering what was causing this error, and how to fix
it.

I was compiling the two intermediate obj's with "-aout -shared -nostdlib",
and then linking with "-aout -shared -nostdlib -L/usr/lib/compat/aout
-lgcc".  Actually, I tried tons of variations on these, including adding
"-nostartfiles", all to no avail.

What was I missing here?

-- 
Conrad Sabatier
http://members.home.net/conrads/
ICQ# 1147270



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000503081259.conrads>