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]

Can we have elf64_sparc on sparc-*-linux-gnu*?


If I build binutils with sparc64-*-linux-gnu*, it will produce 64bit
code by default, and gcc will only tell ld to generate elf32_sparc; no
-32 flag is passed to gas, so it will generate elf64_sparc object
files, and ld will complain about them.

But if I build with sparc-*-linux-gnu* (i.e., s/sparc64/sparc/),
elf64_sparc won't be enabled at all.  Can't we enable it as an
alternative in this case?

The attached patch is supposed to accomplish this:

Index: bfd/ChangeLog
from  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
	
	* config.bfd: Enable 64 bit support for GNU/Linux/sparc.
	
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/binutils/binutils/bfd/config.bfd,v
retrieving revision 1.13
diff -u -r1.13 config.bfd
--- bfd/config.bfd	1999/09/28 21:45:39	1.13
+++ bfd/config.bfd	1999/12/09 16:36:21
@@ -637,7 +637,7 @@
     ;;
   sparc-*-linux-gnu*)
     targ_defvec=bfd_elf32_sparc_vec
-    targ_selvecs="sparclinux_vec sunos_big_vec"
+    targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
     ;;
   sparc-*-lynxos*)
     targ_defvec=sparclynx_coff_vec
Index: ld/ChangeLog
from  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
	
	* configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
	GNU/Linux/sparc, but keep the default as 32.
	
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/binutils/binutils/ld/configure.tgt,v
retrieving revision 1.17
diff -u -r1.17 configure.tgt
--- ld/configure.tgt	1999/09/04 17:37:36	1.17
+++ ld/configure.tgt	1999/12/09 17:10:23
@@ -45,8 +45,9 @@
 			tdir_sun4=sparc-sun-sunos4
 			;;
 sparc*-*-linux-gnu*)	targ_emul=elf32_sparc
-			targ_extra_emuls="sparclinux sun4"
+			targ_extra_emuls="sparclinux elf64_sparc sun4"
 			tdir_sparclinux=${targ_alias}aout
+			tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
 			tdir_sun4=sparc-sun-sunos4
 			;;
 sparc*-*-lynxos*)	targ_emul=sparclynx ;;

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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