Commit | Line | Data |
---|---|---|
154a1ee5 | 1 | /* Intel i386 Mach-O support for BFD. |
250d07de | 2 | Copyright (C) 2009-2021 Free Software Foundation, Inc. |
154a1ee5 TG |
3 | |
4 | This file is part of BFD, the Binary File Descriptor library. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 3 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
19 | MA 02110-1301, USA. */ | |
20 | ||
21 | #include "sysdep.h" | |
154a1ee5 TG |
22 | #include "bfd.h" |
23 | #include "libbfd.h" | |
24 | #include "libiberty.h" | |
2d5d5a8f | 25 | #include "mach-o.h" |
46d1c23b | 26 | #include "mach-o/reloc.h" |
154a1ee5 TG |
27 | |
28 | #define bfd_mach_o_object_p bfd_mach_o_i386_object_p | |
29 | #define bfd_mach_o_core_p bfd_mach_o_i386_core_p | |
30 | #define bfd_mach_o_mkobject bfd_mach_o_i386_mkobject | |
31 | ||
cb001c0d | 32 | static bfd_cleanup |
154a1ee5 TG |
33 | bfd_mach_o_i386_object_p (bfd *abfd) |
34 | { | |
47daa70f | 35 | return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_I386); |
154a1ee5 TG |
36 | } |
37 | ||
cb001c0d | 38 | static bfd_cleanup |
154a1ee5 TG |
39 | bfd_mach_o_i386_core_p (bfd *abfd) |
40 | { | |
47daa70f | 41 | return bfd_mach_o_header_p (abfd, 0, |
07d6d2b8 | 42 | BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_I386); |
154a1ee5 TG |
43 | } |
44 | ||
0a1b45a2 | 45 | static bool |
154a1ee5 TG |
46 | bfd_mach_o_i386_mkobject (bfd *abfd) |
47 | { | |
48 | bfd_mach_o_data_struct *mdata; | |
49 | ||
50 | if (!bfd_mach_o_mkobject_init (abfd)) | |
0a1b45a2 | 51 | return false; |
154a1ee5 | 52 | |
046b007d | 53 | mdata = bfd_mach_o_get_data (abfd); |
154a1ee5 TG |
54 | mdata->header.magic = BFD_MACH_O_MH_MAGIC; |
55 | mdata->header.cputype = BFD_MACH_O_CPU_TYPE_I386; | |
56 | mdata->header.cpusubtype = BFD_MACH_O_CPU_SUBTYPE_X86_ALL; | |
154a1ee5 TG |
57 | mdata->header.byteorder = BFD_ENDIAN_LITTLE; |
58 | mdata->header.version = 1; | |
59 | ||
0a1b45a2 | 60 | return true; |
154a1ee5 TG |
61 | } |
62 | ||
92bc0e80 TG |
63 | static reloc_howto_type i386_howto_table[]= |
64 | { | |
e1e81ed3 | 65 | /* 0 */ |
0a1b45a2 | 66 | HOWTO(BFD_RELOC_32, 0, 2, 32, false, 0, |
92bc0e80 TG |
67 | complain_overflow_bitfield, |
68 | NULL, "32", | |
0a1b45a2 AM |
69 | false, 0xffffffff, 0xffffffff, false), |
70 | HOWTO(BFD_RELOC_16, 0, 1, 16, false, 0, | |
92bc0e80 TG |
71 | complain_overflow_bitfield, |
72 | NULL, "16", | |
0a1b45a2 AM |
73 | false, 0xffff, 0xffff, false), |
74 | HOWTO(BFD_RELOC_8, 0, 0, 8, false, 0, | |
92bc0e80 TG |
75 | complain_overflow_bitfield, |
76 | NULL, "8", | |
0a1b45a2 AM |
77 | false, 0xff, 0xff, false), |
78 | HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, | |
92bc0e80 TG |
79 | complain_overflow_bitfield, |
80 | NULL, "DISP32", | |
0a1b45a2 | 81 | false, 0xffffffff, 0xffffffff, true), |
e1e81ed3 | 82 | /* 4 */ |
0a1b45a2 | 83 | HOWTO(BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, |
92bc0e80 TG |
84 | complain_overflow_bitfield, |
85 | NULL, "DISP16", | |
0a1b45a2 AM |
86 | false, 0xffff, 0xffff, true), |
87 | HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, false, 0, | |
92bc0e80 TG |
88 | complain_overflow_bitfield, |
89 | NULL, "SECTDIFF_32", | |
0a1b45a2 AM |
90 | false, 0xffffffff, 0xffffffff, false), |
91 | HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, false, 0, | |
e1e81ed3 IS |
92 | complain_overflow_bitfield, |
93 | NULL, "LSECTDIFF_32", | |
0a1b45a2 AM |
94 | false, 0xffffffff, 0xffffffff, false), |
95 | HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 2, 32, false, 0, | |
92bc0e80 TG |
96 | complain_overflow_bitfield, |
97 | NULL, "PAIR_32", | |
0a1b45a2 | 98 | false, 0xffffffff, 0xffffffff, false), |
6639d37a | 99 | /* 8 */ |
0a1b45a2 | 100 | HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, false, 0, |
6639d37a IS |
101 | complain_overflow_bitfield, |
102 | NULL, "SECTDIFF_16", | |
0a1b45a2 AM |
103 | false, 0xffff, 0xffff, false), |
104 | HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, false, 0, | |
6639d37a IS |
105 | complain_overflow_bitfield, |
106 | NULL, "LSECTDIFF_16", | |
0a1b45a2 AM |
107 | false, 0xffff, 0xffff, false), |
108 | HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 1, 16, false, 0, | |
6639d37a IS |
109 | complain_overflow_bitfield, |
110 | NULL, "PAIR_16", | |
0a1b45a2 | 111 | false, 0xffff, 0xffff, false), |
92bc0e80 TG |
112 | }; |
113 | ||
0a1b45a2 | 114 | static bool |
ca4cf9b9 | 115 | bfd_mach_o_i386_canonicalize_one_reloc (bfd * abfd, |
07d6d2b8 | 116 | struct mach_o_reloc_info_external * raw, |
ca4cf9b9 NC |
117 | arelent * res, |
118 | asymbol ** syms, | |
119 | arelent * res_base) | |
92bc0e80 | 120 | { |
bcb51645 TG |
121 | bfd_mach_o_reloc_info reloc; |
122 | ||
123 | if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms)) | |
0a1b45a2 | 124 | return false; |
bcb51645 TG |
125 | |
126 | if (reloc.r_scattered) | |
92bc0e80 | 127 | { |
bcb51645 | 128 | switch (reloc.r_type) |
07d6d2b8 AM |
129 | { |
130 | case BFD_MACH_O_GENERIC_RELOC_PAIR: | |
ca4cf9b9 NC |
131 | /* PR 21813: Check for a corrupt PAIR reloc at the start. */ |
132 | if (res == res_base) | |
0a1b45a2 | 133 | return false; |
07d6d2b8 AM |
134 | if (reloc.r_length == 2) |
135 | { | |
6639d37a IS |
136 | res->howto = &i386_howto_table[7]; |
137 | res->address = res[-1].address; | |
0a1b45a2 | 138 | return true; |
07d6d2b8 AM |
139 | } |
140 | else if (reloc.r_length == 1) | |
6639d37a IS |
141 | { |
142 | res->howto = &i386_howto_table[10]; | |
143 | res->address = res[-1].address; | |
0a1b45a2 | 144 | return true; |
6639d37a | 145 | } |
0a1b45a2 | 146 | return false; |
07d6d2b8 AM |
147 | case BFD_MACH_O_GENERIC_RELOC_SECTDIFF: |
148 | if (reloc.r_length == 2) | |
149 | { | |
6639d37a | 150 | res->howto = &i386_howto_table[5]; |
0a1b45a2 | 151 | return true; |
07d6d2b8 AM |
152 | } |
153 | else if (reloc.r_length == 1) | |
154 | { | |
6639d37a | 155 | res->howto = &i386_howto_table[8]; |
0a1b45a2 | 156 | return true; |
07d6d2b8 | 157 | } |
0a1b45a2 | 158 | return false; |
07d6d2b8 AM |
159 | case BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF: |
160 | if (reloc.r_length == 2) | |
161 | { | |
6639d37a | 162 | res->howto = &i386_howto_table[6]; |
0a1b45a2 | 163 | return true; |
07d6d2b8 AM |
164 | } |
165 | else if (reloc.r_length == 1) | |
166 | { | |
6639d37a | 167 | res->howto = &i386_howto_table[9]; |
0a1b45a2 | 168 | return true; |
07d6d2b8 | 169 | } |
0a1b45a2 | 170 | return false; |
07d6d2b8 | 171 | default: |
0bae9e9e | 172 | break; |
07d6d2b8 | 173 | } |
92bc0e80 TG |
174 | } |
175 | else | |
176 | { | |
bcb51645 | 177 | switch (reloc.r_type) |
07d6d2b8 AM |
178 | { |
179 | case BFD_MACH_O_GENERIC_RELOC_VANILLA: | |
180 | switch ((reloc.r_length << 1) | reloc.r_pcrel) | |
181 | { | |
182 | case 0: /* len = 0, pcrel = 0 */ | |
183 | res->howto = &i386_howto_table[2]; | |
0a1b45a2 | 184 | return true; |
07d6d2b8 AM |
185 | case 2: /* len = 1, pcrel = 0 */ |
186 | res->howto = &i386_howto_table[1]; | |
0a1b45a2 | 187 | return true; |
07d6d2b8 AM |
188 | case 3: /* len = 1, pcrel = 1 */ |
189 | res->howto = &i386_howto_table[4]; | |
0a1b45a2 | 190 | return true; |
07d6d2b8 AM |
191 | case 4: /* len = 2, pcrel = 0 */ |
192 | res->howto = &i386_howto_table[0]; | |
0a1b45a2 | 193 | return true; |
07d6d2b8 AM |
194 | case 5: /* len = 2, pcrel = 1 */ |
195 | res->howto = &i386_howto_table[3]; | |
0a1b45a2 | 196 | return true; |
07d6d2b8 | 197 | default: |
0a1b45a2 | 198 | return false; |
07d6d2b8 AM |
199 | } |
200 | default: | |
201 | break; | |
202 | } | |
92bc0e80 | 203 | } |
0a1b45a2 | 204 | return false; |
92bc0e80 TG |
205 | } |
206 | ||
0a1b45a2 | 207 | static bool |
92bc0e80 TG |
208 | bfd_mach_o_i386_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) |
209 | { | |
210 | rinfo->r_address = rel->address; | |
211 | switch (rel->howto->type) | |
212 | { | |
213 | case BFD_RELOC_32: | |
214 | case BFD_RELOC_32_PCREL: | |
215 | case BFD_RELOC_16: | |
216 | case BFD_RELOC_16_PCREL: | |
217 | case BFD_RELOC_8: | |
218 | rinfo->r_scattered = 0; | |
219 | rinfo->r_type = BFD_MACH_O_GENERIC_RELOC_VANILLA; | |
220 | rinfo->r_pcrel = rel->howto->pc_relative; | |
221 | rinfo->r_length = rel->howto->size; /* Correct in practice. */ | |
222 | if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM) | |
07d6d2b8 AM |
223 | { |
224 | rinfo->r_extern = 0; | |
225 | rinfo->r_value = | |
47c50932 | 226 | (*rel->sym_ptr_ptr)->section->output_section->target_index; |
07d6d2b8 | 227 | } |
92bc0e80 | 228 | else |
07d6d2b8 AM |
229 | { |
230 | rinfo->r_extern = 1; | |
231 | rinfo->r_value = (*rel->sym_ptr_ptr)->udata.i; | |
232 | } | |
92bc0e80 TG |
233 | break; |
234 | case BFD_RELOC_MACH_O_SECTDIFF: | |
235 | rinfo->r_scattered = 1; | |
236 | rinfo->r_type = BFD_MACH_O_GENERIC_RELOC_SECTDIFF; | |
237 | rinfo->r_pcrel = 0; | |
6639d37a | 238 | rinfo->r_length = rel->howto->size; |
92bc0e80 | 239 | rinfo->r_extern = 0; |
6639d37a | 240 | rinfo->r_value = rel->addend; |
92bc0e80 | 241 | break; |
e1e81ed3 IS |
242 | case BFD_RELOC_MACH_O_LOCAL_SECTDIFF: |
243 | rinfo->r_scattered = 1; | |
244 | rinfo->r_type = BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF; | |
245 | rinfo->r_pcrel = 0; | |
6639d37a | 246 | rinfo->r_length = rel->howto->size; |
e1e81ed3 | 247 | rinfo->r_extern = 0; |
6639d37a | 248 | rinfo->r_value = rel->addend; |
e1e81ed3 | 249 | break; |
92bc0e80 TG |
250 | case BFD_RELOC_MACH_O_PAIR: |
251 | rinfo->r_address = 0; | |
252 | rinfo->r_scattered = 1; | |
253 | rinfo->r_type = BFD_MACH_O_GENERIC_RELOC_PAIR; | |
254 | rinfo->r_pcrel = 0; | |
6639d37a | 255 | rinfo->r_length = rel->howto->size; |
92bc0e80 | 256 | rinfo->r_extern = 0; |
6639d37a | 257 | rinfo->r_value = rel->addend; |
92bc0e80 TG |
258 | break; |
259 | default: | |
0a1b45a2 | 260 | return false; |
92bc0e80 | 261 | } |
0a1b45a2 | 262 | return true; |
92bc0e80 TG |
263 | } |
264 | ||
265 | static reloc_howto_type * | |
266 | bfd_mach_o_i386_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, | |
07d6d2b8 | 267 | bfd_reloc_code_real_type code) |
92bc0e80 TG |
268 | { |
269 | unsigned int i; | |
270 | ||
271 | for (i = 0; i < sizeof (i386_howto_table) / sizeof (*i386_howto_table); i++) | |
272 | if (code == i386_howto_table[i].type) | |
273 | return &i386_howto_table[i]; | |
274 | return NULL; | |
275 | } | |
276 | ||
277 | static reloc_howto_type * | |
278 | bfd_mach_o_i386_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, | |
07d6d2b8 | 279 | const char *name ATTRIBUTE_UNUSED) |
92bc0e80 TG |
280 | { |
281 | return NULL; | |
282 | } | |
283 | ||
0a1b45a2 | 284 | static bool |
b32e07d7 | 285 | bfd_mach_o_i386_print_thread (bfd *abfd, bfd_mach_o_thread_flavour *thread, |
07d6d2b8 | 286 | void *vfile, char *buf) |
b32e07d7 TG |
287 | { |
288 | FILE *file = (FILE *)vfile; | |
289 | ||
290 | switch (thread->flavour) | |
291 | { | |
292 | case BFD_MACH_O_x86_THREAD_STATE: | |
293 | if (thread->size < (8 + 16 * 4)) | |
0a1b45a2 | 294 | return false; |
b32e07d7 TG |
295 | fprintf (file, " x86_THREAD_STATE:\n"); |
296 | fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", | |
07d6d2b8 AM |
297 | (unsigned long)bfd_get_32 (abfd, buf + 0), |
298 | (unsigned long)bfd_get_32 (abfd, buf + 4)); | |
b32e07d7 | 299 | fprintf (file, " eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", |
07d6d2b8 AM |
300 | (unsigned long)bfd_get_32 (abfd, buf + 8), |
301 | (unsigned long)bfd_get_32 (abfd, buf + 12), | |
302 | (unsigned long)bfd_get_32 (abfd, buf + 16), | |
303 | (unsigned long)bfd_get_32 (abfd, buf + 20)); | |
b32e07d7 | 304 | fprintf (file, " edi: %08lx esi: %08lx ebp: %08lx esp: %08lx\n", |
07d6d2b8 AM |
305 | (unsigned long)bfd_get_32 (abfd, buf + 24), |
306 | (unsigned long)bfd_get_32 (abfd, buf + 28), | |
307 | (unsigned long)bfd_get_32 (abfd, buf + 32), | |
308 | (unsigned long)bfd_get_32 (abfd, buf + 36)); | |
b32e07d7 | 309 | fprintf (file, " ss: %08lx flg: %08lx eip: %08lx cs: %08lx\n", |
07d6d2b8 AM |
310 | (unsigned long)bfd_get_32 (abfd, buf + 40), |
311 | (unsigned long)bfd_get_32 (abfd, buf + 44), | |
312 | (unsigned long)bfd_get_32 (abfd, buf + 48), | |
313 | (unsigned long)bfd_get_32 (abfd, buf + 52)); | |
b32e07d7 | 314 | fprintf (file, " ds: %08lx es: %08lx fs: %08lx gs: %08lx\n", |
07d6d2b8 AM |
315 | (unsigned long)bfd_get_32 (abfd, buf + 56), |
316 | (unsigned long)bfd_get_32 (abfd, buf + 60), | |
317 | (unsigned long)bfd_get_32 (abfd, buf + 64), | |
318 | (unsigned long)bfd_get_32 (abfd, buf + 68)); | |
0a1b45a2 | 319 | return true; |
b32e07d7 TG |
320 | case BFD_MACH_O_x86_FLOAT_STATE: |
321 | if (thread->size < 8) | |
0a1b45a2 | 322 | return false; |
b32e07d7 TG |
323 | fprintf (file, " x86_FLOAT_STATE:\n"); |
324 | fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", | |
07d6d2b8 AM |
325 | (unsigned long)bfd_get_32 (abfd, buf + 0), |
326 | (unsigned long)bfd_get_32 (abfd, buf + 4)); | |
0a1b45a2 | 327 | return true; |
b32e07d7 TG |
328 | case BFD_MACH_O_x86_EXCEPTION_STATE: |
329 | if (thread->size < 8 + 3 * 4) | |
0a1b45a2 | 330 | return false; |
b32e07d7 TG |
331 | fprintf (file, " x86_EXCEPTION_STATE:\n"); |
332 | fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", | |
07d6d2b8 AM |
333 | (unsigned long)bfd_get_32 (abfd, buf + 0), |
334 | (unsigned long)bfd_get_32 (abfd, buf + 4)); | |
b32e07d7 | 335 | fprintf (file, " trapno: %08lx err: %08lx faultaddr: %08lx\n", |
07d6d2b8 AM |
336 | (unsigned long)bfd_get_32 (abfd, buf + 8), |
337 | (unsigned long)bfd_get_32 (abfd, buf + 12), | |
338 | (unsigned long)bfd_get_32 (abfd, buf + 16)); | |
0a1b45a2 | 339 | return true; |
b32e07d7 TG |
340 | default: |
341 | break; | |
342 | } | |
0a1b45a2 | 343 | return false; |
b32e07d7 TG |
344 | } |
345 | ||
a4551119 TG |
346 | static const mach_o_section_name_xlat text_section_names_xlat[] = |
347 | { | |
348 | { ".symbol_stub", "__symbol_stub", | |
632039e0 | 349 | SEC_CODE | SEC_LOAD, BFD_MACH_O_S_SYMBOL_STUBS, |
a4551119 TG |
350 | BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS, |
351 | 0}, | |
352 | { ".picsymbol_stub", "__picsymbol_stub", | |
632039e0 | 353 | SEC_CODE | SEC_LOAD, BFD_MACH_O_S_SYMBOL_STUBS, |
a4551119 TG |
354 | BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS, |
355 | 0}, | |
356 | { NULL, NULL, 0, 0, 0, 0} | |
357 | }; | |
358 | ||
359 | static const mach_o_section_name_xlat data_section_names_xlat[] = | |
360 | { | |
361 | /* The first two are recognized by i386, but not emitted for x86 by | |
362 | modern GCC. */ | |
363 | { ".non_lazy_symbol_pointer", "__nl_symbol_ptr", | |
364 | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS, | |
365 | BFD_MACH_O_S_ATTR_NONE, 2}, | |
366 | { ".lazy_symbol_pointer", "__la_symbol_ptr", | |
367 | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_LAZY_SYMBOL_POINTERS, | |
368 | BFD_MACH_O_S_ATTR_NONE, 2}, | |
369 | { ".lazy_symbol_pointer2", "__la_sym_ptr2", | |
370 | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_LAZY_SYMBOL_POINTERS, | |
371 | BFD_MACH_O_S_ATTR_NONE, 2}, | |
372 | { ".lazy_symbol_pointer3", "__la_sym_ptr3", | |
373 | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_LAZY_SYMBOL_POINTERS, | |
374 | BFD_MACH_O_S_ATTR_NONE, 2}, | |
375 | { NULL, NULL, 0, 0, 0, 0} | |
376 | }; | |
377 | ||
378 | static const mach_o_section_name_xlat import_section_names_xlat[] = | |
379 | { | |
380 | { ".picsymbol_stub3", "__jump_table", | |
632039e0 | 381 | SEC_CODE | SEC_LOAD, BFD_MACH_O_S_SYMBOL_STUBS, |
68ffbac6 | 382 | BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS |
a4551119 TG |
383 | | BFD_MACH_O_S_SELF_MODIFYING_CODE, |
384 | 6}, | |
385 | { ".non_lazy_symbol_pointer_x86", "__pointers", | |
386 | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS, | |
387 | BFD_MACH_O_S_ATTR_NONE, 2}, | |
388 | { NULL, NULL, 0, 0, 0, 0} | |
389 | }; | |
390 | ||
391 | const mach_o_segment_name_xlat mach_o_i386_segsec_names_xlat[] = | |
392 | { | |
393 | { "__TEXT", text_section_names_xlat }, | |
394 | { "__DATA", data_section_names_xlat }, | |
395 | { "__IMPORT", import_section_names_xlat }, | |
396 | { NULL, NULL } | |
397 | }; | |
398 | ||
ca4cf9b9 | 399 | #define bfd_mach_o_canonicalize_one_reloc bfd_mach_o_i386_canonicalize_one_reloc |
07d6d2b8 AM |
400 | #define bfd_mach_o_swap_reloc_out bfd_mach_o_i386_swap_reloc_out |
401 | #define bfd_mach_o_print_thread bfd_mach_o_i386_print_thread | |
92bc0e80 | 402 | |
a4551119 | 403 | #define bfd_mach_o_tgt_seg_table mach_o_i386_segsec_names_xlat |
ab76eeaf | 404 | #define bfd_mach_o_section_type_valid_for_tgt NULL |
a4551119 | 405 | |
68ffbac6 | 406 | #define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_i386_bfd_reloc_type_lookup |
92bc0e80 TG |
407 | #define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_i386_bfd_reloc_name_lookup |
408 | ||
07d6d2b8 AM |
409 | #define TARGET_NAME i386_mach_o_vec |
410 | #define TARGET_STRING "mach-o-i386" | |
42fa0891 | 411 | #define TARGET_ARCHITECTURE bfd_arch_i386 |
4384b284 | 412 | #define TARGET_PAGESIZE 4096 |
07d6d2b8 AM |
413 | #define TARGET_BIG_ENDIAN 0 |
414 | #define TARGET_ARCHIVE 0 | |
b93a1992 | 415 | #define TARGET_PRIORITY 0 |
154a1ee5 | 416 | #include "mach-o-target.c" |