From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15929 invoked by alias); 23 Apr 2010 13:11:29 -0000 Received: (qmail 15828 invoked by uid 22791); 23 Apr 2010 13:11:28 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=BAYES_20,TW_YC X-Spam-Check-By: sourceware.org Received: from claranetfr-outbound-smtp05.mail.eu.clara.net (HELO claranetfr-outbound-smtp05.mail.eu.clara.net) (195.8.64.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Apr 2010 13:11:18 +0000 Received: from 98.140.74-86.rev.gaoland.net ([86.74.140.98]:46991 helo=[192.168.0.100]) by relay05.mail.eu.clara.net (smtp-vh.fr.clara.net [213.253.3.45]:1725) with esmtpa (authdaemon_plain:jean-marc.saffroy@joguin.com) id 1O5If2-00062R-JI (return-path ); Fri, 23 Apr 2010 13:11:13 +0000 Message-ID: <4BD19C6F.3000304@joguin.com> Date: Fri, 23 Apr 2010 13:11:00 -0000 From: Jean-Marc Saffroy User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Richard Herveille CC: cgen@sources.redhat.com Subject: Re: unresolved symbols during binutils linking References: <4BD07B40.8020405@herveille.net> In-Reply-To: <4BD07B40.8020405@herveille.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00002.txt.bz2 Hi Richard, Maybe you forgot to add mycpu-{asm,desc,dis,ibld,opc}.c to TARGET_LIBOPCODES_CFILES in opcodes/Makefile.am (and of course regenerate Makefile.in and rerun configure) ? Cheers, JM Richard Herveille wrote: > Hi, > > I am trying to port binutils to a new CPU using CGEN. > My approach ... start with a basic/simple .cpu file (with limited > opcodes) and add instructions once it all starts working. > > I think I modified all configure/makefiles in binutils; at least it is > alive :-) > I can also see that cgen gets called and generates the files without > issuing any errors. I can also see the opcode definitions in teh fiels. > However I am getting errors during compilation (actually during linking); > > Example: > libtool: link: gcc -W ... ../opcodes/.libs/libopcodes.a(mycpu-dis.o): In > function 'mycpu_cgen_init_dis': > ... mycpu-dis.c:148 undefined reference to 'mycpu_cgen_init_ibld_table' > > other undefined references: > mycpu_cgen_cpu_open, mycpu_cgen_opval_h_gpr, mycpu_cgen_opval_h_gpar, > mycpu_cgen_init_opcode_table, mycpu_cgen_build_insn_regex > > I can see all of these functions being defined in the generated C files. > I can also see that the names are present in libopcodes.a. > > Does anybody have any clue what is going wrong? I tried other targets > and they work out of the box. So it must be something in my CPU's setup. > > Thanks, > Richard > > >