This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
unresolved symbols during binutils linking
- From: Richard Herveille <richard at herveille dot net>
- To: cgen at sources dot redhat dot com
- Date: Thu, 22 Apr 2010 18:37:20 +0200
- Subject: unresolved symbols during binutils linking
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