* libaout.h (struct aoutdata): Add q_magic_format to subformat
[external/binutils.git] / bfd / i386linux.c
1 /* BFD back-end for linux flavored i386 a.out binaries.
2    Copyright (C) 1990, 1991 Free Software Foundation, Inc.
3 This file is part of BFD, the Binary File Descriptor library.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
15
16 #define PAGE_SIZE       4096
17 #define ZMAGIC_DISK_BLOCK_SIZE 1024
18 #define SEGMENT_SIZE    4096
19 #define TEXT_START_ADDR 0x0
20 #define N_SHARED_LIB(x) 0
21 #define ARCH 32
22 #define BYTES_IN_WORD 4
23
24 #include "bfd.h"
25 #include "sysdep.h"
26 #include "libbfd.h"
27 #include "aout/aout64.h"
28 #include "aout/stab_gnu.h"
29 #include "aout/ar.h"
30 #include "libaout.h"           /* BFD a.out internal data structures */
31
32 #define DEFAULT_ARCH bfd_arch_i386
33 #define MY(OP) CAT(i386linux_,OP)
34 #define MY_text_includes_header 1
35 #define TARGETNAME "a.out-i386-linux"
36
37 /* We always generate QMAGIC files in preference to ZMAGIC files.  It
38    would be possible to make this a linker option, if that ever
39    becomes important.  */
40
41 static void MY_final_link_callback
42   PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
43
44 static boolean
45 i386linux_bfd_final_link (abfd, info)
46      bfd *abfd;
47      struct bfd_link_info *info;
48 {
49   obj_aout_subformat (abfd) = q_magic_format;
50   return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
51 }
52
53 #define MY_bfd_final_link i386linux_bfd_final_link
54
55 #include "aout-target.h"