From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.46.186]) by dpdk.org (Postfix) with ESMTP id E26E65912 for ; Sat, 2 Aug 2014 18:44:34 +0200 (CEST) Received: by mail.mhcomputing.net (Postfix, from userid 1000) id 90CC780C764; Sat, 2 Aug 2014 09:46:00 -0700 (PDT) Date: Sat, 2 Aug 2014 09:46:00 -0700 From: Matthew Hall To: Masaru Oki Message-ID: <20140802164600.GA9312@mhcomputing.net> References: <20140801175138.GA31733@mhcomputing.net> <20140802152904.GA9064@mhcomputing.net> <20140802154310.GA9104@mhcomputing.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Debugging EAL PCI / Driver Init 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: Sat, 02 Aug 2014 16:44:35 -0000 On Sun, Aug 03, 2014 at 01:37:06AM +0900, Masaru Oki wrote: > cc links library funtion from archive only if call from other object. > but new dpdk pmd library has constractor section and not call directly. > ld always links library funtion with constractor section. > use -Xlinker, or use ld instead of cc. Hello Oki-san, The trick to fix it was this, I finally found it in the example Makefiles with V=1 flag. -Wl,--whole-archive -Wl,--start-group -lintel_dpdk -Wl,--end-group -Wl,--no-whole-archive Thank you for the advice you provided, I couldn't have fixed it without your suggestions... it got me to look more closely at the linking. Importantly, "-Wl,--whole-archive" includes the entire archive whether or not it's called from other objects, so we don't lose the constructors, just like you said. Matthew.