List Info

Thread: crunching ipf




crunching ipf
user name
2006-03-28 01:14:10
Has anyone managed to successfully crunch ipfilter and
tools? I'm  
getting undefined references to "use_inet6" and
opts in "libipf.a".  
I'd use an LKM, but that means getting ld, binutils,
gettext, and  
friends crunched which is just as ugly, and doesn't solve
the ipf  
tools problem.

FreeBSD fixed this by making libipf a standalone library but
that's a  
big patchset and doesn't really solve the underlying issue
I don't  
think. Hopefully I'm just missing something simple.

http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/
 
2005-04/1224.html


crunching ipf
user name
2006-03-30 21:03:04
On Mon, Mar 27, 2006 at 08:14:10PM -0500, Chris Tribo wrote:
> Has anyone managed to successfully crunch ipfilter and
tools? I'm  
> getting undefined references to "use_inet6"
and opts in "libipf.a".  

It should be possible to use the 'keepsymbols' directive,
probably:

special ipf keepsymbols opts use_inet6

	David

-- 
David Laight: davidl8s.co.uk
crunching ipf
user name
2006-04-03 20:10:50
On Mar 30, 2006, at 4:03 PM, David Laight wrote:

> On Mon, Mar 27, 2006 at 08:14:10PM -0500, Chris Tribo
wrote:
>> Has anyone managed to successfully crunch ipfilter
and tools? I'm
>> getting undefined references to
"use_inet6" and opts in "libipf.a".
>
> 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


Next up is syslogd. Do I need to make something like
libhack.o to  
define these syms and add it to libs? Nothing in /lib or
/usr/lib  
seems to define these. The only thread I found about this
suggested a  
newer version of tcpwrappers or to compile consumers without
libwrap.

/usr/lib/libwrap.a(options.o): In function
`process_options':
options.c:(.text+0x68a): undefined reference to
`deny_severity'
options.c:(.text+0x8a7): undefined reference to
`deny_severity'
options.c:(.text+0x8ac): undefined reference to
`allow_severity'
*** Error code 1

# nm /usr/lib/libwrap.a | grep severity
          U deny_severity
          U allow_severity
          U deny_severity
crunching ipf
user name
2006-04-03 20: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

-- 
David Laight: davidl8s.co.uk
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )