Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2004 20:15:44 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Tim Kientzle <kientzle@acm.org>
Cc:        hackers@freebsd.org
Subject:   Re: help with linking please
Message-ID:  <20040114041544.GK9623@elvis.mu.org>
In-Reply-To: <400481D8.2030708@acm.org>
References:  <20040110050033.GP9623@elvis.mu.org> <xzp3caojbo5.fsf@dwp.des.no> <20040110222441.GS9623@elvis.mu.org> <400481D8.2030708@acm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Tim Kientzle <kientzle@acm.org> [040113 15:41] wrote:
> Alfred Perlstein wrote:
> >It will refuse to strip symbols if:
> >
> >foo.o:func1() references bar.o:func2().
> >
> >But I need it to.
> 
> I suppose there are good reasons why you
> cannot compile everything into a single
> .o file for distribution?
> 
> > cat master.c
> #include <foo.c>
> #include <bar.c>
> > gcc -o master.o master.c
> 
> Now you have a single .o file with everything
> in it and there are therefore no cross-module
> references within your library.

It would be more trouble than it's worth.  I use libssl and libcrypto,
it would be a nightmare to #include all those .c files as well as
compile it... without incemental compilation it would hurt.

What I wound up doing was loading the creating a static object to
load my module... er yeah.. :)


-- 
- Alfred Perlstein
- Research Engineering Development Inc.
- email: bright@mu.org cell: 408-480-4684



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