source: trunk/src/binutils/bfd/host-aout.c@ 657

Last change on this file since 657 was 618, checked in by bird, 22 years ago

Joined the port of 2.11.2 with 2.14.

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.7 KB
Line 
1/* BFD backend for local host's a.out binaries
2 Copyright 1990, 1991, 1992, 1994, 1995, 2001
3 Free Software Foundation, Inc.
4 Written by Cygnus Support. Probably John Gilmore's fault.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
22#include "bfd.h"
23#include "sysdep.h"
24#include "libbfd.h"
25
26#define ARCH_SIZE 32
27
28/* When porting to a new system, you must supply:
29
30 HOST_PAGE_SIZE (optional)
31 HOST_SEGMENT_SIZE (optional -- defaults to page size)
32 HOST_MACHINE_ARCH (optional)
33 HOST_MACHINE_MACHINE (optional)
34 HOST_TEXT_START_ADDR (optional)
35 HOST_STACK_END_ADDR (not used, except by trad-core ???)
36 HOST_BIG_ENDIAN_P (required -- define if big-endian)
37
38 in the ./hosts/h-systemname.h file. */
39
40#ifndef __EMX__ /* r=bird: Code was initially removed. Is this __EMX__ or EMX
41 * and why don't we include it? anything to do with sysdep.h? */
42#ifdef TRAD_HEADER
43#include TRAD_HEADER
44#endif
45#endif /* !__EMX__ */
46
47#ifdef HOST_PAGE_SIZE
48#define TARGET_PAGE_SIZE HOST_PAGE_SIZE
49#endif
50
51#ifdef HOST_SEGMENT_SIZE
52#define SEGMENT_SIZE HOST_SEGMENT_SIZE
53#else
54#define SEGMENT_SIZE TARGET_PAGE_SIZE
55#endif
56
57#ifdef HOST_TEXT_START_ADDR
58#define TEXT_START_ADDR HOST_TEXT_START_ADDR
59#endif
60
61#ifdef HOST_STACK_END_ADDR
62#define STACK_END_ADDR HOST_STACK_END_ADDR
63#endif
64
65#ifdef HOST_BIG_ENDIAN_P
66#define TARGET_IS_BIG_ENDIAN_P
67#else
68#undef TARGET_IS_BIG_ENDIAN_P
69#endif
70
71#include "libaout.h" /* BFD a.out internal data structures */
72#include "aout/aout64.h"
73
74#ifdef HOST_MACHINE_ARCH
75#ifdef HOST_MACHINE_MACHINE
76#define SET_ARCH_MACH(abfd, execp) \
77 bfd_default_set_arch_mach(abfd, HOST_MACHINE_ARCH, HOST_MACHINE_MACHINE)
78#else
79#define SET_ARCH_MACH(abfd, execp) \
80 bfd_default_set_arch_mach(abfd, HOST_MACHINE_ARCH, 0)
81#endif
82#endif /* HOST_MACHINE_ARCH */
83
84/* Do not "beautify" the CONCAT* macro args. Traditional C will not
85 remove whitespace added here, and thus will fail to concatenate
86 the tokens. */
87#define MY(OP) CONCAT2 (host_aout_,OP)
88#define TARGETNAME "a.out"
89
90#include "aout-target.h"
Note: See TracBrowser for help on using the repository browser.