Problems compiling elfxx-sparc.c

Nick Clifton nickc@redhat.com
Mon Apr 25 09:47:00 GMT 2005


Hi David,

> Yep, that seems to be the missing bit.  I wish I could somehow
> deal better with the 24 hour turnaround time for testing with
> Nick.  He seems to go to sleep when I wake up and work on
> test fix patches. :-)

You could always emigrate... :-)
> 
> Anyways, Nick, please give this a test.
> 
> 2005-04-22  David S. Miller  <davem@davemloft.net>
> 
> 	* config.bfd (sparc*-*-*): If 32-bit elf specified, set
> 	want64 to true.  When bfd_elf32_sparc is specified add
> 	64-bit vectors to targ_selvecs.

Sorry:

   % <path-to-patched-sources>/configure --enable-targets=all
   % make all-ld
   [...]
     ../bfd/.libs/libbfd.a(elfxx-sparc.o)(.text+0x46b6): In function
       `_bfd_sparc_elf_finish_dynamic_symbol':
     .../bfd/elfxx-sparc.c:3427: undefined reference to
       `bfd_elf64_swap_reloca_out'

     ../bfd/.libs/libbfd.a(elfxx-sparc.o)(.text+0x4aae): In function
       `_bfd_sparc_elf_finish_dynamic_sections':
     .../bfd/elfxx-sparc.c:3540: undefined reference to
       `bfd_elf64_swap_dyn_in'
    ../bfd/.libs/libbfd.a(elfxx-sparc.o)(.text+0x4af5):
      .../bfd/elfxx-sparc.c:3575: undefined reference to
      `bfd_elf64_swap_dyn_out'

    ../bfd/.libs/libbfd.a(elfxx-sparc.o)(.text+0x4a3): In function
       `sparc_elf_append_rela_64':
     ..../bfd/elfxx-sparc.c:509: undefined reference to
       `bfd_elf64_swap_reloca_out'

    collect2: ld returned 1 exit status

The problem is that --enable-targets=all beings in all of the 32-bit 
targets, but sets the default target to bfd_elf32_i386_vec.  So it does 
not trigger the new code you added at the end of config.bfd.

I think that the question remains: Why is the 32-bit version of 
elfxx-sparc.c attempting to access 64-bit functions when support for 
64-bit sparcs is not enabled ?

Cheers
   Nick



More information about the Binutils mailing list