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: Can I link a.out .o with ELF?


On Tue, Jun 06, 2000 at 12:28:01AM +1000, Alan Modra wrote:
> 
> This patch seems to cure your testcase.  Warning: I have no idea whether
> it's the ideal solution, or even correct.  Ian may be able to give a
> better solution.
> 

Your patch doesn't work with my second testcase in a tar file. It
failed to generating the working binary with

# gcc -o not x.o dummy.c

The part of my patch fixes it. I don't know which patch is correct.
I like yours better than mine :-(. BTW, can you get

# gcc -shared -o libaout.so aout.o

working?


H.J.
----
2000-06-05  H.J. Lu  <hjl@gnu.org>

	* elflink.h (elf_link_output_extsym): Don't output the indirect
	symbol even if the ELF_LINK_NON_ELF bit is set.

Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.30
diff -u -p -r1.30 elflink.h
--- elflink.h	2000/05/30 21:05:11	1.30
+++ elflink.h	2000/06/05 14:52:34
@@ -5030,10 +5048,8 @@ elf_link_output_extsym (h, data)
          symbol foo@@GNU_1.2 is the default, which should be used when
          foo is used with no version, then we add an indirect symbol
          foo which points to foo@@GNU_1.2.  We ignore these symbols,
-         since the indirected symbol is already in the hash table.  If
-         the indirect symbol is non-ELF, fall through and output it.  */
-      if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) == 0)
-	return true;
+         since the indirected symbol is already in the hash table.  */
+      return true;
 
       /* Fall through.  */
     case bfd_link_hash_warning:



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