+2011-12-16 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
+
+ * mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority)
+ * mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY
+ * mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority)
+ * mach-o.c (bfd_mach_o_header_p): Remove special handling for
+ mach-o-i386.
+ (TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for
+ mach-o-fat.
+
2011-12-15 Kevin Buettner <kevinb@redhat.com>
* elf32-am33lin.c (elf32_am33lin_grok_prstatus): Add case
'_', /* symbol_leading_char. */
' ', /* ar_pad_char. */
16, /* ar_max_namelen. */
- 0, /* match priority. */
+ TARGET_PRIORITY, /* match priority. */
#if TARGET_BIG_ENDIAN
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
if (header.cputype != cputype)
goto wrong;
}
- else
- {
- switch (header.cputype)
- {
- case BFD_MACH_O_CPU_TYPE_I386:
- /* Handled by mach-o-i386 */
- goto wrong;
- default:
- break;
- }
- }
if (filetype)
{
if (header.filetype != filetype)
#define TARGET_ARCHITECTURE bfd_arch_unknown
#define TARGET_BIG_ENDIAN 1
#define TARGET_ARCHIVE 0
+#define TARGET_PRIORITY 1
#include "mach-o-target.c"
#undef TARGET_NAME
#undef TARGET_ARCHITECTURE
#undef TARGET_BIG_ENDIAN
#undef TARGET_ARCHIVE
+#undef TARGET_PRIORITY
#define TARGET_NAME mach_o_le_vec
#define TARGET_STRING "mach-o-le"
#define TARGET_ARCHITECTURE bfd_arch_unknown
#define TARGET_BIG_ENDIAN 0
#define TARGET_ARCHIVE 0
+#define TARGET_PRIORITY 1
#include "mach-o-target.c"
#undef TARGET_ARCHITECTURE
#undef TARGET_BIG_ENDIAN
#undef TARGET_ARCHIVE
+#undef TARGET_PRIORITY
/* Not yet handled: creating an archive. */
#define bfd_mach_o_mkarchive _bfd_noarchive_mkarchive
#define TARGET_ARCHITECTURE bfd_arch_unknown
#define TARGET_BIG_ENDIAN 1
#define TARGET_ARCHIVE 1
+#define TARGET_PRIORITY 0
#include "mach-o-target.c"
#undef TARGET_ARCHITECTURE
#undef TARGET_BIG_ENDIAN
#undef TARGET_ARCHIVE
+#undef TARGET_PRIORITY