From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id DAD043230 for ; Mon, 13 Jun 2016 11:29:24 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id v199so69418981wmv.0 for ; Mon, 13 Jun 2016 02:29:24 -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=k1D8sXQ9CJhlvJ9eLEHVlqULzwaEgKRaN6ME37Hmf4E=; b=SK4OALgY7t7LLd+y2bYxon111i91q46VV+Kws0HkbI0BdzToszpod0dPPGSHCQboET grXofo76ZHQa4tOt/aRIr5q5SgnG8CVBEIr4nUMiD6YJJ+v8/4Uxi+gilVHkcFk+vymr vjkvZ7QcjZDSw2UlyoC/XEbB4Rdd8cE02N60D+ZbgU5VspK9cqEzkTgG75aS0Iuq6bj8 B429qLQ0E2XSJFcDPNgAKBwfBOTyKHQrE4vCBWYgX0OxoujMH5VE/3Gey+oCUZxX3Tvo UvQgShpTPA/Grim5pyG45X4ZCPT0yx+efS1KIcRlpfoW1EUICsZjxDMu5MrvJTLKBNeQ o9Bg== 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=k1D8sXQ9CJhlvJ9eLEHVlqULzwaEgKRaN6ME37Hmf4E=; b=cKPp9QHRMp9E6PmU7iaIfA0t/o4G+E8O9qlVUNf6rolnnIdVDqEfTG5taljs7U8At/ PAglp7ANQRMwKOB/BbQRl/20EI+NszT2s2ym2HaCjgb3ninqSeRbocvSmTlGL7tbsMao +P4HC0xOjr55jKaTNHhbV9iG7hC9wqbBnrldarIw7nul9/YuSqY/vcFVUCtlAMADpXMZ DNRVFYwWQ5Q7ZZQkztFK1yUPk/BmacSHI7q/RQ2qkT5xRxoQsLbuLT/kiJP+1YHfMtne 52gr1HkhU07ZyJysKbSg8lJ+/CLFrOyl9W8WgPhSDsStkh5mBzqKmY+//NDMUNdBy49j DReg== X-Gm-Message-State: ALyK8tJn11FIIt9NAXa6qIJA8Vbqn0iofihbGDnFHK5YDVMUCkSaCUZJPfr73+BhtSMjowKl X-Received: by 10.28.135.137 with SMTP id j131mr86007wmd.47.1465810164640; Mon, 13 Jun 2016 02:29:24 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id w81sm5408455wmg.20.2016.06.13.02.29.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jun 2016 02:29:23 -0700 (PDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, Panu Matilainen , Christian Ehrhardt Date: Mon, 13 Jun 2016 11:29:23 +0200 Message-ID: <3213594.AWeSi4j5H8@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1465583550-21020-4-git-send-email-ferruh.yigit@intel.com> References: <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> <1465583550-21020-1-git-send-email-ferruh.yigit@intel.com> <1465583550-21020-4-git-send-email-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 3/6] mk: sort libraries when linking, move pmd libs to higher level 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: Mon, 13 Jun 2016 09:29:25 -0000 2016-06-10 19:32, Ferruh Yigit: > As stated in the comment: > Order is important: from higher level to lower level > > This is an attempt to make the layering order better respected. > > Limit scope of --whole-archive to pmd libraries Compared to the link order in the v2, you did two things: 1/ move PMDs to the first position 2/ restrict --whole-archive to PMDs only Having the PMDs first, helps the linker to get all the PMD dependencies in the static binary. Thus it seems we do not need --whole-archive for the PMD dependencies (ethdev, mbuf, etc). But, if an external PMD is loaded via dlopen, it is possible that it needs a symbol which was not used by the internal PMDs. So it will not be found in the statically linked binary. Let's take another example: if we disable the internal PMDs with their config options from the static build, and we decide to build them separately as DSOs. We won't be able to load them as plugins because they depend on symbols which won't be found in the static binary. To make it short, the PMDs must be considered as plugins. Therefore, we must not rely on their availability to link the required symbols in a static binary. To make sure the plugin loading will be always well achieved, we must link the static PMDs at the last position. If you agree, I vote for the v2 of this patchset.