This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix pr325
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 12 Oct 2004 17:41:23 +0930
- Subject: fix pr325
The problem here was that specifying -mi386:intel matched
bfd_x86_64_arch_intel_syntax (as well as bfd_i386_arch_intel_syntax)
since both were marked as default. bfd_x86_64_arch_intel_syntax was
chosen because it happened to come first. Result, disassembling for
x86_64.
PR 325
* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
Don't mark as default.
(bfd_x86_64_arch): Don't mark as default.
Index: bfd/cpu-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/cpu-i386.c,v
retrieving revision 1.10
diff -u -p -r1.10 cpu-i386.c
--- bfd/cpu-i386.c 30 Nov 2002 08:39:36 -0000 1.10
+++ bfd/cpu-i386.c 12 Oct 2004 08:01:36 -0000
@@ -1,5 +1,5 @@
/* BFD support for the Intel 386 architecture.
- Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
+ Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,21 +22,6 @@ Foundation, Inc., 59 Temple Place - Suit
#include "sysdep.h"
#include "libbfd.h"
-const bfd_arch_info_type bfd_i386_arch_intel_syntax =
-{
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_i386,
- bfd_mach_i386_i386_intel_syntax,
- "i386:intel",
- "i386:intel",
- 3,
- TRUE,
- bfd_default_compatible,
- bfd_default_scan ,
- 0,
-};
const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
{
64, /* 64 bits in a word */
@@ -47,12 +32,29 @@ const bfd_arch_info_type bfd_x86_64_arch
"i386:intel",
"i386:x86-64:intel",
3,
+ FALSE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ 0
+};
+
+const bfd_arch_info_type bfd_i386_arch_intel_syntax =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_i386_i386_intel_syntax,
+ "i386:intel",
+ "i386:intel",
+ 3,
TRUE,
bfd_default_compatible,
- bfd_default_scan ,
- &bfd_i386_arch_intel_syntax,
+ bfd_default_scan,
+ &bfd_x86_64_arch_intel_syntax
};
-static const bfd_arch_info_type i8086_arch =
+
+const bfd_arch_info_type i8086_arch =
{
32, /* 32 bits in a word */
32, /* 32 bits in an address (well, not really) */
@@ -64,8 +66,8 @@ static const bfd_arch_info_type i8086_ar
3,
FALSE,
bfd_default_compatible,
- bfd_default_scan ,
- &bfd_x86_64_arch_intel_syntax,
+ bfd_default_scan,
+ &bfd_i386_arch_intel_syntax
};
const bfd_arch_info_type bfd_x86_64_arch =
@@ -78,10 +80,10 @@ const bfd_arch_info_type bfd_x86_64_arch
"i386",
"i386:x86-64",
3,
- TRUE,
+ FALSE,
bfd_default_compatible,
bfd_default_scan ,
- &i8086_arch,
+ &i8086_arch
};
const bfd_arch_info_type bfd_i386_arch =
--
Alan Modra
IBM OzLabs - Linux Technology Centre