OLD | NEW |
1 /* BFD back-end for linux flavored i386 a.out binaries. | 1 /* BFD back-end for linux flavored i386 a.out binaries. |
2 Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, | 2 Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, |
3 2004, 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. | 3 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 |
| 4 Free Software Foundation, Inc. |
4 | 5 |
5 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
6 | 7 |
7 This program is free software; you can redistribute it and/or modify | 8 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 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 11 (at your option) any later version. |
11 | 12 |
12 This program is distributed in the hope that it will be useful, | 13 This program is distributed in the hope that it will be useful, |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 28 matching lines...) Expand all Loading... |
42 #define MY(OP) CONCAT2 (i386linux_,OP) | 43 #define MY(OP) CONCAT2 (i386linux_,OP) |
43 #define TARGETNAME "a.out-i386-linux" | 44 #define TARGETNAME "a.out-i386-linux" |
44 | 45 |
45 extern const bfd_target MY(vec); | 46 extern const bfd_target MY(vec); |
46 | 47 |
47 /* We always generate QMAGIC files in preference to ZMAGIC files. It | 48 /* We always generate QMAGIC files in preference to ZMAGIC files. It |
48 would be possible to make this a linker option, if that ever | 49 would be possible to make this a linker option, if that ever |
49 becomes important. */ | 50 becomes important. */ |
50 | 51 |
51 static void MY_final_link_callback | 52 static void MY_final_link_callback |
52 PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *)); | 53 (bfd *, file_ptr *, file_ptr *, file_ptr *); |
53 static bfd_boolean i386linux_bfd_final_link | 54 static bfd_boolean i386linux_bfd_final_link |
54 PARAMS ((bfd *, struct bfd_link_info *)); | 55 (bfd *, struct bfd_link_info *); |
55 static bfd_boolean i386linux_write_object_contents PARAMS ((bfd *)); | 56 static bfd_boolean i386linux_write_object_contents (bfd *); |
56 | 57 |
57 static bfd_boolean | 58 static bfd_boolean |
58 i386linux_bfd_final_link (abfd, info) | 59 i386linux_bfd_final_link (bfd *abfd, struct bfd_link_info *info) |
59 bfd *abfd; | |
60 struct bfd_link_info *info; | |
61 { | 60 { |
62 obj_aout_subformat (abfd) = q_magic_format; | 61 obj_aout_subformat (abfd) = q_magic_format; |
63 return NAME(aout,final_link) (abfd, info, MY_final_link_callback); | 62 return NAME(aout,final_link) (abfd, info, MY_final_link_callback); |
64 } | 63 } |
65 | 64 |
66 #define MY_bfd_final_link i386linux_bfd_final_link | 65 #define MY_bfd_final_link i386linux_bfd_final_link |
67 | 66 |
68 /* Set the machine type correctly. */ | 67 /* Set the machine type correctly. */ |
69 | 68 |
70 static bfd_boolean | 69 static bfd_boolean |
71 i386linux_write_object_contents (abfd) | 70 i386linux_write_object_contents (bfd *abfd) |
72 bfd *abfd; | |
73 { | 71 { |
74 struct external_exec exec_bytes; | 72 struct external_exec exec_bytes; |
75 struct internal_exec *execp = exec_hdr (abfd); | 73 struct internal_exec *execp = exec_hdr (abfd); |
76 | 74 |
77 N_SET_MACHTYPE (*execp, M_386); | 75 N_SET_MACHTYPE (*execp, M_386); |
78 | 76 |
79 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; | 77 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; |
80 | 78 |
81 WRITE_HEADERS(abfd, execp); | 79 WRITE_HEADERS(abfd, execp); |
82 | 80 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 157 |
160 /* First dynamic object found in link. */ | 158 /* First dynamic object found in link. */ |
161 bfd *dynobj; | 159 bfd *dynobj; |
162 | 160 |
163 /* Number of fixups. */ | 161 /* Number of fixups. */ |
164 size_t fixup_count; | 162 size_t fixup_count; |
165 | 163 |
166 /* Number of builtin fixups. */ | 164 /* Number of builtin fixups. */ |
167 size_t local_builtins; | 165 size_t local_builtins; |
168 | 166 |
error: old chunk mismatch |
None
OLD | NEW |