public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Jean-Marc Saffroy <jean-marc.saffroy@joguin.com>
To: Richard Herveille <richard@herveille.net>
Cc: cgen@sources.redhat.com
Subject: Re: unresolved symbols during binutils linking
Date: Fri, 23 Apr 2010 13:11:00 -0000	[thread overview]
Message-ID: <4BD19C6F.3000304@joguin.com> (raw)
In-Reply-To: <4BD07B40.8020405@herveille.net>

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
> 
> 
> 

  reply	other threads:[~2010-04-23 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 16:39 Richard Herveille
2010-04-23 13:11 ` Jean-Marc Saffroy [this message]
2010-04-23 13:44   ` Jean-Marc Saffroy
2010-04-23 15:33     ` Richard Herveille

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD19C6F.3000304@joguin.com \
    --to=jean-marc.saffroy@joguin.com \
    --cc=cgen@sources.redhat.com \
    --cc=richard@herveille.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).