This is the mail archive of the binutils@sources.redhat.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]

x86_64 gas fix


Hi
I am about to check in folowing patch. It sets mach properly, that in
effect sloves some stubble problems, such as objdump not being able
to parse the debug info.

Honza

So led 13 23:02:38 CET 2001  Jan Hubicka  <jh@suse.cz>

	* tc-i386.h (TARGET_MACH): New macro.
	(i386_mach): Declare.
	* tc-i386.c (i386_mach): New function.

*** tc-i386.h.old	Sat Jan 13 22:57:43 2001
--- tc-i386.h	Sat Jan 13 22:58:37 2001
*************** extern int tc_i386_fix_adjustable PARAMS
*** 81,86 ****
--- 81,88 ----
  	   && ! S_IS_COMMON ((FIX)->fx_addsy))))
  
  #define TARGET_ARCH		bfd_arch_i386
+ #define TARGET_MACH		(i386_mach ())
+ extern unsigned long i386_mach PARAMS ((void));
  
  #ifdef TE_NetBSD
  #define AOUT_TARGET_FORMAT	"a.out-i386-netbsd"
*** tc-i386.c.old	Sat Jan 13 01:02:22 2001
--- tc-i386.c	Sat Jan 13 23:01:08 2001
*************** static struct hash_control *op_hash;
*** 778,783 ****
--- 778,796 ----
  /* Hash table for register lookup.  */
  static struct hash_control *reg_hash;
  
+ #ifdef BFD_ASSEMBLER
+ unsigned long
+ i386_mach ()
+ {
+   if (!strcmp (default_arch, "x86_64"))
+     return bfd_mach_x86_64;
+   else if (!strcmp (default_arch, "i386"))
+     return bfd_mach_i386_i386;
+   else
+     as_fatal (_("Unknown architecture"));
+ }
+ #endif
+ 
  void
  md_begin ()
  {

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