From patchwork Tue Aug 3 18:04:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Engelhardt X-Patchwork-Id: 60783 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6F3F6B70AE for ; Wed, 4 Aug 2010 04:04:54 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756886Ab0HCSEj (ORCPT ); Tue, 3 Aug 2010 14:04:39 -0400 Received: from borg.medozas.de ([188.40.89.202]:41486 "EHLO borg.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755914Ab0HCSEi (ORCPT ); Tue, 3 Aug 2010 14:04:38 -0400 Received: by borg.medozas.de (Postfix, from userid 25121) id 249EDF0C32BE9; Tue, 3 Aug 2010 20:04:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by borg.medozas.de (Postfix) with ESMTP id 1B09E6482; Tue, 3 Aug 2010 20:04:37 +0200 (CEST) Date: Tue, 3 Aug 2010 20:04:37 +0200 (CEST) From: Jan Engelhardt To: "Gabor Z. Papp" cc: Patrick McHardy , Netfilter Development Mailinglist , Linux Netdev List , "'netfilter@vger.kernel.org'" , netfilter-announce@lists.netfilter.org Subject: Re: [ANNOUNCE]: Release of iptables-1.4.9 In-Reply-To: Message-ID: References: <4C5832F9.50004@trash.net> <4C584C63.8010607@trash.net> User-Agent: Alpine 2.01 (LSU 1266 2009-07-14) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tuesday 2010-08-03 19:25, Gabor Z. Papp wrote: >* "Gabor Z. Papp" : > >| Note the difference, new undefined reference: `libxt_IDLETIMER_init > >--disable-shared --enable-static configure options cause the problems. > >--enable-shared --disable-static compiles fine, but I would like to >link against the static libs. (BTW, with --disable-shared you remove the possibility to use any .so files whatsoever. You can use --enable-static --enable-shared to get both "all in one binary" and ".so support".) The following changes since commit 371cea299f0b2eb100b9fc9fb99089640d2d606f: xtables: remove unnecessary cast (2010-08-03 19:56:11 +0200) are available in the git repository at: git://dev.medozas.de/iptables master Jan Engelhardt (1): build: fix static linking extensions/libxt_IDLETIMER.c | 2 +- extensions/libxt_TEE.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) [Actually there's also the "remove unnecessary cast" patch that is not included in this listing, but merging that should be ok.] parent 371cea299f0b2eb100b9fc9fb99089640d2d606f (v1.4.9-18-g371cea2) commit 0428e5a6541c3f5eaaf683d8da9ea60c44eac4c7 Author: Jan Engelhardt Date: Tue Aug 3 19:58:38 2010 +0200 build: fix static linking Gabor Z. Papp noted this link-time error when configuring with --enable-static: extensions/libext4.a(initext4.o): In function "init_extensions": extensions/initext4.c:144: undefined reference to "libxt_IDLETIMER_init" extensions/initext4.c:145: undefined reference to "libxt_TEE_init" Indeed, since the two modules did not use our special macro "_init" (which expands to libxt_foo_init), initext4.c could not find them by that name. Correct this. References: http://marc.info/?l=netfilter&m=128085480927924&w=2 Signed-off-by: Jan Engelhardt --- extensions/libxt_IDLETIMER.c | 2 +- extensions/libxt_TEE.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/libxt_IDLETIMER.c b/extensions/libxt_IDLETIMER.c index 12573a4..1562e02 100644 --- a/extensions/libxt_IDLETIMER.c +++ b/extensions/libxt_IDLETIMER.c @@ -132,7 +132,7 @@ static struct xtables_target idletimer_tg_reg = { .extra_opts = idletimer_tg_opts, }; -static __attribute__((constructor)) void idletimer_tg_ldr(void) +void _init(void) { xtables_register_target(&idletimer_tg_reg); } diff --git a/extensions/libxt_TEE.c b/extensions/libxt_TEE.c index f8e7fd1..e4c0607 100644 --- a/extensions/libxt_TEE.c +++ b/extensions/libxt_TEE.c @@ -195,7 +195,7 @@ static struct xtables_target tee_tg6_reg = { .extra_opts = tee_tg_opts, }; -static __attribute__((constructor)) void tee_tg_ldr(void) +void _init(void) { xtables_register_target(&tee_tg_reg); xtables_register_target(&tee_tg6_reg);