unresolved symbols during binutils linking

Richard Herveille richard@herveille.net
Thu Apr 22 16:39:00 GMT 2010


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




More information about the Cgen mailing list