help with linking please
Alfred Perlstein
alfred at freebsd.org
Tue Jan 13 20:15:47 PST 2004
* Tim Kientzle <kientzle at 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 at mu.org cell: 408-480-4684
More information about the freebsd-hackers
mailing list