From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id B573A6A9F for ; Fri, 28 Feb 2014 18:24:41 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id bs8so1027138wib.6 for ; Fri, 28 Feb 2014 09:26:08 -0800 (PST) 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:in-reply-to :references; bh=EFit66Q3mzaYvMROFesX+DI3qUDZB4fUcXpKTbwMcyg=; b=cxpKdz5d1R6Cw9IFZSvXPmTaD/mChQq2UCYDWnU6I7yV8eVIGRK5i4Cp1sCT8OHvAn mZdoBAjIXfePv8jHskCBXtN8UlWqo1y3CeR7xM+ME1ch+MeHYuXs9/Cqti5teAGamF55 OqP6RM+UNGGRygD8a3M0PDGZW2fbG0S2p6uLGFuK7mIsQ1CkA3Kz33M8lZ+BJavcmpxX 3V7IBYHqynuj4meLJxmR8ySKvXUrCABMvBGwWV+GJ7JIUfNwyJdD7xTFcuif3kXGoYhD gRvCIXC7r5a9dU9Stx44t31Xbh1bI2EwBdHUwQc29NDSpoEsWzRYm813ub2DB9sW1695 JgLw== X-Gm-Message-State: ALoCoQk/9x89dWJWHfBFvlr5Axe5Rj9c/s3j1hPAedn0WuL5qmi3PRNi1VPHlQ0l8skwTt0aaYIq X-Received: by 10.194.92.38 with SMTP id cj6mr3176918wjb.70.1393608368435; Fri, 28 Feb 2014 09:26:08 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id hy8sm5908439wjb.2.2014.02.28.09.26.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Feb 2014 09:26:07 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Fri, 28 Feb 2014 18:25:40 +0100 Message-Id: <1393608350-4431-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393608350-4431-1-git-send-email-olivier.matz@6wind.com> References: <1393608350-4431-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 01/11] mk: use whole-archive option when creating dpdk binaries 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, 28 Feb 2014 17:24:42 -0000 To fully support dpdk extensions (loading of .so), all symbols provided by dpdk libraries must be available in the binaries: before this patch, unused functions/variables from dpdk static libraries could be stripped by the linker because they are not used. These symbols can be used by a dpdk extension that is loaded at runtime with the -d option. Adding --whole-archive when generating a binary solves this issue. Signed-off-by: Olivier Matz --- mk/rte.app.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index d90a0b0..6f21e16 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -1,6 +1,7 @@ # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2014 6WIND S.A. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -58,6 +59,8 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib # ifeq ($(NO_AUTOLIBS),) +LDLIBS += --whole-archive + ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) LDLIBS += -lrte_kni @@ -180,6 +183,8 @@ LDLIBS += $(EXECENV_LDLIBS) LDLIBS += --end-group +LDLIBS += --no-whole-archive + endif # ifeq ($(NO_AUTOLIBS),) LDLIBS += $(CPU_LDLIBS) -- 1.8.5.3