xref: /netbsd-src/external/gpl3/binutils/dist/bfd/mach-o-arm.c (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
18cbf5cb7Schristos /* ARM Mach-O support for BFD.
2*cb63e24eSchristos    Copyright (C) 2015-2024 Free Software Foundation, Inc.
38cbf5cb7Schristos 
48cbf5cb7Schristos    This file is part of BFD, the Binary File Descriptor library.
58cbf5cb7Schristos 
68cbf5cb7Schristos    This program is free software; you can redistribute it and/or modify
78cbf5cb7Schristos    it under the terms of the GNU General Public License as published by
88cbf5cb7Schristos    the Free Software Foundation; either version 3 of the License, or
98cbf5cb7Schristos    (at your option) any later version.
108cbf5cb7Schristos 
118cbf5cb7Schristos    This program is distributed in the hope that it will be useful,
128cbf5cb7Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
138cbf5cb7Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
148cbf5cb7Schristos    GNU General Public License for more details.
158cbf5cb7Schristos 
168cbf5cb7Schristos    You should have received a copy of the GNU General Public License
178cbf5cb7Schristos    along with this program; if not, write to the Free Software
188cbf5cb7Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
198cbf5cb7Schristos    MA 02110-1301, USA.  */
208cbf5cb7Schristos 
218cbf5cb7Schristos #include "sysdep.h"
228cbf5cb7Schristos #include "bfd.h"
238cbf5cb7Schristos #include "libbfd.h"
248cbf5cb7Schristos #include "libiberty.h"
256f4ced0bSchristos #include "mach-o.h"
268cbf5cb7Schristos #include "mach-o/arm.h"
278cbf5cb7Schristos 
288cbf5cb7Schristos #define bfd_mach_o_object_p bfd_mach_o_arm_object_p
298cbf5cb7Schristos #define bfd_mach_o_core_p bfd_mach_o_arm_core_p
308cbf5cb7Schristos #define bfd_mach_o_mkobject bfd_mach_o_arm_mkobject
318cbf5cb7Schristos 
328cbf5cb7Schristos #define bfd_mach_o_canonicalize_one_reloc bfd_mach_o_arm_canonicalize_one_reloc
338cbf5cb7Schristos #define bfd_mach_o_swap_reloc_out  NULL
348cbf5cb7Schristos #define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_arm_bfd_reloc_type_lookup
358cbf5cb7Schristos #define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_arm_bfd_reloc_name_lookup
368cbf5cb7Schristos 
378cbf5cb7Schristos #define bfd_mach_o_print_thread NULL
388cbf5cb7Schristos #define bfd_mach_o_tgt_seg_table NULL
398cbf5cb7Schristos #define bfd_mach_o_section_type_valid_for_tgt NULL
408cbf5cb7Schristos 
414f645668Schristos static bfd_cleanup
bfd_mach_o_arm_object_p(bfd * abfd)428cbf5cb7Schristos bfd_mach_o_arm_object_p (bfd *abfd)
438cbf5cb7Schristos {
448cbf5cb7Schristos   return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_ARM);
458cbf5cb7Schristos }
468cbf5cb7Schristos 
474f645668Schristos static bfd_cleanup
bfd_mach_o_arm_core_p(bfd * abfd)488cbf5cb7Schristos bfd_mach_o_arm_core_p (bfd *abfd)
498cbf5cb7Schristos {
508cbf5cb7Schristos   return bfd_mach_o_header_p (abfd, 0,
518cbf5cb7Schristos 			      BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM);
528cbf5cb7Schristos }
538cbf5cb7Schristos 
544f645668Schristos static bool
bfd_mach_o_arm_mkobject(bfd * abfd)558cbf5cb7Schristos bfd_mach_o_arm_mkobject (bfd *abfd)
568cbf5cb7Schristos {
578cbf5cb7Schristos   bfd_mach_o_data_struct *mdata;
588cbf5cb7Schristos 
598cbf5cb7Schristos   if (!bfd_mach_o_mkobject_init (abfd))
604f645668Schristos     return false;
618cbf5cb7Schristos 
628cbf5cb7Schristos   mdata = bfd_mach_o_get_data (abfd);
638cbf5cb7Schristos   mdata->header.magic = BFD_MACH_O_MH_MAGIC;
648cbf5cb7Schristos   mdata->header.cputype = BFD_MACH_O_CPU_TYPE_ARM;
658cbf5cb7Schristos   mdata->header.cpusubtype = BFD_MACH_O_CPU_SUBTYPE_ARM_ALL;
668cbf5cb7Schristos   mdata->header.byteorder = BFD_ENDIAN_LITTLE;
678cbf5cb7Schristos   mdata->header.version = 1;
688cbf5cb7Schristos 
694f645668Schristos   return true;
708cbf5cb7Schristos }
718cbf5cb7Schristos 
728cbf5cb7Schristos static reloc_howto_type arm_howto_table[]=
738cbf5cb7Schristos {
748cbf5cb7Schristos   /* 0 */
754f645668Schristos   HOWTO (BFD_RELOC_32, 0, 4, 32, false, 0,
768cbf5cb7Schristos 	 complain_overflow_bitfield,
778cbf5cb7Schristos 	 NULL, "32",
784f645668Schristos 	 false, 0xffffffff, 0xffffffff, false),
794f645668Schristos   HOWTO (BFD_RELOC_16, 0, 2, 16, false, 0,
808cbf5cb7Schristos 	 complain_overflow_bitfield,
818cbf5cb7Schristos 	 NULL, "16",
824f645668Schristos 	 false, 0xffff, 0xffff, false),
834f645668Schristos   HOWTO (BFD_RELOC_8, 0, 1, 8, false, 0,
848cbf5cb7Schristos 	 complain_overflow_bitfield,
858cbf5cb7Schristos 	 NULL, "8",
864f645668Schristos 	 false, 0xff, 0xff, false),
874f645668Schristos   HOWTO (BFD_RELOC_32_PCREL, 0, 4, 32, true, 0,
888cbf5cb7Schristos 	 complain_overflow_bitfield,
898cbf5cb7Schristos 	 NULL, "DISP32",
904f645668Schristos 	 false, 0xffffffff, 0xffffffff, true),
918cbf5cb7Schristos   /* 4 */
924f645668Schristos   HOWTO (BFD_RELOC_16_PCREL, 0, 2, 16, true, 0,
938cbf5cb7Schristos 	 complain_overflow_bitfield,
948cbf5cb7Schristos 	 NULL, "DISP16",
954f645668Schristos 	 false, 0xffff, 0xffff, true),
964f645668Schristos   HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 4, 32, false, 0,
978cbf5cb7Schristos 	 complain_overflow_bitfield,
988cbf5cb7Schristos 	 NULL, "SECTDIFF_32",
994f645668Schristos 	 false, 0xffffffff, 0xffffffff, false),
1004f645668Schristos   HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 4, 32, false, 0,
1018cbf5cb7Schristos 	 complain_overflow_bitfield,
1028cbf5cb7Schristos 	 NULL, "LSECTDIFF_32",
1034f645668Schristos 	 false, 0xffffffff, 0xffffffff, false),
1044f645668Schristos   HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 4, 32, false, 0,
1058cbf5cb7Schristos 	 complain_overflow_bitfield,
1068cbf5cb7Schristos 	 NULL, "PAIR_32",
1074f645668Schristos 	 false, 0xffffffff, 0xffffffff, false),
1088cbf5cb7Schristos   /* 8 */
1094f645668Schristos   HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 16, false, 0,
1108cbf5cb7Schristos 	 complain_overflow_bitfield,
1118cbf5cb7Schristos 	 NULL, "SECTDIFF_16",
1124f645668Schristos 	 false, 0xffff, 0xffff, false),
1134f645668Schristos   HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 16, false, 0,
1148cbf5cb7Schristos 	 complain_overflow_bitfield,
1158cbf5cb7Schristos 	 NULL, "LSECTDIFF_16",
1164f645668Schristos 	 false, 0xffff, 0xffff, false),
1174f645668Schristos   HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, false, 0,
1188cbf5cb7Schristos 	 complain_overflow_bitfield,
1198cbf5cb7Schristos 	 NULL, "PAIR_16",
1204f645668Schristos 	 false, 0xffff, 0xffff, false),
1214f645668Schristos   HOWTO (BFD_RELOC_ARM_PCREL_CALL, 2, 4, 24, true, 0,
1228cbf5cb7Schristos 	 complain_overflow_signed,
1238cbf5cb7Schristos 	 NULL, "BR24",
1244f645668Schristos 	 false, 0x00ffffff, 0x00ffffff, true),
1258cbf5cb7Schristos   /* 12 */
1264f645668Schristos   HOWTO (BFD_RELOC_ARM_MOVW, 0,	4, 16, false, 0,
1278cbf5cb7Schristos 	 complain_overflow_dont,
1288cbf5cb7Schristos 	 NULL, "MOVW",
1294f645668Schristos 	 false, 0x000f0fff, 0x000f0fff, false),
1304f645668Schristos   HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 4, 16, false, 0,
1318cbf5cb7Schristos 	 complain_overflow_bitfield,
1328cbf5cb7Schristos 	 NULL, "PAIR_W",
1334f645668Schristos 	 false, 0x000f0fff, 0x000f0fff, false),
1344f645668Schristos   HOWTO (BFD_RELOC_ARM_MOVT, 0, 4, 16, false, 0,
1358cbf5cb7Schristos 	 complain_overflow_bitfield,
1368cbf5cb7Schristos 	 NULL, "MOVT",
1374f645668Schristos 	 false, 0x000f0fff, 0x000f0fff, false),
1384f645668Schristos   HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 4, 16, false, 0,
1398cbf5cb7Schristos 	 complain_overflow_bitfield,
1408cbf5cb7Schristos 	 NULL, "PAIR_T",
1414f645668Schristos 	 false, 0x000f0fff, 0x000f0fff, false),
1428cbf5cb7Schristos   /* 16 */
1434f645668Schristos   HOWTO (BFD_RELOC_THUMB_PCREL_BLX, 2, 4, 24, true, 0,
1448cbf5cb7Schristos 	 complain_overflow_signed,
1458cbf5cb7Schristos 	 NULL, "TBR22",
1464f645668Schristos 	 false, 0x07ff2fff, 0x07ff2fff, true)
1478cbf5cb7Schristos };
1488cbf5cb7Schristos 
1494f645668Schristos static bool
bfd_mach_o_arm_canonicalize_one_reloc(bfd * abfd,struct mach_o_reloc_info_external * raw,arelent * res,asymbol ** syms,arelent * res_base)1508cbf5cb7Schristos bfd_mach_o_arm_canonicalize_one_reloc (bfd *       abfd,
1518cbf5cb7Schristos 				       struct mach_o_reloc_info_external * raw,
152fc4f4269Schristos 				       arelent *   res,
153fc4f4269Schristos 				       asymbol **  syms,
154fc4f4269Schristos 				       arelent *   res_base)
1558cbf5cb7Schristos {
1568cbf5cb7Schristos   bfd_mach_o_reloc_info reloc;
1578cbf5cb7Schristos 
1588cbf5cb7Schristos   if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms))
1594f645668Schristos     return false;
1608cbf5cb7Schristos 
1618cbf5cb7Schristos   if (reloc.r_scattered)
1628cbf5cb7Schristos     {
1638cbf5cb7Schristos       switch (reloc.r_type)
1648cbf5cb7Schristos 	{
1658cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_PAIR:
166fc4f4269Schristos 	  /* PR 21813: Check for a corrupt PAIR reloc at the start.  */
167fc4f4269Schristos 	  if (res == res_base)
1686f4ced0bSchristos 	    {
1694f645668Schristos 	      _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
1704f645668Schristos 				    "reloc is first reloc"));
1714f645668Schristos 	      return false;
1726f4ced0bSchristos 	    }
1738cbf5cb7Schristos 	  if (reloc.r_length == 2)
1748cbf5cb7Schristos 	    {
1758cbf5cb7Schristos 	      res->howto = &arm_howto_table[7];
1768cbf5cb7Schristos 	      res->address = res[-1].address;
1774f645668Schristos 	      return true;
1788cbf5cb7Schristos 	    }
1798cbf5cb7Schristos 	  else if (reloc.r_length == 1)
1808cbf5cb7Schristos 	    {
1818cbf5cb7Schristos 	      res->howto = &arm_howto_table[10];
1828cbf5cb7Schristos 	      res->address = res[-1].address;
1834f645668Schristos 	      return true;
1848cbf5cb7Schristos 	    }
1854f645668Schristos 	  _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
1864f645668Schristos 				"invalid length: %d"), reloc.r_length);
1874f645668Schristos 	  return false;
188fc4f4269Schristos 
1898cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_SECTDIFF:
1908cbf5cb7Schristos 	  if (reloc.r_length == 2)
1918cbf5cb7Schristos 	    {
1928cbf5cb7Schristos 	      res->howto = &arm_howto_table[5];
1934f645668Schristos 	      return true;
1948cbf5cb7Schristos 	    }
1958cbf5cb7Schristos 	  else if (reloc.r_length == 1)
1968cbf5cb7Schristos 	    {
1978cbf5cb7Schristos 	      res->howto = &arm_howto_table[8];
1984f645668Schristos 	      return true;
1998cbf5cb7Schristos 	    }
2004f645668Schristos 	  _bfd_error_handler (_("malformed mach-o ARM sectdiff reloc: "
2014f645668Schristos 				"invalid length: %d"), reloc.r_length);
2024f645668Schristos 	  return false;
203fc4f4269Schristos 
2048cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_LOCAL_SECTDIFF:
2058cbf5cb7Schristos 	  if (reloc.r_length == 2)
2068cbf5cb7Schristos 	    {
2078cbf5cb7Schristos 	      res->howto = &arm_howto_table[6];
2084f645668Schristos 	      return true;
2098cbf5cb7Schristos 	    }
2108cbf5cb7Schristos 	  else if (reloc.r_length == 1)
2118cbf5cb7Schristos 	    {
2128cbf5cb7Schristos 	      res->howto = &arm_howto_table[9];
2134f645668Schristos 	      return true;
2148cbf5cb7Schristos 	    }
2154f645668Schristos 	  _bfd_error_handler (_("malformed mach-o ARM local sectdiff reloc: "
2164f645668Schristos 				"invalid length: %d"),
2176f4ced0bSchristos 			      reloc.r_length);
2184f645668Schristos 	  return false;
219fc4f4269Schristos 
2208cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_HALF_SECTDIFF:
2218cbf5cb7Schristos 	  switch (reloc.r_length)
2228cbf5cb7Schristos 	    {
2238cbf5cb7Schristos 	    case 2: /* :lower16: for movw arm.  */
2248cbf5cb7Schristos 	      res->howto = &arm_howto_table[12];
2254f645668Schristos 	      return true;
2268cbf5cb7Schristos 	    case 3: /* :upper16: for movt arm.  */
2278cbf5cb7Schristos 	      res->howto = &arm_howto_table[14];
2284f645668Schristos 	      return true;
2298cbf5cb7Schristos 	    }
2304f645668Schristos 	  _bfd_error_handler (_("malformed mach-o ARM half sectdiff reloc: "
2314f645668Schristos 				"invalid length: %d"),
2326f4ced0bSchristos 			      reloc.r_length);
2334f645668Schristos 	  return false;
234fc4f4269Schristos 
2358cbf5cb7Schristos 	default:
236fc4f4269Schristos 	  break;
2378cbf5cb7Schristos 	}
2388cbf5cb7Schristos     }
2398cbf5cb7Schristos   else
2408cbf5cb7Schristos     {
2418cbf5cb7Schristos       switch (reloc.r_type)
2428cbf5cb7Schristos 	{
2438cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_VANILLA:
2448cbf5cb7Schristos 	  switch ((reloc.r_length << 1) | reloc.r_pcrel)
2458cbf5cb7Schristos 	    {
2468cbf5cb7Schristos 	    case 0: /* len = 0, pcrel = 0  */
2478cbf5cb7Schristos 	      res->howto = &arm_howto_table[2];
2484f645668Schristos 	      return true;
2498cbf5cb7Schristos 	    case 2: /* len = 1, pcrel = 0  */
2508cbf5cb7Schristos 	      res->howto = &arm_howto_table[1];
2514f645668Schristos 	      return true;
2528cbf5cb7Schristos 	    case 3: /* len = 1, pcrel = 1  */
2538cbf5cb7Schristos 	      res->howto = &arm_howto_table[4];
2544f645668Schristos 	      return true;
2558cbf5cb7Schristos 	    case 4: /* len = 2, pcrel = 0  */
2568cbf5cb7Schristos 	      res->howto = &arm_howto_table[0];
2574f645668Schristos 	      return true;
2588cbf5cb7Schristos 	    case 5: /* len = 2, pcrel = 1  */
2598cbf5cb7Schristos 	      res->howto = &arm_howto_table[3];
2604f645668Schristos 	      return true;
2618cbf5cb7Schristos 	    default:
2624f645668Schristos 	      _bfd_error_handler (_("malformed mach-o ARM vanilla reloc: "
2634f645668Schristos 				    "invalid length: %d (pcrel: %d)"),
2646f4ced0bSchristos 				  reloc.r_length, reloc.r_pcrel);
2654f645668Schristos 	      return false;
2668cbf5cb7Schristos 	    }
2678cbf5cb7Schristos 	  break;
268fc4f4269Schristos 
2698cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_BR24:
2708cbf5cb7Schristos 	  if (reloc.r_length == 2 && reloc.r_pcrel == 1)
2718cbf5cb7Schristos 	    {
2728cbf5cb7Schristos 	      res->howto = &arm_howto_table[11];
2734f645668Schristos 	      return true;
2748cbf5cb7Schristos 	    }
2758cbf5cb7Schristos 	  break;
276fc4f4269Schristos 
2778cbf5cb7Schristos 	case BFD_MACH_O_THUMB_RELOC_BR22:
2788cbf5cb7Schristos 	  if (reloc.r_length == 2 && reloc.r_pcrel == 1)
2798cbf5cb7Schristos 	    {
2808cbf5cb7Schristos 	      res->howto = &arm_howto_table[16];
2814f645668Schristos 	      return true;
2828cbf5cb7Schristos 	    }
2838cbf5cb7Schristos 	  break;
284fc4f4269Schristos 
2858cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_HALF:
2868cbf5cb7Schristos 	  if (reloc.r_pcrel == 0)
2878cbf5cb7Schristos 	    switch (reloc.r_length)
2888cbf5cb7Schristos 	      {
2898cbf5cb7Schristos 	      case 0: /* :lower16: for movw arm.  */
2908cbf5cb7Schristos 		res->howto = &arm_howto_table[12];
2914f645668Schristos 		return true;
2928cbf5cb7Schristos 	      case 1: /* :upper16: for movt arm.  */
2938cbf5cb7Schristos 		res->howto = &arm_howto_table[14];
2944f645668Schristos 		return true;
2958cbf5cb7Schristos 	      }
296fc4f4269Schristos 	  break;
297fc4f4269Schristos 
2988cbf5cb7Schristos 	case BFD_MACH_O_ARM_RELOC_PAIR:
2994f645668Schristos 	  if (res == res_base)
3004f645668Schristos 	    {
3014f645668Schristos 	      _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
3024f645668Schristos 				    "reloc is first reloc"));
3034f645668Schristos 	      return false;
3044f645668Schristos 	    }
3058cbf5cb7Schristos 	  if (res[-1].howto == &arm_howto_table[12]
3068cbf5cb7Schristos 	      && reloc.r_length == 0)
3078cbf5cb7Schristos 	    {
3088cbf5cb7Schristos 	      /* Pair for :lower16: of movw arm.  */
3098cbf5cb7Schristos 	      res->howto = &arm_howto_table[13];
3108cbf5cb7Schristos 	      /* This reloc contains the other half in its r_address field.  */
3118cbf5cb7Schristos 	      res[-1].addend += (res->address & 0xffff) << 16;
3128cbf5cb7Schristos 	      res->address = res[-1].address;
3134f645668Schristos 	      return true;
3148cbf5cb7Schristos 	    }
3158cbf5cb7Schristos 	  else if (res[-1].howto == &arm_howto_table[14]
3168cbf5cb7Schristos 		   && reloc.r_length == 1)
3178cbf5cb7Schristos 	    {
3188cbf5cb7Schristos 	      /* Pair for :upper16: of movt arm.  */
3198cbf5cb7Schristos 	      res->howto = &arm_howto_table[15];
3208cbf5cb7Schristos 	      /* This reloc contains the other half in its r_address field.  */
3218cbf5cb7Schristos 	      res[-1].addend += res->address & 0xffff;
3228cbf5cb7Schristos 	      res->address = res[-1].address;
3234f645668Schristos 	      return true;
3248cbf5cb7Schristos 	    }
325fc4f4269Schristos 	  break;
326fc4f4269Schristos 
3278cbf5cb7Schristos 	default:
328fc4f4269Schristos 	  break;
329fc4f4269Schristos 	}
330fc4f4269Schristos     }
331fc4f4269Schristos 
3324f645668Schristos   _bfd_error_handler (_("malformed mach-o ARM reloc: "
3334f645668Schristos 			"unknown reloc type: %d"), reloc.r_length);
3344f645668Schristos   return false;
3358cbf5cb7Schristos }
3368cbf5cb7Schristos 
3378cbf5cb7Schristos static reloc_howto_type *
bfd_mach_o_arm_bfd_reloc_type_lookup(bfd * abfd ATTRIBUTE_UNUSED,bfd_reloc_code_real_type code)3388cbf5cb7Schristos bfd_mach_o_arm_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
3398cbf5cb7Schristos 				      bfd_reloc_code_real_type code)
3408cbf5cb7Schristos {
3418cbf5cb7Schristos   unsigned int i;
3428cbf5cb7Schristos 
3438cbf5cb7Schristos   for (i = 0; i < sizeof (arm_howto_table) / sizeof (*arm_howto_table); i++)
3448cbf5cb7Schristos     if (code == arm_howto_table[i].type)
3458cbf5cb7Schristos       return &arm_howto_table[i];
3468cbf5cb7Schristos   return NULL;
3478cbf5cb7Schristos }
3488cbf5cb7Schristos 
3498cbf5cb7Schristos static reloc_howto_type *
bfd_mach_o_arm_bfd_reloc_name_lookup(bfd * abfd ATTRIBUTE_UNUSED,const char * name ATTRIBUTE_UNUSED)3508cbf5cb7Schristos bfd_mach_o_arm_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
3518cbf5cb7Schristos 				      const char *name ATTRIBUTE_UNUSED)
3528cbf5cb7Schristos {
3538cbf5cb7Schristos   return NULL;
3548cbf5cb7Schristos }
3558cbf5cb7Schristos 
3568cbf5cb7Schristos #define TARGET_NAME		arm_mach_o_vec
3578cbf5cb7Schristos #define TARGET_STRING		"mach-o-arm"
3588cbf5cb7Schristos #define TARGET_ARCHITECTURE	bfd_arch_arm
3598cbf5cb7Schristos #define TARGET_PAGESIZE		4096
3608cbf5cb7Schristos #define TARGET_BIG_ENDIAN	0
3618cbf5cb7Schristos #define TARGET_ARCHIVE		0
3628cbf5cb7Schristos #define TARGET_PRIORITY		0
3638cbf5cb7Schristos #include "mach-o-target.c"
364