This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error linking two object files with new port.


Hi Sean,

mc9s12x-elf-ld -m mc9s12xelfb --defsym _start=0 -o test.elf main.o xgate.o
mc9s12x-elf-ld: failed to merge target specific data of file xgate.o
  in bfd_default_compatible about to compare 31 and 31  /* a print
  input was 31 output was 31make: *** [test.elf] Error 1

Weird - the error text is really like that ? If so then it would seem that you have a corrupt pointer somewhere. Or else some debugging messages left in the code.


Merging target specific data is usually handled by two macros set in the bfd/elf32-<target>.c file (for a 32bit ELF port):

  bfd_elf32_copy_private_bfd_data
  bfd_elf32_merge_private_bfd_data

Have a look at how some other targets use these functions and then compare them to your own target.

Cheers
  Nick

PS. "mc9s12x-elf-as --gstabs" Using STABS debugging with ELF is a little unusual. Is there any reason for not using DWARF ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]