133965Sjdp/* BFD back-end for i386 a.out binaries under BSD.
2218822Sdim   Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2007
389857Sobrien   Free Software Foundation, Inc.
433965Sjdp
533965SjdpThis file is part of BFD, the Binary File Descriptor library.
633965Sjdp
733965SjdpThis program is free software; you can redistribute it and/or modify
833965Sjdpit under the terms of the GNU General Public License as published by
933965Sjdpthe Free Software Foundation; either version 2 of the License, or
1033965Sjdp(at your option) any later version.
1133965Sjdp
1233965SjdpThis program is distributed in the hope that it will be useful,
1333965Sjdpbut WITHOUT ANY WARRANTY; without even the implied warranty of
1433965SjdpMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1533965SjdpGNU General Public License for more details.
1633965Sjdp
1733965SjdpYou should have received a copy of the GNU General Public License
1833965Sjdpalong with this program; if not, write to the Free Software
19218822SdimFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
2033965Sjdp
2133965Sjdp/* This data should be correct for the format used under all the various
2233965Sjdp   BSD ports for 386 machines.  */
2333965Sjdp
2433965Sjdp#define	BYTES_IN_WORD	4
2533965Sjdp
2633965Sjdp/* ZMAGIC files never have the header in the text.  */
2733965Sjdp#define	N_HEADER_IN_TEXT(x)	0
2833965Sjdp
2933965Sjdp/* ZMAGIC files start at address 0.  This does not apply to QMAGIC.  */
3033965Sjdp#define TEXT_START_ADDR 0
3133965Sjdp#define N_SHARED_LIB(x) 0
3233965Sjdp
3333965Sjdp#define	TARGET_PAGE_SIZE	4096
3433965Sjdp#define	SEGMENT_SIZE	TARGET_PAGE_SIZE
3533965Sjdp
3633965Sjdp#define	DEFAULT_ARCH	bfd_arch_i386
3733965Sjdp#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
3833965Sjdp
3989857Sobrien/* Do not "beautify" the CONCAT* macro args.  Traditional C will not
4089857Sobrien   remove whitespace added here, and thus will fail to concatenate
4189857Sobrien   the tokens.  */
4289857Sobrien#define MY(OP) CONCAT2 (i386bsd_,OP)
4333965Sjdp#define TARGETNAME "a.out-i386-bsd"
4433965Sjdp
45218822Sdim#include "sysdep.h"
4633965Sjdp#include "bfd.h"
4733965Sjdp#include "libbfd.h"
4833965Sjdp#include "libaout.h"
4933965Sjdp
5033965Sjdp#include "aout-target.h"
51