From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 7872E2BA6 for ; Fri, 10 Jun 2016 12:18:31 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id v199so142352905wmv.0 for ; Fri, 10 Jun 2016 03:18:31 -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=VCgKrHuA9VubbyOkyYDb7DmXqTrwhL6tNTiQ18Z5M/g=; b=YzuE0gDuuvVdc7KJ/y0scyukRSJyTo2myY7znf/+Nne1FRYGisPI7PiIJsmcf5rppn PGS6lkFjHixNFIZ+zPKN2qVpdS7a+arEhzXbTovuW7rvoTYCMInKmyDyjs7FY5nUcAgP gliWRsBMe6jaGKlWCRXEJ2lRN9tT8/44jRt2w0/B9xiRv7JDGaeYKYtDuZwUnY92xX5t AqN5LRuQcn89dIgCcK4QyTiYlHAjsctmPsdzW7ST1gqBydoQWOB6Z1lITLelc4arfqzl QtY1R4MRWh4HiRc3DUIDzQZ97Da8PouUWFlt270tqdIB0tB8+2thlNRLW5g7VyFOEToj iMNw== 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=VCgKrHuA9VubbyOkyYDb7DmXqTrwhL6tNTiQ18Z5M/g=; b=nGVf+scvOWJfPmXwFiQ4L17PJ+uqvlfO+ttx/2MydBLu2AMPCLG9SQ4hbECl8bthVs lfPbjv46O0ZzRZuNHAQA97t+qyivkUgDVuSHgYQG1R3HQmkE/zBXbv0kI09v6sIdGkVf mi6EcuglRoOf9o7NnmKYXSuyeFi5ufSJPKg1AAbyXm8mGwzHhi34W0E+hDDlTcq9Yr+z ERdmc7n6lzaO4aOX4FUvu2s3pxo+dwvMBKe2gvcQfNsTcxIIaZ/aixTnX8gZb+p5yiMW wlsVqh/isDw+ifVrpnHFizzU0i6mBw1GtdBrh9BRMzTDiIgElwvOhAcjrbpRTF/e7Mhk J8Ew== X-Gm-Message-State: ALyK8tKNBAyAMamemuFGXDpjnLwvHB2E8ufoSRa4hD0qUfqNvX+L2IHF6JHia5UDpeZpNaFf X-Received: by 10.194.203.37 with SMTP id kn5mr1438750wjc.42.1465553911268; Fri, 10 Jun 2016 03:18:31 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id c191sm34985248wmh.5.2016.06.10.03.18.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 03:18:30 -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 12:18:29 +0200 Message-ID: <4031296.h8oICZ3R2f@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <575A8EF4.3080002@intel.com> References: <574872B3.6040702@intel.com> <4324849.ehO8V5db18@xps13> <575A8EF4.3080002@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 10:18:31 -0000 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'