xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/ns32knetbsd.c (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* BFD back-end for NetBSD/ns32k a.out-ish binaries.
2*e992f068Schristos    Copyright (C) 1990-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
575fd0b74Schristos 
675fd0b74Schristos    This program is free software; you can redistribute it and/or modify
775fd0b74Schristos    it under the terms of the GNU General Public License as published by
875fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
975fd0b74Schristos    (at your option) any later version.
1075fd0b74Schristos 
1175fd0b74Schristos    This program is distributed in the hope that it will be useful,
1275fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1475fd0b74Schristos    GNU General Public License for more details.
1575fd0b74Schristos 
1675fd0b74Schristos    You should have received a copy of the GNU General Public License
1775fd0b74Schristos    along with this program; if not, write to the Free Software
1875fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
1975fd0b74Schristos    MA 02110-1301, USA.  */
2075fd0b74Schristos 
2175fd0b74Schristos #define	BYTES_IN_WORD		4
2275fd0b74Schristos #undef TARGET_IS_BIG_ENDIAN_P
2375fd0b74Schristos 
2475fd0b74Schristos #define	TARGET_PAGE_SIZE	4096
2575fd0b74Schristos #define	SEGMENT_SIZE		4096
2675fd0b74Schristos 
2775fd0b74Schristos #define	DEFAULT_ARCH		bfd_arch_ns32k
2875fd0b74Schristos #define	DEFAULT_MID		M_532_NETBSD
2975fd0b74Schristos 
3075fd0b74Schristos /* Do not "beautify" the CONCAT* macro args.  Traditional C will not
3175fd0b74Schristos    remove whitespace added here, and thus will fail to concatenate
3275fd0b74Schristos    the tokens.  */
3375fd0b74Schristos #define MY(OP) CONCAT2 (ns32k_aout_pc532nbsd_,OP)
3475fd0b74Schristos 
3575fd0b74Schristos #define NAME(x,y) CONCAT3 (ns32kaout,_32_,y)
3675fd0b74Schristos 
3775fd0b74Schristos /* This needs to start with a.out so GDB knows it is an a.out variant.  */
3875fd0b74Schristos #define TARGETNAME "a.out-ns32k-netbsd"
3975fd0b74Schristos 
4075fd0b74Schristos #define ns32kaout_32_get_section_contents aout_32_get_section_contents
4175fd0b74Schristos 
4275fd0b74Schristos #define MY_text_includes_header 1
4375fd0b74Schristos 
4475fd0b74Schristos /* We can`t use the MYNS macro here for cpp reasons too subtle
4575fd0b74Schristos    for me -- IWD.  */
4675fd0b74Schristos #define MY_bfd_reloc_type_lookup ns32k_aout_bfd_reloc_type_lookup
4775fd0b74Schristos 
4875fd0b74Schristos #include "sysdep.h"
4975fd0b74Schristos #include "bfd.h"		/* To ensure following declaration is OK.  */
5075fd0b74Schristos 
51012573ebSchristos reloc_howto_type * MY_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
5275fd0b74Schristos 
5375fd0b74Schristos #include "netbsd.h"
54