19573673dSchristos /* BFD support for the NDS32 processor 2*cb63e24eSchristos Copyright (C) 2012-2024 Free Software Foundation, Inc. 39573673dSchristos Contributed by Andes Technology Corporation. 49573673dSchristos 59573673dSchristos This file is part of BFD, the Binary File Descriptor library. 69573673dSchristos 79573673dSchristos This program is free software; you can redistribute it and/or modify 89573673dSchristos it under the terms of the GNU General Public License as published by 99573673dSchristos the Free Software Foundation; either version 3 of the License, or 109573673dSchristos (at your option) any later version. 119573673dSchristos 129573673dSchristos This program is distributed in the hope that it will be useful, 139573673dSchristos but WITHOUT ANY WARRANTY; without even the implied warranty of 149573673dSchristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 159573673dSchristos GNU General Public License for more details. 169573673dSchristos 179573673dSchristos You should have received a copy of the GNU General Public License 189573673dSchristos along with this program; if not, write to the Free Software 199573673dSchristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 209573673dSchristos 02110-1301, USA. */ 219573673dSchristos 229573673dSchristos #include "sysdep.h" 239573673dSchristos #include "bfd.h" 249573673dSchristos #include "libbfd.h" 259573673dSchristos #include "elf-bfd.h" 269573673dSchristos 279573673dSchristos #define N(number, print, default, next) \ 289573673dSchristos {32, 32, 8, bfd_arch_nds32, number, "nds32", print, 4, default, \ 296f4ced0bSchristos bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next, 0 } 309573673dSchristos 319573673dSchristos #define NEXT &arch_info_struct[0] 329573673dSchristos #define NDS32V2_NEXT &arch_info_struct[1] 339573673dSchristos #define NDS32V3_NEXT &arch_info_struct[2] 349573673dSchristos #define NDS32V3M_NEXT &arch_info_struct[3] 359573673dSchristos 369573673dSchristos static const bfd_arch_info_type arch_info_struct[] = 379573673dSchristos { 384f645668Schristos N (bfd_mach_n1h, "n1h", false, NDS32V2_NEXT), 394f645668Schristos N (bfd_mach_n1h_v2, "n1h_v2", false, NDS32V3_NEXT), 404f645668Schristos N (bfd_mach_n1h_v3, "n1h_v3", false, NDS32V3M_NEXT), 414f645668Schristos N (bfd_mach_n1h_v3m, "n1h_v3m", false, NULL), 429573673dSchristos }; 439573673dSchristos 449573673dSchristos const bfd_arch_info_type bfd_nds32_arch = 454f645668Schristos N (bfd_mach_n1, "n1", true, NEXT); 46