This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: R_PPC_LOCAL24PC c++ linking problems with current binutils


   From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
   Date: Tue, 20 Jul 1999 00:07:53 +0200

   Compiling with c++ -o mmaptest.so -fPIC -shared mmaptest.cc gives:
   mmaptest.o: In function `__default_alloc_template<true, 0>::_S_chunk_alloc(unsigned int, int &)':
   mmaptest.o(.__default_alloc_template<true, 0>::gnu.linkonce.t._S_chunk_alloc(unsigned int, int &)+0x234): undefined reference to `__default_alloc_template<true, 0>::_S_chunk_alloc(unsigned int, int &)'
   mmaptest.o(.__default_alloc_template<true, 0>::gnu.linkonce.t._S_chunk_alloc(unsigned int, int &)+0x2a8): undefined reference to `__default_alloc_template<true, 0>::_S_chunk_alloc(unsigned int, int &)'
   collect2: ld returned 1 exit status

	     /* It makes no sense to point a local relocation
		at a symbol not in this object.  */
	     if (h != NULL
		 && (h->root.type == bfd_link_hash_defined
		     || h->root.type == bfd_link_hash_defweak)
		 && sec->output_section == NULL)

I think the last is the wrong test.  sec->output_section will be NULL
for a linkonce section which is being discarded.  More appropriate
would be a test whether ELF_LINK_HASH_DEF_REGULAR is set in
h->elf_link_hash_flags.

Ian

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