From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Hall Subject: Re: Debugging EAL PCI / Driver Init Date: Sat, 2 Aug 2014 09:46:00 -0700 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 Cc: dev-VfR2kkLFssw@public.gmane.org To: Masaru Oki Return-path: Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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.