(linux_test_for_tracefork): Don't leave zombie
[deliverable/binutils-gdb.git] / bfd / i386aout.c
CommitLineData
252b5132 1/* BFD back-end for i386 a.out binaries.
9553c638 2 Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003, 2005
7898deda 3 Free Software Foundation, Inc.
252b5132 4
7920ce38 5 This file is part of BFD, the Binary File Descriptor library.
252b5132 6
7920ce38
NC
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
252b5132 11
7920ce38
NC
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
252b5132 16
7920ce38
NC
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
3e110533 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
252b5132 20
dc810e39 21/* The only 386 aout system we have here is GO32 from DJ.
252b5132
RH
22 These numbers make BFD work with that. If your aout 386 system
23 doesn't work with these, we'll have to split them into different
24 files. Send me (sac@cygnus.com) the runes to make it work on your
25 system, and I'll stick it in for the next release. */
26
7920ce38
NC
27#define N_HEADER_IN_TEXT(x) 0
28#define N_TXTOFF(x) 0x20
29#define N_TXTADDR(x) (N_MAGIC (x) == ZMAGIC ? 0x1020 : 0)
30#define N_TXTSIZE(x) ((x).a_text)
31#define TARGET_PAGE_SIZE 4096
32#define SEGMENT_SIZE 0x400000
33#define DEFAULT_ARCH bfd_arch_i386
252b5132 34
e43d48cc
AM
35/* Do not "beautify" the CONCAT* macro args. Traditional C will not
36 remove whitespace added here, and thus will fail to concatenate
37 the tokens. */
38#define MY(OP) CONCAT2 (i386aout_,OP)
252b5132
RH
39#define TARGETNAME "a.out-i386"
40#define NO_WRITE_HEADER_KLUDGE 1
41
42#include "bfd.h"
43#include "sysdep.h"
44#include "libbfd.h"
45#include "aout/aout64.h"
46#include "libaout.h"
47
48/* Set the machine type correctly. */
49
b34976b6 50static bfd_boolean
7920ce38 51i386aout_write_object_contents (bfd *abfd)
252b5132
RH
52{
53 struct external_exec exec_bytes;
54 struct internal_exec *execp = exec_hdr (abfd);
55
56 N_SET_MACHTYPE (*execp, M_386);
57
58 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
59
60 WRITE_HEADERS (abfd, execp);
61
b34976b6 62 return TRUE;
252b5132
RH
63}
64
7920ce38
NC
65#define MY_write_object_contents i386aout_write_object_contents
66#define MY_backend_data & MY (backend_data)
67
68static const struct aout_backend_data MY (backend_data);
252b5132
RH
69
70#include "aout-target.h"
7920ce38
NC
71
72static const struct aout_backend_data MY (backend_data) =
73{
74 0, /* Zmagic contiguous. */
75 1, /* Text incl header. */
76 0, /* Entry is text address. */
77 0, /* Exec_hdr_flags. */
78 0, /* Text vma? */
79 MY (set_sizes),
80 1, /* Exec header not counted. */
81 0, /* Add_dynamic_symbols. */
82 0, /* Add_one_symbol. */
83 0, /* Link_dynamic_object. */
84 0, /* Write_dynamic_symbol. */
85 0, /* Check_dynamic_reloc. */
86 0 /* Finish_dynamic_link. */
87};
This page took 0.344869 seconds and 4 git commands to generate.