Subject: Re: crunching ipf
To: Chris Tribo <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 04/03/2006 21:36:17
On Mon, Apr 03, 2006 at 04:10:50PM -0400, Chris Tribo wrote:
> >It should be possible to use the 'keepsymbols' directive, probably:
> >special ipf keepsymbols opts use_inet6
> Doesn't seem to work with multiple programs :(
> ipnat.cro:(.data+0x0): multiple definition of `use_inet6'
> ipf.cro:(.data+0x8): first defined here
> *** Error code 1
Change all the 'int use_inet6 = 0;' and 'int opts = 0;'
to 'int use_inet6;' and 'int opts;' so that they become part of the
crunched programs BSS.
You need to have one copy of the library code - so all the programs
must share the same global data items that it referes to.
A similar problem occurs when shared libraries try to access program
global data - especially when the library code has been dlopen()ed by
a dlopen()ed library. It is difficult for the two libraries to suceed
in referencing the same piece of data.
David Laight: email@example.com