* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Use ELF section
[deliverable/binutils-gdb.git] / bfd / cpu-i386.c
CommitLineData
252b5132 1/* BFD support for the Intel 386 architecture.
dd53c801 2 Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
7898deda 3 Free Software Foundation, Inc.
252b5132
RH
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21#include "bfd.h"
22#include "sysdep.h"
23#include "libbfd.h"
24
dd53c801
AJ
25/* Don't mix 32 bit and 64 bit files. */
26
27static const bfd_arch_info_type *i386_compatible
28 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
29
30static const bfd_arch_info_type *
31i386_compatible (a, b)
32 const bfd_arch_info_type *a;
33 const bfd_arch_info_type *b;
34{
35 if (a->bits_per_word != b->bits_per_word)
36 return NULL;
37
38 return bfd_default_compatible (a, b);
39}
40
252b5132
RH
41const bfd_arch_info_type bfd_i386_arch_intel_syntax =
42{
43 32, /* 32 bits in a word */
44 32, /* 32 bits in an address */
45 8, /* 8 bits in a byte */
46 bfd_arch_i386,
47 bfd_mach_i386_i386_intel_syntax,
48 "i386:intel",
49 "i386:intel",
50 3,
51 true,
dd53c801 52 i386_compatible,
252b5132
RH
53 bfd_default_scan ,
54 0,
55};
8d88c4ca
NC
56const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
57{
58 64, /* 64 bits in a word */
59 64, /* 64 bits in an address */
60 8, /* 8 bits in a byte */
61 bfd_arch_i386,
62 bfd_mach_x86_64_intel_syntax,
58a35813
AJ
63 "x86-64:intel",
64 "x86-64:intel",
8d88c4ca
NC
65 3,
66 true,
dd53c801 67 i386_compatible,
8d88c4ca
NC
68 bfd_default_scan ,
69 &bfd_i386_arch_intel_syntax,
70};
252b5132
RH
71static const bfd_arch_info_type i8086_arch =
72{
73 32, /* 32 bits in a word */
74 32, /* 32 bits in an address (well, not really) */
75 8, /* 8 bits in a byte */
76 bfd_arch_i386,
77 bfd_mach_i386_i8086,
78 "i8086",
79 "i8086",
80 3,
81 false,
dd53c801 82 i386_compatible,
252b5132 83 bfd_default_scan ,
8d88c4ca
NC
84 &bfd_x86_64_arch_intel_syntax,
85};
86
87const bfd_arch_info_type bfd_x86_64_arch =
88{
89 64, /* 32 bits in a word */
90 64, /* 32 bits in an address */
91 8, /* 8 bits in a byte */
92 bfd_arch_i386,
93 bfd_mach_x86_64,
58a35813
AJ
94 "x86-64",
95 "x86-64",
8d88c4ca
NC
96 3,
97 true,
dd53c801 98 i386_compatible,
8d88c4ca
NC
99 bfd_default_scan ,
100 &i8086_arch,
252b5132
RH
101};
102
103const bfd_arch_info_type bfd_i386_arch =
104{
105 32, /* 32 bits in a word */
106 32, /* 32 bits in an address */
107 8, /* 8 bits in a byte */
108 bfd_arch_i386,
109 bfd_mach_i386_i386,
110 "i386",
111 "i386",
112 3,
113 true,
dd53c801 114 i386_compatible,
252b5132 115 bfd_default_scan ,
3fde5a36 116 &bfd_x86_64_arch
252b5132 117};
This page took 0.119328 seconds and 4 git commands to generate.