From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id DAC6C2BA2 for ; Fri, 10 Jun 2016 14:21:02 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id n184so264463319wmn.1 for ; Fri, 10 Jun 2016 05:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Px2V+Sx933mnYzWB5swKT5tDLMw8jW5p0Nun8if4Fes=; b=lyWgfm1WfHeaRaNKRUWG7B9bnXn2zadGGEdYLxDBBvrnb/eykv/DyilTMm6A5hBflP RIryXcv38hhGB+JVWsDbBkBHt9sLyOHck9pLJXIWl+bevUN557z7eM+OCwE+THhuC/Ov 85ptAdXmlH4rs/GIXL67mztkp0Bb3mVa6PnDfdfDWI91RK5UYJB78caXIk5rL5nYd3EY RyRVhaeHkHsFW/BcVk3kdqZ3C/6nRYvgmpEwicT0UAVW/EoWPWxlNE/NB96AMJXEMSVm MvfoP555mNfMrK+ZjgSiqMB24lXdkDOoiVMEJQHHaQpQK8GJ7R6eqz40MFK6jVJoeN2J FnLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Px2V+Sx933mnYzWB5swKT5tDLMw8jW5p0Nun8if4Fes=; b=bbTOCxDOPEwm34L+IhEOj4FnvKJYHTtFLcgEvpVnLdV7bct3JKrFFHXI6EkKIGu6eP VwxHPljeh0MiUhZHIqkldmS8y1M3PCIJgvbl6HKQZVyLKGhdz6uoJrHbqS/OjWIKFMlt Tr1KBO1EbNSNlShIxpo3GBUj8eHYlb7ttc/oZSVdPlYriGyAU7QfByQvStq4nIZuwfig Qq6R/NSRL0KZdRUQblcg41jW2f1jcdUz5FtS/vPnCQ3cW6sH60YBCZxwSmb7n4wOCoy0 p1zCdVVUXq8UgYYwR2LcoFVpTqbIOW3mWy4XJSk6u4mpSP2c5cISZNmtMMhrXYLaZUm9 F1hQ== X-Gm-Message-State: ALyK8tIt7Nxo6drQdixrlqagEB4UyPmx5P5+gPBUhzz/2gCfzaCaSoODRrz8Xdw2K1gN/gil X-Received: by 10.194.2.225 with SMTP id 1mr1932362wjx.72.1465561262599; Fri, 10 Jun 2016 05:21:02 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id f186sm12707828wma.13.2016.06.10.05.21.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 05:21:01 -0700 (PDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, Panu Matilainen , Christian Ehrhardt , olivier.matz@6wind.com Date: Fri, 10 Jun 2016 14:21:01 +0200 Message-ID: <4754667.tJUpOoJvL0@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <575A9F3B.50802@intel.com> References: <574872B3.6040702@intel.com> <4031296.h8oICZ3R2f@xps13> <575A9F3B.50802@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 2/2] mk: reduce scope of whole-archive to pmd libraries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 12:21:03 -0000 2016-06-10 12:06, Ferruh Yigit: > On 6/10/2016 11:18 AM, Thomas Monjalon wrote: > > 2016-06-10 10:57, Ferruh Yigit: > >> On 6/10/2016 10:03 AM, Thomas Monjalon wrote: > >>> 2016-05-27 17:48, Ferruh Yigit: > >>>> --whole-archive argument only required for pmd libraries, and currently > >>>> it covers more libraries. Reducing scope of the argument to pmd > >>>> libraries slightly reduce final application size. > >>> > >>> In my understanding, --whole-archive is required for static libraries used > >>> by plugins: > >>> http://dpdk.org/commit/20afd76a > >> Right, required for static libraries. But more than used by plugins, > >> required for plugin to work. > >> > >>> If we want to restrict it, I would say it must be around EAL, ring, > >>> mbuf, mempool, ethdev, cryptodev, etc. > >>> > >> > >> We should restrict to plugins. What happens is, since there is no direct > >> call to PMDs from application, PMD code is not included into final > >> application. To force PMDs to be included into final binary, > >> --whole-archive is required. > >> > >> But --whole-archive is not required for other libraries, and just cause > >> unnecessary increase in binary size. > > > > Yes it is necessary for other libraries, otherwise some symbols needed by > > plugins won't be available. > > Example: > > In function `rte_pmd_af_packet_devuninit': > > rte_eth_af_packet.c:(.text+0x8bf): undefined reference to `rte_eth_dev_allocated' > > rte_eth_af_packet.c:(.text+0x930): undefined reference to `rte_eth_dev_release_port' > > > If there is a direct call to that API, linker should include required > object file into final binary, --whole-archive shouldn't be required for > this. > > What is special for PMD's is there are not directly called, but > initialized using constructors. > > How are you getting above compilation error? The error was generated with your patch on top of others I'm going to send. I suggest to continue the discussion/review based on the v2 coming soon.