Re: Building standalone xtable extension shared library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I send an incomplete email by mistake:

The correct Makefile, working on my setup is:
LAGS = -O2 -Wall
 lib%.so: lib%.o
     gcc -shared -o $@ $^;
 lib%.o: lib%.c
     gcc ${CFLAGS} -DPIC -fPIC -D_INIT=lib$*_init -c -o $@ $<;

I guess this might seem obvious to many of you but the problem I had
initially was a segfault when parsing command line arguments.

Regards,

Julien Lafaye

On 9/10/11, Julien Lafaye <jlafaye@xxxxxxxxx> wrote:
> Hello,
>
> I would like to report that I followed the instruction of the
> (excellent) guide on how to write netfilter modules (rev Feb. 7 2011).
>
> I had difficulties  compiling an xtable extension shared library. It
> turns out that using the gcc provided with my distribution, gcc
> (Debian 4.6.0-9) 4.6.1 20110524 (prerelease) the options -DPIC -fPIC
> are required when building the object file.
>
> The instructions page 27 should be updated with the following Makefile
> lines:
>
> CFLAGS = -O2 -Wall
> lib%.so: lib%.o
> gcc -shared -o $@ $^;
> lib%.o: lib%.c
> gcc ${CFLAGS} -D_INIT=lib$*_init -c -o $@ $<;
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux