/src/binutils-gdb/bfd/coffswap.h
Line | Count | Source |
1 | | /* Generic COFF swapping routines, for BFD. |
2 | | Copyright (C) 1990-2026 Free Software Foundation, Inc. |
3 | | Written by Cygnus Support. |
4 | | |
5 | | This file is part of BFD, the Binary File Descriptor library. |
6 | | |
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 3 of the License, or |
10 | | (at your option) any later version. |
11 | | |
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. |
16 | | |
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 |
19 | | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
20 | | MA 02110-1301, USA. */ |
21 | | |
22 | | /* This file contains routines used to swap COFF data. It is a header |
23 | | file because the details of swapping depend on the details of the |
24 | | structures used by each COFF implementation. This is included by |
25 | | coffcode.h, as well as by the ECOFF backend. |
26 | | |
27 | | Any file which uses this must first include "coff/internal.h" and |
28 | | "coff/CPU.h". The functions will then be correct for that CPU. */ |
29 | | |
30 | | #ifndef GET_FCN_LNNOPTR |
31 | | #define GET_FCN_LNNOPTR(abfd, ext) \ |
32 | 196k | H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) |
33 | | #endif |
34 | | |
35 | | #ifndef GET_FCN_ENDNDX |
36 | | #define GET_FCN_ENDNDX(abfd, ext) \ |
37 | 196k | H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_endndx) |
38 | | #endif |
39 | | |
40 | | #ifndef PUT_FCN_LNNOPTR |
41 | | #define PUT_FCN_LNNOPTR(abfd, in, ext) \ |
42 | 666 | H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) |
43 | | #endif |
44 | | #ifndef PUT_FCN_ENDNDX |
45 | | #define PUT_FCN_ENDNDX(abfd, in, ext) \ |
46 | 666 | H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_endndx) |
47 | | #endif |
48 | | #ifndef GET_LNSZ_LNNO |
49 | | #define GET_LNSZ_LNNO(abfd, ext) \ |
50 | 482k | H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno) |
51 | | #endif |
52 | | #ifndef GET_LNSZ_SIZE |
53 | | #define GET_LNSZ_SIZE(abfd, ext) \ |
54 | 437k | H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) |
55 | | #endif |
56 | | #ifndef PUT_LNSZ_LNNO |
57 | | #define PUT_LNSZ_LNNO(abfd, in, ext) \ |
58 | 854 | H_PUT_16 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno) |
59 | | #endif |
60 | | #ifndef PUT_LNSZ_SIZE |
61 | | #define PUT_LNSZ_SIZE(abfd, in, ext) \ |
62 | 672 | H_PUT_16 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size) |
63 | | #endif |
64 | | #ifndef GET_SCN_SCNLEN |
65 | | #define GET_SCN_SCNLEN(abfd, ext) \ |
66 | 19.9k | H_GET_32 (abfd, ext->x_scn.x_scnlen) |
67 | | #endif |
68 | | #ifndef GET_SCN_NRELOC |
69 | | #define GET_SCN_NRELOC(abfd, ext) \ |
70 | 21.6k | H_GET_16 (abfd, ext->x_scn.x_nreloc) |
71 | | #endif |
72 | | #ifndef GET_SCN_NLINNO |
73 | | #define GET_SCN_NLINNO(abfd, ext) \ |
74 | 21.6k | H_GET_16 (abfd, ext->x_scn.x_nlinno) |
75 | | #endif |
76 | | #ifndef PUT_SCN_SCNLEN |
77 | | #define PUT_SCN_SCNLEN(abfd, in, ext) \ |
78 | 7 | H_PUT_32 (abfd, in, ext->x_scn.x_scnlen) |
79 | | #endif |
80 | | #ifndef PUT_SCN_NRELOC |
81 | | #define PUT_SCN_NRELOC(abfd, in, ext) \ |
82 | 14 | H_PUT_16 (abfd, in, ext->x_scn.x_nreloc) |
83 | | #endif |
84 | | #ifndef PUT_SCN_NLINNO |
85 | | #define PUT_SCN_NLINNO(abfd, in, ext) \ |
86 | 14 | H_PUT_16 (abfd, in, ext->x_scn.x_nlinno) |
87 | | #endif |
88 | | #ifndef GET_LINENO_LNNO |
89 | | #define GET_LINENO_LNNO(abfd, ext) \ |
90 | 116k | H_GET_16 (abfd, ext->l_lnno); |
91 | | #endif |
92 | | #ifndef PUT_LINENO_LNNO |
93 | | #define PUT_LINENO_LNNO(abfd, val, ext) \ |
94 | 0 | H_PUT_16 (abfd, val, ext->l_lnno); |
95 | | #endif |
96 | | |
97 | | /* The f_symptr field in the filehdr is sometimes 64 bits. */ |
98 | | #ifndef GET_FILEHDR_SYMPTR |
99 | 3.53M | #define GET_FILEHDR_SYMPTR H_GET_32 |
100 | | #endif |
101 | | #ifndef PUT_FILEHDR_SYMPTR |
102 | 718 | #define PUT_FILEHDR_SYMPTR H_PUT_32 |
103 | | #endif |
104 | | |
105 | | /* Some fields in the aouthdr are sometimes 64 bits. */ |
106 | | #ifndef GET_AOUTHDR_TSIZE |
107 | 10.9k | #define GET_AOUTHDR_TSIZE H_GET_32 |
108 | | #endif |
109 | | #ifndef PUT_AOUTHDR_TSIZE |
110 | 385 | #define PUT_AOUTHDR_TSIZE H_PUT_32 |
111 | | #endif |
112 | | #ifndef GET_AOUTHDR_DSIZE |
113 | 10.9k | #define GET_AOUTHDR_DSIZE H_GET_32 |
114 | | #endif |
115 | | #ifndef PUT_AOUTHDR_DSIZE |
116 | 385 | #define PUT_AOUTHDR_DSIZE H_PUT_32 |
117 | | #endif |
118 | | #ifndef GET_AOUTHDR_BSIZE |
119 | 10.9k | #define GET_AOUTHDR_BSIZE H_GET_32 |
120 | | #endif |
121 | | #ifndef PUT_AOUTHDR_BSIZE |
122 | 385 | #define PUT_AOUTHDR_BSIZE H_PUT_32 |
123 | | #endif |
124 | | #ifndef GET_AOUTHDR_ENTRY |
125 | 10.9k | #define GET_AOUTHDR_ENTRY H_GET_32 |
126 | | #endif |
127 | | #ifndef PUT_AOUTHDR_ENTRY |
128 | 385 | #define PUT_AOUTHDR_ENTRY H_PUT_32 |
129 | | #endif |
130 | | #ifndef GET_AOUTHDR_TEXT_START |
131 | 10.9k | #define GET_AOUTHDR_TEXT_START H_GET_32 |
132 | | #endif |
133 | | #ifndef PUT_AOUTHDR_TEXT_START |
134 | 385 | #define PUT_AOUTHDR_TEXT_START H_PUT_32 |
135 | | #endif |
136 | | #ifndef GET_AOUTHDR_DATA_START |
137 | 10.9k | #define GET_AOUTHDR_DATA_START H_GET_32 |
138 | | #endif |
139 | | #ifndef PUT_AOUTHDR_DATA_START |
140 | 385 | #define PUT_AOUTHDR_DATA_START H_PUT_32 |
141 | | #endif |
142 | | |
143 | | /* Some fields in the scnhdr are sometimes 64 bits. */ |
144 | | #ifndef GET_SCNHDR_PADDR |
145 | 1.25M | #define GET_SCNHDR_PADDR H_GET_32 |
146 | | #endif |
147 | | #ifndef PUT_SCNHDR_PADDR |
148 | 1.52k | #define PUT_SCNHDR_PADDR H_PUT_32 |
149 | | #endif |
150 | | #ifndef GET_SCNHDR_VADDR |
151 | 1.25M | #define GET_SCNHDR_VADDR H_GET_32 |
152 | | #endif |
153 | | #ifndef PUT_SCNHDR_VADDR |
154 | 1.52k | #define PUT_SCNHDR_VADDR H_PUT_32 |
155 | | #endif |
156 | | #ifndef GET_SCNHDR_SIZE |
157 | 1.16M | #define GET_SCNHDR_SIZE H_GET_32 |
158 | | #endif |
159 | | #ifndef PUT_SCNHDR_SIZE |
160 | 1.40k | #define PUT_SCNHDR_SIZE H_PUT_32 |
161 | | #endif |
162 | | #ifndef GET_SCNHDR_SCNPTR |
163 | 1.25M | #define GET_SCNHDR_SCNPTR H_GET_32 |
164 | | #endif |
165 | | #ifndef PUT_SCNHDR_SCNPTR |
166 | 1.52k | #define PUT_SCNHDR_SCNPTR H_PUT_32 |
167 | | #endif |
168 | | #ifndef GET_SCNHDR_RELPTR |
169 | 1.25M | #define GET_SCNHDR_RELPTR H_GET_32 |
170 | | #endif |
171 | | #ifndef PUT_SCNHDR_RELPTR |
172 | 1.52k | #define PUT_SCNHDR_RELPTR H_PUT_32 |
173 | | #endif |
174 | | #ifndef GET_SCNHDR_LNNOPTR |
175 | 1.25M | #define GET_SCNHDR_LNNOPTR H_GET_32 |
176 | | #endif |
177 | | #ifndef PUT_SCNHDR_LNNOPTR |
178 | 1.52k | #define PUT_SCNHDR_LNNOPTR H_PUT_32 |
179 | | #endif |
180 | | #ifndef GET_SCNHDR_NRELOC |
181 | 1.18M | #define GET_SCNHDR_NRELOC H_GET_16 |
182 | | #endif |
183 | | #ifndef MAX_SCNHDR_NRELOC |
184 | 1.58k | #define MAX_SCNHDR_NRELOC 0xffff |
185 | | #endif |
186 | | #ifndef PUT_SCNHDR_NRELOC |
187 | 1.46k | #define PUT_SCNHDR_NRELOC H_PUT_16 |
188 | | #endif |
189 | | #ifndef GET_SCNHDR_NLNNO |
190 | 1.18M | #define GET_SCNHDR_NLNNO H_GET_16 |
191 | | #endif |
192 | | #ifndef MAX_SCNHDR_NLNNO |
193 | 1.58k | #define MAX_SCNHDR_NLNNO 0xffff |
194 | | #endif |
195 | | #ifndef PUT_SCNHDR_NLNNO |
196 | 1.46k | #define PUT_SCNHDR_NLNNO H_PUT_16 |
197 | | #endif |
198 | | #ifndef GET_SCNHDR_FLAGS |
199 | 1.23M | #define GET_SCNHDR_FLAGS H_GET_32 |
200 | | #endif |
201 | | #ifndef PUT_SCNHDR_FLAGS |
202 | 1.53k | #define PUT_SCNHDR_FLAGS H_PUT_32 |
203 | | #endif |
204 | | |
205 | | #ifndef GET_RELOC_VADDR |
206 | 18.0k | #define GET_RELOC_VADDR H_GET_32 |
207 | | #endif |
208 | | #ifndef PUT_RELOC_VADDR |
209 | 3 | #define PUT_RELOC_VADDR H_PUT_32 |
210 | | #endif |
211 | | |
212 | | #ifndef NO_COFF_RELOCS |
213 | | |
214 | | static void |
215 | | coff_swap_reloc_in (bfd * abfd, void * src, void * dst) |
216 | 17.6k | { |
217 | 17.6k | RELOC *reloc_src = src; |
218 | 17.6k | struct internal_reloc *reloc_dst = dst; |
219 | | |
220 | 17.6k | memset (reloc_dst, 0, sizeof (*reloc_dst)); |
221 | 17.6k | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); |
222 | 17.6k | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); |
223 | 17.6k | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); |
224 | | |
225 | | #ifdef SWAP_IN_RELOC_OFFSET |
226 | 5.66k | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); |
227 | | #endif |
228 | 17.6k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in coff-go32.c:coff_swap_reloc_in Line | Count | Source | 216 | 4.87k | { | 217 | 4.87k | RELOC *reloc_src = src; | 218 | 4.87k | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 4.87k | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 4.87k | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 4.87k | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 4.87k | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | | #ifdef SWAP_IN_RELOC_OFFSET | 226 | | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | | #endif | 228 | 4.87k | } |
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in coff-sh.c:coff_swap_reloc_in Line | Count | Source | 216 | 736 | { | 217 | 736 | RELOC *reloc_src = src; | 218 | 736 | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 736 | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 736 | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 736 | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 736 | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | 736 | #ifdef SWAP_IN_RELOC_OFFSET | 226 | 736 | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | 736 | #endif | 228 | 736 | } |
coff-stgo32.c:coff_swap_reloc_in Line | Count | Source | 216 | 7.15k | { | 217 | 7.15k | RELOC *reloc_src = src; | 218 | 7.15k | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 7.15k | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 7.15k | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 7.15k | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 7.15k | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | | #ifdef SWAP_IN_RELOC_OFFSET | 226 | | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | | #endif | 228 | 7.15k | } |
coff-tic30.c:coff_swap_reloc_in Line | Count | Source | 216 | 3.71k | { | 217 | 3.71k | RELOC *reloc_src = src; | 218 | 3.71k | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 3.71k | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 3.71k | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 3.71k | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 3.71k | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | 3.71k | #ifdef SWAP_IN_RELOC_OFFSET | 226 | 3.71k | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | 3.71k | #endif | 228 | 3.71k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_in Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_in coff-z80.c:coff_swap_reloc_in Line | Count | Source | 216 | 962 | { | 217 | 962 | RELOC *reloc_src = src; | 218 | 962 | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 962 | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 962 | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 962 | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 962 | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | 962 | #ifdef SWAP_IN_RELOC_OFFSET | 226 | 962 | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | 962 | #endif | 228 | 962 | } |
coff-z8k.c:coff_swap_reloc_in Line | Count | Source | 216 | 258 | { | 217 | 258 | RELOC *reloc_src = src; | 218 | 258 | struct internal_reloc *reloc_dst = dst; | 219 | | | 220 | 258 | memset (reloc_dst, 0, sizeof (*reloc_dst)); | 221 | 258 | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 222 | 258 | reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); | 223 | 258 | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 224 | | | 225 | 258 | #ifdef SWAP_IN_RELOC_OFFSET | 226 | 258 | reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); | 227 | 258 | #endif | 228 | 258 | } |
|
229 | | |
230 | | static unsigned int |
231 | | coff_swap_reloc_out (bfd * abfd, void * src, void * dst) |
232 | 3 | { |
233 | 3 | struct internal_reloc *reloc_src = (struct internal_reloc *) src; |
234 | 3 | struct external_reloc *reloc_dst = (struct external_reloc *) dst; |
235 | | |
236 | 3 | PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr); |
237 | 3 | H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx); |
238 | 3 | H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type); |
239 | | |
240 | | #ifdef SWAP_OUT_RELOC_OFFSET |
241 | 3 | SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset); |
242 | | #endif |
243 | | #ifdef SWAP_OUT_RELOC_EXTRA |
244 | 3 | SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst); |
245 | | #endif |
246 | | |
247 | 3 | return bfd_coff_relsz (abfd); |
248 | 3 | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out coff-z80.c:coff_swap_reloc_out Line | Count | Source | 232 | 3 | { | 233 | 3 | struct internal_reloc *reloc_src = (struct internal_reloc *) src; | 234 | 3 | struct external_reloc *reloc_dst = (struct external_reloc *) dst; | 235 | | | 236 | 3 | PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr); | 237 | 3 | H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx); | 238 | 3 | H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type); | 239 | | | 240 | 3 | #ifdef SWAP_OUT_RELOC_OFFSET | 241 | 3 | SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset); | 242 | 3 | #endif | 243 | 3 | #ifdef SWAP_OUT_RELOC_EXTRA | 244 | 3 | SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst); | 245 | 3 | #endif | 246 | | | 247 | 3 | return bfd_coff_relsz (abfd); | 248 | 3 | } |
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out |
249 | | |
250 | | #ifdef TICOFF |
251 | | static void |
252 | | coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst) |
253 | 309 | { |
254 | 309 | struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src; |
255 | 309 | struct internal_reloc *reloc_dst = (struct internal_reloc *) dst; |
256 | | |
257 | 309 | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); |
258 | 309 | reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx); |
259 | 309 | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); |
260 | 309 | } Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in coff-tic54x.c:coff_swap_reloc_v0_in Line | Count | Source | 253 | 309 | { | 254 | 309 | struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src; | 255 | 309 | struct internal_reloc *reloc_dst = (struct internal_reloc *) dst; | 256 | | | 257 | 309 | reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); | 258 | 309 | reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx); | 259 | 309 | reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); | 260 | 309 | } |
|
261 | | |
262 | | static unsigned int |
263 | | coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst) |
264 | 0 | { |
265 | 0 | struct internal_reloc *reloc_src = (struct internal_reloc *) src; |
266 | 0 | struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst; |
267 | |
|
268 | 0 | PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr); |
269 | 0 | H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx); |
270 | 0 | H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type); |
271 | 0 | SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst); |
272 | |
|
273 | 0 | return bfd_coff_relsz (abfd); |
274 | 0 | } Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out |
275 | | #endif |
276 | | |
277 | | #endif /* NO_COFF_RELOCS */ |
278 | | |
279 | | static void |
280 | | coff_swap_filehdr_in (bfd * abfd, void * src, void * dst) |
281 | 4.01M | { |
282 | 4.01M | FILHDR *filehdr_src = (FILHDR *) src; |
283 | 4.01M | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; |
284 | | |
285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE |
286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); |
287 | | #endif |
288 | 4.01M | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); |
289 | 4.01M | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); |
290 | 4.01M | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); |
291 | 4.01M | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); |
292 | 4.01M | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); |
293 | 4.01M | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); |
294 | 4.01M | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); |
295 | | |
296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST |
297 | 1.12M | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); |
298 | | #endif |
299 | 4.01M | } coff-alpha.c:alpha_ecoff_swap_filehdr_in Line | Count | Source | 281 | 187k | { | 282 | 187k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 187k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 187k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 187k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 187k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 187k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 187k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 187k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 187k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 187k | } |
coff64-rs6000.c:coff_swap_filehdr_in Line | Count | Source | 281 | 292k | { | 282 | 292k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 292k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 292k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 292k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 292k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 292k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 292k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 292k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 292k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 292k | } |
cf-i386lynx.c:coff_swap_filehdr_in Line | Count | Source | 281 | 217k | { | 282 | 217k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 217k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 217k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 217k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 217k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 217k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 217k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 217k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 217k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 217k | } |
coff-go32.c:coff_swap_filehdr_in Line | Count | Source | 281 | 217k | { | 282 | 217k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 217k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 217k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 217k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 217k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 217k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 217k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 217k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 217k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 217k | } |
coff-i386.c:coff_swap_filehdr_in Line | Count | Source | 281 | 217k | { | 282 | 217k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 217k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 217k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 217k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 217k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 217k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 217k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 217k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 217k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 217k | } |
coff-mips.c:mips_ecoff_swap_filehdr_in Line | Count | Source | 281 | 574k | { | 282 | 574k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 574k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 574k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 574k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 574k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 574k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 574k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 574k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 574k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 574k | } |
coff-rs6000.c:coff_swap_filehdr_in Line | Count | Source | 281 | 149k | { | 282 | 149k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 149k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 149k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 149k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 149k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 149k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 149k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 149k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 149k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 149k | } |
coff-sh.c:coff_swap_filehdr_in Line | Count | Source | 281 | 458k | { | 282 | 458k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 458k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 458k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 458k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 458k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 458k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 458k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 458k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 458k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 458k | } |
coff-stgo32.c:coff_swap_filehdr_in Line | Count | Source | 281 | 3.70k | { | 282 | 3.70k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 3.70k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 3.70k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 3.70k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 3.70k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 3.70k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 3.70k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 3.70k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 3.70k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 3.70k | } |
coff-tic30.c:coff_swap_filehdr_in Line | Count | Source | 281 | 190k | { | 282 | 190k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 190k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 190k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 190k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 190k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 190k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 190k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 190k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 190k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 190k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in coff-tic54x.c:coff_swap_filehdr_in Line | Count | Source | 281 | 1.12M | { | 282 | 1.12M | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 1.12M | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 1.12M | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 1.12M | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 1.12M | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 1.12M | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 1.12M | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 1.12M | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 1.12M | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | 1.12M | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | 1.12M | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | 1.12M | #endif | 299 | 1.12M | } |
coff-z80.c:coff_swap_filehdr_in Line | Count | Source | 281 | 191k | { | 282 | 191k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 191k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 191k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 191k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 191k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 191k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 191k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 191k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 191k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 191k | } |
coff-z8k.c:coff_swap_filehdr_in Line | Count | Source | 281 | 188k | { | 282 | 188k | FILHDR *filehdr_src = (FILHDR *) src; | 283 | 188k | struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; | 284 | | | 285 | | #ifdef COFF_ADJUST_FILEHDR_IN_PRE | 286 | | COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); | 287 | | #endif | 288 | 188k | filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic); | 289 | 188k | filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns); | 290 | 188k | filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat); | 291 | 188k | filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr); | 292 | 188k | filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms); | 293 | 188k | filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr); | 294 | 188k | filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags); | 295 | | | 296 | | #ifdef COFF_ADJUST_FILEHDR_IN_POST | 297 | | COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst); | 298 | | #endif | 299 | 188k | } |
|
300 | | |
301 | | static unsigned int |
302 | | coff_swap_filehdr_out (bfd *abfd, void * in, void * out) |
303 | 864 | { |
304 | 864 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; |
305 | 864 | FILHDR *filehdr_out = (FILHDR *) out; |
306 | | |
307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE |
308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); |
309 | | #endif |
310 | 864 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); |
311 | 864 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); |
312 | 864 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); |
313 | 864 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); |
314 | 864 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); |
315 | 864 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); |
316 | 864 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); |
317 | | |
318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST |
319 | 82 | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); |
320 | | #endif |
321 | 864 | return bfd_coff_filhsz (abfd); |
322 | 864 | } coff-alpha.c:alpha_ecoff_swap_filehdr_out Line | Count | Source | 303 | 67 | { | 304 | 67 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 67 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 67 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 67 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 67 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 67 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 67 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 67 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 67 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 67 | return bfd_coff_filhsz (abfd); | 322 | 67 | } |
coff64-rs6000.c:coff_swap_filehdr_out Line | Count | Source | 303 | 79 | { | 304 | 79 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 79 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 79 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 79 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 79 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 79 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 79 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 79 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 79 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 79 | return bfd_coff_filhsz (abfd); | 322 | 79 | } |
Unexecuted instantiation: cf-i386lynx.c:coff_swap_filehdr_out Unexecuted instantiation: coff-go32.c:coff_swap_filehdr_out Unexecuted instantiation: coff-i386.c:coff_swap_filehdr_out coff-mips.c:mips_ecoff_swap_filehdr_out Line | Count | Source | 303 | 115 | { | 304 | 115 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 115 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 115 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 115 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 115 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 115 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 115 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 115 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 115 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 115 | return bfd_coff_filhsz (abfd); | 322 | 115 | } |
coff-rs6000.c:coff_swap_filehdr_out Line | Count | Source | 303 | 121 | { | 304 | 121 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 121 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 121 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 121 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 121 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 121 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 121 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 121 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 121 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 121 | return bfd_coff_filhsz (abfd); | 322 | 121 | } |
coff-sh.c:coff_swap_filehdr_out Line | Count | Source | 303 | 101 | { | 304 | 101 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 101 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 101 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 101 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 101 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 101 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 101 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 101 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 101 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 101 | return bfd_coff_filhsz (abfd); | 322 | 101 | } |
coff-stgo32.c:coff_swap_filehdr_out Line | Count | Source | 303 | 21 | { | 304 | 21 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 21 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 21 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 21 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 21 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 21 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 21 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 21 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 21 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 21 | return bfd_coff_filhsz (abfd); | 322 | 21 | } |
coff-tic30.c:coff_swap_filehdr_out Line | Count | Source | 303 | 123 | { | 304 | 123 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 123 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 123 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 123 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 123 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 123 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 123 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 123 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 123 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 123 | return bfd_coff_filhsz (abfd); | 322 | 123 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out coff-tic54x.c:coff_swap_filehdr_out Line | Count | Source | 303 | 82 | { | 304 | 82 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 82 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 82 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 82 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 82 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 82 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 82 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 82 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 82 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | 82 | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | 82 | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | 82 | #endif | 321 | 82 | return bfd_coff_filhsz (abfd); | 322 | 82 | } |
coff-z80.c:coff_swap_filehdr_out Line | Count | Source | 303 | 70 | { | 304 | 70 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 70 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 70 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 70 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 70 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 70 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 70 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 70 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 70 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 70 | return bfd_coff_filhsz (abfd); | 322 | 70 | } |
coff-z8k.c:coff_swap_filehdr_out Line | Count | Source | 303 | 85 | { | 304 | 85 | struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; | 305 | 85 | FILHDR *filehdr_out = (FILHDR *) out; | 306 | | | 307 | | #ifdef COFF_ADJUST_FILEHDR_OUT_PRE | 308 | | COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out); | 309 | | #endif | 310 | 85 | H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); | 311 | 85 | H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); | 312 | 85 | H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat); | 313 | 85 | PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); | 314 | 85 | H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); | 315 | 85 | H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr); | 316 | 85 | H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags); | 317 | | | 318 | | #ifdef COFF_ADJUST_FILEHDR_OUT_POST | 319 | | COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); | 320 | | #endif | 321 | 85 | return bfd_coff_filhsz (abfd); | 322 | 85 | } |
|
323 | | |
324 | | #ifndef NO_COFF_SYMBOLS |
325 | | |
326 | | static void |
327 | | coff_swap_sym_in (bfd * abfd, void * ext1, void * in1) |
328 | 147k | { |
329 | 147k | SYMENT *ext = (SYMENT *) ext1; |
330 | 147k | struct internal_syment *in = (struct internal_syment *) in1; |
331 | | |
332 | 147k | if (ext->e.e_name[0] == 0) |
333 | 88.7k | { |
334 | 88.7k | in->_n._n_n._n_zeroes = 0; |
335 | 88.7k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); |
336 | 88.7k | } |
337 | 58.7k | else |
338 | 58.7k | { |
339 | | #if SYMNMLEN != E_SYMNMLEN |
340 | | #error we need to cope with truncating or extending SYMNMLEN |
341 | | #else |
342 | 58.7k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); |
343 | 58.7k | #endif |
344 | 58.7k | } |
345 | | |
346 | 147k | in->n_value = H_GET_32 (abfd, ext->e_value); |
347 | 147k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); |
348 | 147k | if (sizeof (ext->e_type) == 2) |
349 | 147k | in->n_type = H_GET_16 (abfd, ext->e_type); |
350 | 0 | else |
351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); |
352 | 147k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); |
353 | 147k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); |
354 | | #ifdef COFF_ADJUST_SYM_IN_POST |
355 | 18.2k | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); |
356 | | #endif |
357 | 147k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_in Unexecuted instantiation: coff-go32.c:coff_swap_sym_in Unexecuted instantiation: coff-i386.c:coff_swap_sym_in coff-sh.c:coff_swap_sym_in Line | Count | Source | 328 | 26.7k | { | 329 | 26.7k | SYMENT *ext = (SYMENT *) ext1; | 330 | 26.7k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 26.7k | if (ext->e.e_name[0] == 0) | 333 | 15.3k | { | 334 | 15.3k | in->_n._n_n._n_zeroes = 0; | 335 | 15.3k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 15.3k | } | 337 | 11.4k | else | 338 | 11.4k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 11.4k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 11.4k | #endif | 344 | 11.4k | } | 345 | | | 346 | 26.7k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 26.7k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 26.7k | if (sizeof (ext->e_type) == 2) | 349 | 26.7k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 26.7k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 26.7k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | | #endif | 357 | 26.7k | } |
coff-stgo32.c:coff_swap_sym_in Line | Count | Source | 328 | 10.3k | { | 329 | 10.3k | SYMENT *ext = (SYMENT *) ext1; | 330 | 10.3k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 10.3k | if (ext->e.e_name[0] == 0) | 333 | 6.36k | { | 334 | 6.36k | in->_n._n_n._n_zeroes = 0; | 335 | 6.36k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 6.36k | } | 337 | 4.03k | else | 338 | 4.03k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 4.03k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 4.03k | #endif | 344 | 4.03k | } | 345 | | | 346 | 10.3k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 10.3k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 10.3k | if (sizeof (ext->e_type) == 2) | 349 | 10.3k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 10.3k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 10.3k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | | #endif | 357 | 10.3k | } |
coff-tic30.c:coff_swap_sym_in Line | Count | Source | 328 | 46.5k | { | 329 | 46.5k | SYMENT *ext = (SYMENT *) ext1; | 330 | 46.5k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 46.5k | if (ext->e.e_name[0] == 0) | 333 | 30.2k | { | 334 | 30.2k | in->_n._n_n._n_zeroes = 0; | 335 | 30.2k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 30.2k | } | 337 | 16.2k | else | 338 | 16.2k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 16.2k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 16.2k | #endif | 344 | 16.2k | } | 345 | | | 346 | 46.5k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 46.5k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 46.5k | if (sizeof (ext->e_type) == 2) | 349 | 46.5k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 46.5k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 46.5k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | | #endif | 357 | 46.5k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in coff-tic54x.c:coff_swap_sym_in Line | Count | Source | 328 | 18.2k | { | 329 | 18.2k | SYMENT *ext = (SYMENT *) ext1; | 330 | 18.2k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 18.2k | if (ext->e.e_name[0] == 0) | 333 | 10.3k | { | 334 | 10.3k | in->_n._n_n._n_zeroes = 0; | 335 | 10.3k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 10.3k | } | 337 | 7.90k | else | 338 | 7.90k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 7.90k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 7.90k | #endif | 344 | 7.90k | } | 345 | | | 346 | 18.2k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 18.2k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 18.2k | if (sizeof (ext->e_type) == 2) | 349 | 18.2k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 18.2k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 18.2k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | 18.2k | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | 18.2k | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | 18.2k | #endif | 357 | 18.2k | } |
coff-z80.c:coff_swap_sym_in Line | Count | Source | 328 | 28.3k | { | 329 | 28.3k | SYMENT *ext = (SYMENT *) ext1; | 330 | 28.3k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 28.3k | if (ext->e.e_name[0] == 0) | 333 | 16.3k | { | 334 | 16.3k | in->_n._n_n._n_zeroes = 0; | 335 | 16.3k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 16.3k | } | 337 | 12.0k | else | 338 | 12.0k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 12.0k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 12.0k | #endif | 344 | 12.0k | } | 345 | | | 346 | 28.3k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 28.3k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 28.3k | if (sizeof (ext->e_type) == 2) | 349 | 28.3k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 28.3k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 28.3k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | | #endif | 357 | 28.3k | } |
coff-z8k.c:coff_swap_sym_in Line | Count | Source | 328 | 17.2k | { | 329 | 17.2k | SYMENT *ext = (SYMENT *) ext1; | 330 | 17.2k | struct internal_syment *in = (struct internal_syment *) in1; | 331 | | | 332 | 17.2k | if (ext->e.e_name[0] == 0) | 333 | 10.1k | { | 334 | 10.1k | in->_n._n_n._n_zeroes = 0; | 335 | 10.1k | in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); | 336 | 10.1k | } | 337 | 7.03k | else | 338 | 7.03k | { | 339 | | #if SYMNMLEN != E_SYMNMLEN | 340 | | #error we need to cope with truncating or extending SYMNMLEN | 341 | | #else | 342 | 7.03k | memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); | 343 | 7.03k | #endif | 344 | 7.03k | } | 345 | | | 346 | 17.2k | in->n_value = H_GET_32 (abfd, ext->e_value); | 347 | 17.2k | in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum); | 348 | 17.2k | if (sizeof (ext->e_type) == 2) | 349 | 17.2k | in->n_type = H_GET_16 (abfd, ext->e_type); | 350 | 0 | else | 351 | 0 | in->n_type = H_GET_32 (abfd, ext->e_type); | 352 | 17.2k | in->n_sclass = H_GET_8 (abfd, ext->e_sclass); | 353 | 17.2k | in->n_numaux = H_GET_8 (abfd, ext->e_numaux); | 354 | | #ifdef COFF_ADJUST_SYM_IN_POST | 355 | | COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1); | 356 | | #endif | 357 | 17.2k | } |
|
358 | | |
359 | | static unsigned int |
360 | | coff_swap_sym_out (bfd * abfd, void * inp, void * extp) |
361 | 1.35k | { |
362 | 1.35k | struct internal_syment *in = (struct internal_syment *) inp; |
363 | 1.35k | SYMENT *ext =(SYMENT *) extp; |
364 | | |
365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE |
366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); |
367 | | #endif |
368 | | |
369 | 1.35k | if (in->_n._n_name[0] == 0) |
370 | 1.02k | { |
371 | 1.02k | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); |
372 | 1.02k | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); |
373 | 1.02k | } |
374 | 330 | else |
375 | 330 | { |
376 | | #if SYMNMLEN != E_SYMNMLEN |
377 | | #error we need to cope with truncating or extending SYMNMLEN |
378 | | #else |
379 | 330 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); |
380 | 330 | #endif |
381 | 330 | } |
382 | | |
383 | 1.35k | H_PUT_32 (abfd, in->n_value, ext->e_value); |
384 | 1.35k | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); |
385 | | |
386 | 1.35k | if (sizeof (ext->e_type) == 2) |
387 | 1.35k | H_PUT_16 (abfd, in->n_type, ext->e_type); |
388 | 0 | else |
389 | 1.35k | H_PUT_32 (abfd, in->n_type, ext->e_type); |
390 | | |
391 | 1.35k | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); |
392 | 1.35k | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); |
393 | | |
394 | | #ifdef COFF_ADJUST_SYM_OUT_POST |
395 | 152 | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); |
396 | | #endif |
397 | | |
398 | 1.35k | return SYMESZ; |
399 | 1.35k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out Unexecuted instantiation: coff-go32.c:coff_swap_sym_out Unexecuted instantiation: coff-i386.c:coff_swap_sym_out coff-sh.c:coff_swap_sym_out Line | Count | Source | 361 | 174 | { | 362 | 174 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 174 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 174 | if (in->_n._n_name[0] == 0) | 370 | 94 | { | 371 | 94 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 94 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 94 | } | 374 | 80 | else | 375 | 80 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 80 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 80 | #endif | 381 | 80 | } | 382 | | | 383 | 174 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 174 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 174 | if (sizeof (ext->e_type) == 2) | 387 | 174 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 174 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 174 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 174 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | | #endif | 397 | | | 398 | 174 | return SYMESZ; | 399 | 174 | } |
coff-stgo32.c:coff_swap_sym_out Line | Count | Source | 361 | 35 | { | 362 | 35 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 35 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 35 | if (in->_n._n_name[0] == 0) | 370 | 30 | { | 371 | 30 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 30 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 30 | } | 374 | 5 | else | 375 | 5 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 5 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 5 | #endif | 381 | 5 | } | 382 | | | 383 | 35 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 35 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 35 | if (sizeof (ext->e_type) == 2) | 387 | 35 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 35 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 35 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 35 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | | #endif | 397 | | | 398 | 35 | return SYMESZ; | 399 | 35 | } |
coff-tic30.c:coff_swap_sym_out Line | Count | Source | 361 | 442 | { | 362 | 442 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 442 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 442 | if (in->_n._n_name[0] == 0) | 370 | 358 | { | 371 | 358 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 358 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 358 | } | 374 | 84 | else | 375 | 84 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 84 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 84 | #endif | 381 | 84 | } | 382 | | | 383 | 442 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 442 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 442 | if (sizeof (ext->e_type) == 2) | 387 | 442 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 442 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 442 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 442 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | | #endif | 397 | | | 398 | 442 | return SYMESZ; | 399 | 442 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out coff-tic54x.c:coff_swap_sym_out Line | Count | Source | 361 | 152 | { | 362 | 152 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 152 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 152 | if (in->_n._n_name[0] == 0) | 370 | 100 | { | 371 | 100 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 100 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 100 | } | 374 | 52 | else | 375 | 52 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 52 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 52 | #endif | 381 | 52 | } | 382 | | | 383 | 152 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 152 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 152 | if (sizeof (ext->e_type) == 2) | 387 | 152 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 152 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 152 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 152 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | 152 | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | 152 | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | 152 | #endif | 397 | | | 398 | 152 | return SYMESZ; | 399 | 152 | } |
coff-z80.c:coff_swap_sym_out Line | Count | Source | 361 | 149 | { | 362 | 149 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 149 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 149 | if (in->_n._n_name[0] == 0) | 370 | 99 | { | 371 | 99 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 99 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 99 | } | 374 | 50 | else | 375 | 50 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 50 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 50 | #endif | 381 | 50 | } | 382 | | | 383 | 149 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 149 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 149 | if (sizeof (ext->e_type) == 2) | 387 | 149 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 149 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 149 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 149 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | | #endif | 397 | | | 398 | 149 | return SYMESZ; | 399 | 149 | } |
coff-z8k.c:coff_swap_sym_out Line | Count | Source | 361 | 404 | { | 362 | 404 | struct internal_syment *in = (struct internal_syment *) inp; | 363 | 404 | SYMENT *ext =(SYMENT *) extp; | 364 | | | 365 | | #ifdef COFF_ADJUST_SYM_OUT_PRE | 366 | | COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp); | 367 | | #endif | 368 | | | 369 | 404 | if (in->_n._n_name[0] == 0) | 370 | 345 | { | 371 | 345 | H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); | 372 | 345 | H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); | 373 | 345 | } | 374 | 59 | else | 375 | 59 | { | 376 | | #if SYMNMLEN != E_SYMNMLEN | 377 | | #error we need to cope with truncating or extending SYMNMLEN | 378 | | #else | 379 | 59 | memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); | 380 | 59 | #endif | 381 | 59 | } | 382 | | | 383 | 404 | H_PUT_32 (abfd, in->n_value, ext->e_value); | 384 | 404 | H_PUT_16 (abfd, in->n_scnum, ext->e_scnum); | 385 | | | 386 | 404 | if (sizeof (ext->e_type) == 2) | 387 | 404 | H_PUT_16 (abfd, in->n_type, ext->e_type); | 388 | 0 | else | 389 | 404 | H_PUT_32 (abfd, in->n_type, ext->e_type); | 390 | | | 391 | 404 | H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); | 392 | 404 | H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); | 393 | | | 394 | | #ifdef COFF_ADJUST_SYM_OUT_POST | 395 | | COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp); | 396 | | #endif | 397 | | | 398 | 404 | return SYMESZ; | 399 | 404 | } |
|
400 | | |
401 | | static void |
402 | | coff_swap_aux_in (bfd *abfd, |
403 | | void * ext1, |
404 | | int type, |
405 | | int in_class, |
406 | | int indx ATTRIBUTE_UNUSED, |
407 | | int numaux ATTRIBUTE_UNUSED, |
408 | | void * in1) |
409 | 687k | { |
410 | 687k | AUXENT *ext = (AUXENT *) ext1; |
411 | 687k | union internal_auxent *in = (union internal_auxent *) in1; |
412 | | |
413 | | #ifdef COFF_ADJUST_AUX_IN_PRE |
414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); |
415 | | #endif |
416 | | |
417 | 687k | switch (in_class) |
418 | 687k | { |
419 | 50.7k | case C_FILE: |
420 | 50.7k | if (ext->x_file.x_fname[0] == 0) |
421 | 21.9k | { |
422 | 21.9k | in->x_file.x_n.x_n.x_zeroes = 0; |
423 | 21.9k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); |
424 | 21.9k | } |
425 | 28.8k | else |
426 | | #if FILNMLEN != E_FILNMLEN |
427 | | #error we need to cope with truncating or extending x_fname |
428 | | #endif |
429 | 28.8k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); |
430 | 50.7k | goto end; |
431 | | |
432 | 33.1k | case C_STAT: |
433 | 33.1k | #ifdef C_LEAFSTAT |
434 | 50.3k | case C_LEAFSTAT: |
435 | 50.3k | #endif |
436 | 69.8k | case C_HIDDEN: |
437 | 69.8k | if (type == T_NULL) |
438 | 21.6k | { |
439 | 21.6k | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); |
440 | 21.6k | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); |
441 | 21.6k | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); |
442 | | |
443 | | /* PE defines some extra fields; we zero them out for |
444 | | safety. */ |
445 | 21.6k | in->x_scn.x_checksum = 0; |
446 | 21.6k | in->x_scn.x_associated = 0; |
447 | 21.6k | in->x_scn.x_comdat = 0; |
448 | | |
449 | 21.6k | goto end; |
450 | 21.6k | } |
451 | 48.1k | break; |
452 | 687k | } |
453 | | |
454 | 614k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); |
455 | 614k | #ifndef NO_TVNDX |
456 | 614k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); |
457 | 614k | #endif |
458 | | |
459 | 614k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) |
460 | 466k | || ISTAG (in_class)) |
461 | 196k | { |
462 | 196k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); |
463 | 196k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); |
464 | 196k | } |
465 | 418k | else |
466 | 418k | { |
467 | | #if DIMNUM != E_DIMNUM |
468 | | #error we need to cope with truncating or extending DIMNUM |
469 | | #endif |
470 | 418k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = |
471 | 418k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); |
472 | 418k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = |
473 | 418k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); |
474 | 418k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = |
475 | 418k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); |
476 | 418k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = |
477 | 418k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); |
478 | 418k | } |
479 | | |
480 | 614k | if (ISFCN (type)) |
481 | 131k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); |
482 | 482k | else |
483 | 482k | { |
484 | 482k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); |
485 | 482k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); |
486 | 482k | } |
487 | | |
488 | 687k | end: ; |
489 | | |
490 | | #ifdef COFF_ADJUST_AUX_IN_POST |
491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); |
492 | | #endif |
493 | 687k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_in Unexecuted instantiation: coff-go32.c:coff_swap_aux_in Unexecuted instantiation: coff-i386.c:coff_swap_aux_in coff-sh.c:coff_swap_aux_in Line | Count | Source | 409 | 100k | { | 410 | 100k | AUXENT *ext = (AUXENT *) ext1; | 411 | 100k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 100k | switch (in_class) | 418 | 100k | { | 419 | 15.3k | case C_FILE: | 420 | 15.3k | if (ext->x_file.x_fname[0] == 0) | 421 | 5.33k | { | 422 | 5.33k | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 5.33k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 5.33k | } | 425 | 10.0k | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 10.0k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 15.3k | goto end; | 431 | | | 432 | 1.88k | case C_STAT: | 433 | 1.88k | #ifdef C_LEAFSTAT | 434 | 3.34k | case C_LEAFSTAT: | 435 | 3.34k | #endif | 436 | 5.42k | case C_HIDDEN: | 437 | 5.42k | if (type == T_NULL) | 438 | 797 | { | 439 | 797 | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 797 | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 797 | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 797 | in->x_scn.x_checksum = 0; | 446 | 797 | in->x_scn.x_associated = 0; | 447 | 797 | in->x_scn.x_comdat = 0; | 448 | | | 449 | 797 | goto end; | 450 | 797 | } | 451 | 4.62k | break; | 452 | 100k | } | 453 | | | 454 | 84.3k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 84.3k | #ifndef NO_TVNDX | 456 | 84.3k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 84.3k | #endif | 458 | | | 459 | 84.3k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 60.2k | || ISTAG (in_class)) | 461 | 32.6k | { | 462 | 32.6k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 32.6k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 32.6k | } | 465 | 51.7k | else | 466 | 51.7k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 51.7k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 51.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 51.7k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 51.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 51.7k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 51.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 51.7k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 51.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 51.7k | } | 479 | | | 480 | 84.3k | if (ISFCN (type)) | 481 | 22.1k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 62.2k | else | 483 | 62.2k | { | 484 | 62.2k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 62.2k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 62.2k | } | 487 | | | 488 | 100k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 100k | } |
coff-stgo32.c:coff_swap_aux_in Line | Count | Source | 409 | 42.2k | { | 410 | 42.2k | AUXENT *ext = (AUXENT *) ext1; | 411 | 42.2k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 42.2k | switch (in_class) | 418 | 42.2k | { | 419 | 1.45k | case C_FILE: | 420 | 1.45k | if (ext->x_file.x_fname[0] == 0) | 421 | 467 | { | 422 | 467 | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 467 | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 467 | } | 425 | 987 | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 987 | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 1.45k | goto end; | 431 | | | 432 | 1.51k | case C_STAT: | 433 | 1.51k | #ifdef C_LEAFSTAT | 434 | 2.10k | case C_LEAFSTAT: | 435 | 2.10k | #endif | 436 | 3.03k | case C_HIDDEN: | 437 | 3.03k | if (type == T_NULL) | 438 | 798 | { | 439 | 798 | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 798 | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 798 | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 798 | in->x_scn.x_checksum = 0; | 446 | 798 | in->x_scn.x_associated = 0; | 447 | 798 | in->x_scn.x_comdat = 0; | 448 | | | 449 | 798 | goto end; | 450 | 798 | } | 451 | 2.23k | break; | 452 | 42.2k | } | 453 | | | 454 | 40.0k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 40.0k | #ifndef NO_TVNDX | 456 | 40.0k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 40.0k | #endif | 458 | | | 459 | 40.0k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 28.3k | || ISTAG (in_class)) | 461 | 16.4k | { | 462 | 16.4k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 16.4k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 16.4k | } | 465 | 23.5k | else | 466 | 23.5k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 23.5k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 23.5k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 23.5k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 23.5k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 23.5k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 23.5k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 23.5k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 23.5k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 23.5k | } | 479 | | | 480 | 40.0k | if (ISFCN (type)) | 481 | 10.2k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 29.7k | else | 483 | 29.7k | { | 484 | 29.7k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 29.7k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 29.7k | } | 487 | | | 488 | 42.2k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 42.2k | } |
coff-tic30.c:coff_swap_aux_in Line | Count | Source | 409 | 136k | { | 410 | 136k | AUXENT *ext = (AUXENT *) ext1; | 411 | 136k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 136k | switch (in_class) | 418 | 136k | { | 419 | 4.36k | case C_FILE: | 420 | 4.36k | if (ext->x_file.x_fname[0] == 0) | 421 | 1.76k | { | 422 | 1.76k | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 1.76k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 1.76k | } | 425 | 2.59k | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 2.59k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 4.36k | goto end; | 431 | | | 432 | 19.7k | case C_STAT: | 433 | 19.7k | #ifdef C_LEAFSTAT | 434 | 24.5k | case C_LEAFSTAT: | 435 | 24.5k | #endif | 436 | 26.1k | case C_HIDDEN: | 437 | 26.1k | if (type == T_NULL) | 438 | 16.2k | { | 439 | 16.2k | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 16.2k | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 16.2k | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 16.2k | in->x_scn.x_checksum = 0; | 446 | 16.2k | in->x_scn.x_associated = 0; | 447 | 16.2k | in->x_scn.x_comdat = 0; | 448 | | | 449 | 16.2k | goto end; | 450 | 16.2k | } | 451 | 9.86k | break; | 452 | 136k | } | 453 | | | 454 | 115k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 115k | #ifndef NO_TVNDX | 456 | 115k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 115k | #endif | 458 | | | 459 | 115k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 96.8k | || ISTAG (in_class)) | 461 | 25.9k | { | 462 | 25.9k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 25.9k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 25.9k | } | 465 | 90.0k | else | 466 | 90.0k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 90.0k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 90.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 90.0k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 90.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 90.0k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 90.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 90.0k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 90.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 90.0k | } | 479 | | | 480 | 115k | if (ISFCN (type)) | 481 | 14.6k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 101k | else | 483 | 101k | { | 484 | 101k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 101k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 101k | } | 487 | | | 488 | 136k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 136k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in coff-tic54x.c:coff_swap_aux_in Line | Count | Source | 409 | 69.9k | { | 410 | 69.9k | AUXENT *ext = (AUXENT *) ext1; | 411 | 69.9k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 69.9k | switch (in_class) | 418 | 69.9k | { | 419 | 7.09k | case C_FILE: | 420 | 7.09k | if (ext->x_file.x_fname[0] == 0) | 421 | 3.53k | { | 422 | 3.53k | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 3.53k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 3.53k | } | 425 | 3.56k | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 3.56k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 7.09k | goto end; | 431 | | | 432 | 2.35k | case C_STAT: | 433 | 2.35k | #ifdef C_LEAFSTAT | 434 | 3.15k | case C_LEAFSTAT: | 435 | 3.15k | #endif | 436 | 4.94k | case C_HIDDEN: | 437 | 4.94k | if (type == T_NULL) | 438 | 1.72k | { | 439 | 1.72k | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 1.72k | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 1.72k | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 1.72k | in->x_scn.x_checksum = 0; | 446 | 1.72k | in->x_scn.x_associated = 0; | 447 | 1.72k | in->x_scn.x_comdat = 0; | 448 | | | 449 | 1.72k | goto end; | 450 | 1.72k | } | 451 | 3.22k | break; | 452 | 69.9k | } | 453 | | | 454 | 61.1k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 61.1k | #ifndef NO_TVNDX | 456 | 61.1k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 61.1k | #endif | 458 | | | 459 | 61.1k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 43.9k | || ISTAG (in_class)) | 461 | 22.0k | { | 462 | 22.0k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 22.0k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 22.0k | } | 465 | 39.0k | else | 466 | 39.0k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 39.0k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 39.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 39.0k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 39.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 39.0k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 39.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 39.0k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 39.0k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 39.0k | } | 479 | | | 480 | 61.1k | if (ISFCN (type)) | 481 | 15.4k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 45.7k | else | 483 | 45.7k | { | 484 | 45.7k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 45.7k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 45.7k | } | 487 | | | 488 | 69.9k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 69.9k | } |
coff-z80.c:coff_swap_aux_in Line | Count | Source | 409 | 236k | { | 410 | 236k | AUXENT *ext = (AUXENT *) ext1; | 411 | 236k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 236k | switch (in_class) | 418 | 236k | { | 419 | 9.90k | case C_FILE: | 420 | 9.90k | if (ext->x_file.x_fname[0] == 0) | 421 | 4.06k | { | 422 | 4.06k | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 4.06k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 4.06k | } | 425 | 5.84k | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 5.84k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 9.90k | goto end; | 431 | | | 432 | 5.28k | case C_STAT: | 433 | 5.28k | #ifdef C_LEAFSTAT | 434 | 13.0k | case C_LEAFSTAT: | 435 | 13.0k | #endif | 436 | 22.3k | case C_HIDDEN: | 437 | 22.3k | if (type == T_NULL) | 438 | 850 | { | 439 | 850 | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 850 | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 850 | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 850 | in->x_scn.x_checksum = 0; | 446 | 850 | in->x_scn.x_associated = 0; | 447 | 850 | in->x_scn.x_comdat = 0; | 448 | | | 449 | 850 | goto end; | 450 | 850 | } | 451 | 21.5k | break; | 452 | 236k | } | 453 | | | 454 | 225k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 225k | #ifndef NO_TVNDX | 456 | 225k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 225k | #endif | 458 | | | 459 | 225k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 165k | || ISTAG (in_class)) | 461 | 74.8k | { | 462 | 74.8k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 74.8k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 74.8k | } | 465 | 151k | else | 466 | 151k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 151k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 151k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 151k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 151k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 151k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 151k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 151k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 151k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 151k | } | 479 | | | 480 | 225k | if (ISFCN (type)) | 481 | 55.3k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 170k | else | 483 | 170k | { | 484 | 170k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 170k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 170k | } | 487 | | | 488 | 236k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 236k | } |
coff-z8k.c:coff_swap_aux_in Line | Count | Source | 409 | 101k | { | 410 | 101k | AUXENT *ext = (AUXENT *) ext1; | 411 | 101k | union internal_auxent *in = (union internal_auxent *) in1; | 412 | | | 413 | | #ifdef COFF_ADJUST_AUX_IN_PRE | 414 | | COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); | 415 | | #endif | 416 | | | 417 | 101k | switch (in_class) | 418 | 101k | { | 419 | 12.6k | case C_FILE: | 420 | 12.6k | if (ext->x_file.x_fname[0] == 0) | 421 | 6.72k | { | 422 | 6.72k | in->x_file.x_n.x_n.x_zeroes = 0; | 423 | 6.72k | in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); | 424 | 6.72k | } | 425 | 5.89k | else | 426 | | #if FILNMLEN != E_FILNMLEN | 427 | | #error we need to cope with truncating or extending x_fname | 428 | | #endif | 429 | 5.89k | memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); | 430 | 12.6k | goto end; | 431 | | | 432 | 2.40k | case C_STAT: | 433 | 2.40k | #ifdef C_LEAFSTAT | 434 | 4.19k | case C_LEAFSTAT: | 435 | 4.19k | #endif | 436 | 7.92k | case C_HIDDEN: | 437 | 7.92k | if (type == T_NULL) | 438 | 1.21k | { | 439 | 1.21k | in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); | 440 | 1.21k | in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); | 441 | 1.21k | in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); | 442 | | | 443 | | /* PE defines some extra fields; we zero them out for | 444 | | safety. */ | 445 | 1.21k | in->x_scn.x_checksum = 0; | 446 | 1.21k | in->x_scn.x_associated = 0; | 447 | 1.21k | in->x_scn.x_comdat = 0; | 448 | | | 449 | 1.21k | goto end; | 450 | 1.21k | } | 451 | 6.70k | break; | 452 | 101k | } | 453 | | | 454 | 87.2k | in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); | 455 | 87.2k | #ifndef NO_TVNDX | 456 | 87.2k | in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); | 457 | 87.2k | #endif | 458 | | | 459 | 87.2k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 460 | 71.0k | || ISTAG (in_class)) | 461 | 24.4k | { | 462 | 24.4k | in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); | 463 | 24.4k | in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); | 464 | 24.4k | } | 465 | 62.7k | else | 466 | 62.7k | { | 467 | | #if DIMNUM != E_DIMNUM | 468 | | #error we need to cope with truncating or extending DIMNUM | 469 | | #endif | 470 | 62.7k | in->x_sym.x_fcnary.x_ary.x_dimen[0] = | 471 | 62.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 472 | 62.7k | in->x_sym.x_fcnary.x_ary.x_dimen[1] = | 473 | 62.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 474 | 62.7k | in->x_sym.x_fcnary.x_ary.x_dimen[2] = | 475 | 62.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 476 | 62.7k | in->x_sym.x_fcnary.x_ary.x_dimen[3] = | 477 | 62.7k | H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 478 | 62.7k | } | 479 | | | 480 | 87.2k | if (ISFCN (type)) | 481 | 13.7k | in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize); | 482 | 73.4k | else | 483 | 73.4k | { | 484 | 73.4k | in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); | 485 | 73.4k | in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); | 486 | 73.4k | } | 487 | | | 488 | 101k | end: ; | 489 | | | 490 | | #ifdef COFF_ADJUST_AUX_IN_POST | 491 | | COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); | 492 | | #endif | 493 | 101k | } |
|
494 | | |
495 | | static unsigned int |
496 | | coff_swap_aux_out (bfd * abfd, |
497 | | void * inp, |
498 | | int type, |
499 | | int in_class, |
500 | | int indx ATTRIBUTE_UNUSED, |
501 | | int numaux ATTRIBUTE_UNUSED, |
502 | | void * extp) |
503 | 1.46k | { |
504 | 1.46k | union internal_auxent * in = (union internal_auxent *) inp; |
505 | 1.46k | AUXENT *ext = (AUXENT *) extp; |
506 | | |
507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE |
508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); |
509 | | #endif |
510 | | |
511 | 1.46k | memset (ext, 0, AUXESZ); |
512 | | |
513 | 1.46k | switch (in_class) |
514 | 1.46k | { |
515 | 130 | case C_FILE: |
516 | 130 | if (in->x_file.x_n.x_fname[0] == 0) |
517 | 89 | { |
518 | 89 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); |
519 | 89 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); |
520 | 89 | } |
521 | 41 | else |
522 | | #if FILNMLEN != E_FILNMLEN |
523 | | #error we need to cope with truncating or extending xfname |
524 | | #endif |
525 | 41 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); |
526 | 130 | goto end; |
527 | | |
528 | 129 | case C_STAT: |
529 | 129 | #ifdef C_LEAFSTAT |
530 | 129 | case C_LEAFSTAT: |
531 | 129 | #endif |
532 | 132 | case C_HIDDEN: |
533 | 132 | if (type == T_NULL) |
534 | 14 | { |
535 | 14 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); |
536 | 14 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); |
537 | 14 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); |
538 | 14 | goto end; |
539 | 14 | } |
540 | 118 | break; |
541 | 1.46k | } |
542 | | |
543 | 1.32k | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); |
544 | 1.32k | #ifndef NO_TVNDX |
545 | 1.32k | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); |
546 | 1.32k | #endif |
547 | | |
548 | 1.32k | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) |
549 | 809 | || ISTAG (in_class)) |
550 | 666 | { |
551 | 666 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); |
552 | 666 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); |
553 | 666 | } |
554 | 659 | else |
555 | 659 | { |
556 | | #if DIMNUM != E_DIMNUM |
557 | | #error we need to cope with truncating or extending DIMNUM |
558 | | #endif |
559 | 659 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], |
560 | 659 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); |
561 | 659 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], |
562 | 659 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); |
563 | 659 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], |
564 | 659 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); |
565 | 659 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], |
566 | 659 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); |
567 | 659 | } |
568 | | |
569 | 1.32k | if (ISFCN (type)) |
570 | 1.32k | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); |
571 | 854 | else |
572 | 854 | { |
573 | 854 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); |
574 | 854 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); |
575 | 854 | } |
576 | | |
577 | 1.46k | end: |
578 | | #ifdef COFF_ADJUST_AUX_OUT_POST |
579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); |
580 | | #endif |
581 | 1.46k | return AUXESZ; |
582 | 1.32k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out Unexecuted instantiation: coff-go32.c:coff_swap_aux_out Unexecuted instantiation: coff-i386.c:coff_swap_aux_out coff-sh.c:coff_swap_aux_out Line | Count | Source | 503 | 196 | { | 504 | 196 | union internal_auxent * in = (union internal_auxent *) inp; | 505 | 196 | AUXENT *ext = (AUXENT *) extp; | 506 | | | 507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE | 508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); | 509 | | #endif | 510 | | | 511 | 196 | memset (ext, 0, AUXESZ); | 512 | | | 513 | 196 | switch (in_class) | 514 | 196 | { | 515 | 14 | case C_FILE: | 516 | 14 | if (in->x_file.x_n.x_fname[0] == 0) | 517 | 8 | { | 518 | 8 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); | 519 | 8 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); | 520 | 8 | } | 521 | 6 | else | 522 | | #if FILNMLEN != E_FILNMLEN | 523 | | #error we need to cope with truncating or extending xfname | 524 | | #endif | 525 | 6 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); | 526 | 14 | goto end; | 527 | | | 528 | 39 | case C_STAT: | 529 | 39 | #ifdef C_LEAFSTAT | 530 | 39 | case C_LEAFSTAT: | 531 | 39 | #endif | 532 | 39 | case C_HIDDEN: | 533 | 39 | if (type == T_NULL) | 534 | 7 | { | 535 | 7 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); | 536 | 7 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); | 537 | 7 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); | 538 | 7 | goto end; | 539 | 7 | } | 540 | 32 | break; | 541 | 196 | } | 542 | | | 543 | 175 | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); | 544 | 175 | #ifndef NO_TVNDX | 545 | 175 | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); | 546 | 175 | #endif | 547 | | | 548 | 175 | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 549 | 168 | || ISTAG (in_class)) | 550 | 26 | { | 551 | 26 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); | 552 | 26 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); | 553 | 26 | } | 554 | 149 | else | 555 | 149 | { | 556 | | #if DIMNUM != E_DIMNUM | 557 | | #error we need to cope with truncating or extending DIMNUM | 558 | | #endif | 559 | 149 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], | 560 | 149 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 561 | 149 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], | 562 | 149 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 563 | 149 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], | 564 | 149 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 565 | 149 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], | 566 | 149 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 567 | 149 | } | 568 | | | 569 | 175 | if (ISFCN (type)) | 570 | 175 | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); | 571 | 168 | else | 572 | 168 | { | 573 | 168 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); | 574 | 168 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); | 575 | 168 | } | 576 | | | 577 | 196 | end: | 578 | | #ifdef COFF_ADJUST_AUX_OUT_POST | 579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); | 580 | | #endif | 581 | 196 | return AUXESZ; | 582 | 175 | } |
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out coff-tic30.c:coff_swap_aux_out Line | Count | Source | 503 | 610 | { | 504 | 610 | union internal_auxent * in = (union internal_auxent *) inp; | 505 | 610 | AUXENT *ext = (AUXENT *) extp; | 506 | | | 507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE | 508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); | 509 | | #endif | 510 | | | 511 | 610 | memset (ext, 0, AUXESZ); | 512 | | | 513 | 610 | switch (in_class) | 514 | 610 | { | 515 | 53 | case C_FILE: | 516 | 53 | if (in->x_file.x_n.x_fname[0] == 0) | 517 | 41 | { | 518 | 41 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); | 519 | 41 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); | 520 | 41 | } | 521 | 12 | else | 522 | | #if FILNMLEN != E_FILNMLEN | 523 | | #error we need to cope with truncating or extending xfname | 524 | | #endif | 525 | 12 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); | 526 | 53 | goto end; | 527 | | | 528 | 0 | case C_STAT: | 529 | 0 | #ifdef C_LEAFSTAT | 530 | 0 | case C_LEAFSTAT: | 531 | 0 | #endif | 532 | 3 | case C_HIDDEN: | 533 | 3 | if (type == T_NULL) | 534 | 0 | { | 535 | 0 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); | 536 | 0 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); | 537 | 0 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); | 538 | 0 | goto end; | 539 | 0 | } | 540 | 3 | break; | 541 | 610 | } | 542 | | | 543 | 557 | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); | 544 | 557 | #ifndef NO_TVNDX | 545 | 557 | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); | 546 | 557 | #endif | 547 | | | 548 | 557 | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 549 | 288 | || ISTAG (in_class)) | 550 | 310 | { | 551 | 310 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); | 552 | 310 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); | 553 | 310 | } | 554 | 247 | else | 555 | 247 | { | 556 | | #if DIMNUM != E_DIMNUM | 557 | | #error we need to cope with truncating or extending DIMNUM | 558 | | #endif | 559 | 247 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], | 560 | 247 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 561 | 247 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], | 562 | 247 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 563 | 247 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], | 564 | 247 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 565 | 247 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], | 566 | 247 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 567 | 247 | } | 568 | | | 569 | 557 | if (ISFCN (type)) | 570 | 557 | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); | 571 | 330 | else | 572 | 330 | { | 573 | 330 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); | 574 | 330 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); | 575 | 330 | } | 576 | | | 577 | 610 | end: | 578 | | #ifdef COFF_ADJUST_AUX_OUT_POST | 579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); | 580 | | #endif | 581 | 610 | return AUXESZ; | 582 | 557 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out coff-tic54x.c:coff_swap_aux_out Line | Count | Source | 503 | 250 | { | 504 | 250 | union internal_auxent * in = (union internal_auxent *) inp; | 505 | 250 | AUXENT *ext = (AUXENT *) extp; | 506 | | | 507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE | 508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); | 509 | | #endif | 510 | | | 511 | 250 | memset (ext, 0, AUXESZ); | 512 | | | 513 | 250 | switch (in_class) | 514 | 250 | { | 515 | 39 | case C_FILE: | 516 | 39 | if (in->x_file.x_n.x_fname[0] == 0) | 517 | 19 | { | 518 | 19 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); | 519 | 19 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); | 520 | 19 | } | 521 | 20 | else | 522 | | #if FILNMLEN != E_FILNMLEN | 523 | | #error we need to cope with truncating or extending xfname | 524 | | #endif | 525 | 20 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); | 526 | 39 | goto end; | 527 | | | 528 | 21 | case C_STAT: | 529 | 21 | #ifdef C_LEAFSTAT | 530 | 21 | case C_LEAFSTAT: | 531 | 21 | #endif | 532 | 21 | case C_HIDDEN: | 533 | 21 | if (type == T_NULL) | 534 | 7 | { | 535 | 7 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); | 536 | 7 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); | 537 | 7 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); | 538 | 7 | goto end; | 539 | 7 | } | 540 | 14 | break; | 541 | 250 | } | 542 | | | 543 | 204 | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); | 544 | 204 | #ifndef NO_TVNDX | 545 | 204 | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); | 546 | 204 | #endif | 547 | | | 548 | 204 | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 549 | 182 | || ISTAG (in_class)) | 550 | 45 | { | 551 | 45 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); | 552 | 45 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); | 553 | 45 | } | 554 | 159 | else | 555 | 159 | { | 556 | | #if DIMNUM != E_DIMNUM | 557 | | #error we need to cope with truncating or extending DIMNUM | 558 | | #endif | 559 | 159 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], | 560 | 159 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 561 | 159 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], | 562 | 159 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 563 | 159 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], | 564 | 159 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 565 | 159 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], | 566 | 159 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 567 | 159 | } | 568 | | | 569 | 204 | if (ISFCN (type)) | 570 | 204 | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); | 571 | 182 | else | 572 | 182 | { | 573 | 182 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); | 574 | 182 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); | 575 | 182 | } | 576 | | | 577 | 250 | end: | 578 | | #ifdef COFF_ADJUST_AUX_OUT_POST | 579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); | 580 | | #endif | 581 | 250 | return AUXESZ; | 582 | 204 | } |
coff-z80.c:coff_swap_aux_out Line | Count | Source | 503 | 193 | { | 504 | 193 | union internal_auxent * in = (union internal_auxent *) inp; | 505 | 193 | AUXENT *ext = (AUXENT *) extp; | 506 | | | 507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE | 508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); | 509 | | #endif | 510 | | | 511 | 193 | memset (ext, 0, AUXESZ); | 512 | | | 513 | 193 | switch (in_class) | 514 | 193 | { | 515 | 0 | case C_FILE: | 516 | 0 | if (in->x_file.x_n.x_fname[0] == 0) | 517 | 0 | { | 518 | 0 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); | 519 | 0 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); | 520 | 0 | } | 521 | 0 | else | 522 | | #if FILNMLEN != E_FILNMLEN | 523 | | #error we need to cope with truncating or extending xfname | 524 | | #endif | 525 | 0 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); | 526 | 0 | goto end; | 527 | | | 528 | 20 | case C_STAT: | 529 | 20 | #ifdef C_LEAFSTAT | 530 | 20 | case C_LEAFSTAT: | 531 | 20 | #endif | 532 | 20 | case C_HIDDEN: | 533 | 20 | if (type == T_NULL) | 534 | 0 | { | 535 | 0 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); | 536 | 0 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); | 537 | 0 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); | 538 | 0 | goto end; | 539 | 0 | } | 540 | 20 | break; | 541 | 193 | } | 542 | | | 543 | 193 | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); | 544 | 193 | #ifndef NO_TVNDX | 545 | 193 | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); | 546 | 193 | #endif | 547 | | | 548 | 193 | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 549 | 40 | || ISTAG (in_class)) | 550 | 161 | { | 551 | 161 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); | 552 | 161 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); | 553 | 161 | } | 554 | 32 | else | 555 | 32 | { | 556 | | #if DIMNUM != E_DIMNUM | 557 | | #error we need to cope with truncating or extending DIMNUM | 558 | | #endif | 559 | 32 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], | 560 | 32 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 561 | 32 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], | 562 | 32 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 563 | 32 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], | 564 | 32 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 565 | 32 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], | 566 | 32 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 567 | 32 | } | 568 | | | 569 | 193 | if (ISFCN (type)) | 570 | 193 | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); | 571 | 40 | else | 572 | 40 | { | 573 | 40 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); | 574 | 40 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); | 575 | 40 | } | 576 | | | 577 | 193 | end: | 578 | | #ifdef COFF_ADJUST_AUX_OUT_POST | 579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); | 580 | | #endif | 581 | 193 | return AUXESZ; | 582 | 193 | } |
coff-z8k.c:coff_swap_aux_out Line | Count | Source | 503 | 220 | { | 504 | 220 | union internal_auxent * in = (union internal_auxent *) inp; | 505 | 220 | AUXENT *ext = (AUXENT *) extp; | 506 | | | 507 | | #ifdef COFF_ADJUST_AUX_OUT_PRE | 508 | | COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); | 509 | | #endif | 510 | | | 511 | 220 | memset (ext, 0, AUXESZ); | 512 | | | 513 | 220 | switch (in_class) | 514 | 220 | { | 515 | 24 | case C_FILE: | 516 | 24 | if (in->x_file.x_n.x_fname[0] == 0) | 517 | 21 | { | 518 | 21 | H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); | 519 | 21 | H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset); | 520 | 21 | } | 521 | 3 | else | 522 | | #if FILNMLEN != E_FILNMLEN | 523 | | #error we need to cope with truncating or extending xfname | 524 | | #endif | 525 | 3 | memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN); | 526 | 24 | goto end; | 527 | | | 528 | 49 | case C_STAT: | 529 | 49 | #ifdef C_LEAFSTAT | 530 | 49 | case C_LEAFSTAT: | 531 | 49 | #endif | 532 | 49 | case C_HIDDEN: | 533 | 49 | if (type == T_NULL) | 534 | 0 | { | 535 | 0 | PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); | 536 | 0 | PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); | 537 | 0 | PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); | 538 | 0 | goto end; | 539 | 0 | } | 540 | 49 | break; | 541 | 220 | } | 542 | | | 543 | 196 | H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); | 544 | 196 | #ifndef NO_TVNDX | 545 | 196 | H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); | 546 | 196 | #endif | 547 | | | 548 | 196 | if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) | 549 | 131 | || ISTAG (in_class)) | 550 | 124 | { | 551 | 124 | PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); | 552 | 124 | PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); | 553 | 124 | } | 554 | 72 | else | 555 | 72 | { | 556 | | #if DIMNUM != E_DIMNUM | 557 | | #error we need to cope with truncating or extending DIMNUM | 558 | | #endif | 559 | 72 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], | 560 | 72 | ext->x_sym.x_fcnary.x_ary.x_dimen[0]); | 561 | 72 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], | 562 | 72 | ext->x_sym.x_fcnary.x_ary.x_dimen[1]); | 563 | 72 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], | 564 | 72 | ext->x_sym.x_fcnary.x_ary.x_dimen[2]); | 565 | 72 | H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], | 566 | 72 | ext->x_sym.x_fcnary.x_ary.x_dimen[3]); | 567 | 72 | } | 568 | | | 569 | 196 | if (ISFCN (type)) | 570 | 196 | H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize); | 571 | 134 | else | 572 | 134 | { | 573 | 134 | PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); | 574 | 134 | PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); | 575 | 134 | } | 576 | | | 577 | 220 | end: | 578 | | #ifdef COFF_ADJUST_AUX_OUT_POST | 579 | | COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); | 580 | | #endif | 581 | 220 | return AUXESZ; | 582 | 196 | } |
|
583 | | |
584 | | #endif /* NO_COFF_SYMBOLS */ |
585 | | |
586 | | #ifndef NO_COFF_LINENOS |
587 | | |
588 | | static void |
589 | | coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1) |
590 | 403k | { |
591 | 403k | LINENO *ext = (LINENO *) ext1; |
592 | 403k | struct internal_lineno *in = (struct internal_lineno *) in1; |
593 | | |
594 | 403k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); |
595 | 403k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); |
596 | 403k | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_in Unexecuted instantiation: coff-go32.c:coff_swap_lineno_in Unexecuted instantiation: coff-i386.c:coff_swap_lineno_in coff-rs6000.c:coff_swap_lineno_in Line | Count | Source | 590 | 66.9k | { | 591 | 66.9k | LINENO *ext = (LINENO *) ext1; | 592 | 66.9k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 66.9k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 66.9k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 66.9k | } |
coff-sh.c:coff_swap_lineno_in Line | Count | Source | 590 | 56.8k | { | 591 | 56.8k | LINENO *ext = (LINENO *) ext1; | 592 | 56.8k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 56.8k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 56.8k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 56.8k | } |
coff-stgo32.c:coff_swap_lineno_in Line | Count | Source | 590 | 43.7k | { | 591 | 43.7k | LINENO *ext = (LINENO *) ext1; | 592 | 43.7k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 43.7k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 43.7k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 43.7k | } |
coff-tic30.c:coff_swap_lineno_in Line | Count | Source | 590 | 82.4k | { | 591 | 82.4k | LINENO *ext = (LINENO *) ext1; | 592 | 82.4k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 82.4k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 82.4k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 82.4k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in coff-tic54x.c:coff_swap_lineno_in Line | Count | Source | 590 | 49.5k | { | 591 | 49.5k | LINENO *ext = (LINENO *) ext1; | 592 | 49.5k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 49.5k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 49.5k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 49.5k | } |
coff-z80.c:coff_swap_lineno_in Line | Count | Source | 590 | 51.9k | { | 591 | 51.9k | LINENO *ext = (LINENO *) ext1; | 592 | 51.9k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 51.9k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 51.9k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 51.9k | } |
coff-z8k.c:coff_swap_lineno_in Line | Count | Source | 590 | 52.4k | { | 591 | 52.4k | LINENO *ext = (LINENO *) ext1; | 592 | 52.4k | struct internal_lineno *in = (struct internal_lineno *) in1; | 593 | | | 594 | 52.4k | in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); | 595 | 52.4k | in->l_lnno = GET_LINENO_LNNO (abfd, ext); | 596 | 52.4k | } |
|
597 | | |
598 | | static unsigned int |
599 | | coff_swap_lineno_out (bfd * abfd, void * inp, void * outp) |
600 | 24 | { |
601 | 24 | struct internal_lineno *in = (struct internal_lineno *) inp; |
602 | 24 | struct external_lineno *ext = (struct external_lineno *) outp; |
603 | 24 | H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx); |
604 | | |
605 | 24 | PUT_LINENO_LNNO (abfd, in->l_lnno, ext); |
606 | 24 | return LINESZ; |
607 | 24 | } Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out coff-sh.c:coff_swap_lineno_out Line | Count | Source | 600 | 6 | { | 601 | 6 | struct internal_lineno *in = (struct internal_lineno *) inp; | 602 | 6 | struct external_lineno *ext = (struct external_lineno *) outp; | 603 | 6 | H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx); | 604 | | | 605 | 6 | PUT_LINENO_LNNO (abfd, in->l_lnno, ext); | 606 | 6 | return LINESZ; | 607 | 6 | } |
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out coff-tic30.c:coff_swap_lineno_out Line | Count | Source | 600 | 13 | { | 601 | 13 | struct internal_lineno *in = (struct internal_lineno *) inp; | 602 | 13 | struct external_lineno *ext = (struct external_lineno *) outp; | 603 | 13 | H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx); | 604 | | | 605 | 13 | PUT_LINENO_LNNO (abfd, in->l_lnno, ext); | 606 | 13 | return LINESZ; | 607 | 13 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out coff-z80.c:coff_swap_lineno_out Line | Count | Source | 600 | 5 | { | 601 | 5 | struct internal_lineno *in = (struct internal_lineno *) inp; | 602 | 5 | struct external_lineno *ext = (struct external_lineno *) outp; | 603 | 5 | H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx); | 604 | | | 605 | 5 | PUT_LINENO_LNNO (abfd, in->l_lnno, ext); | 606 | 5 | return LINESZ; | 607 | 5 | } |
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out |
608 | | |
609 | | #endif /* NO_COFF_LINENOS */ |
610 | | |
611 | | static void |
612 | | coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1) |
613 | 12.5k | { |
614 | 12.5k | AOUTHDR *aouthdr_ext; |
615 | 12.5k | struct internal_aouthdr *aouthdr_int; |
616 | | |
617 | 12.5k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; |
618 | 12.5k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; |
619 | 12.5k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); |
620 | 12.5k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); |
621 | 12.5k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); |
622 | 12.5k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); |
623 | 12.5k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); |
624 | 12.5k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); |
625 | 12.5k | aouthdr_int->text_start = |
626 | 12.5k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); |
627 | 12.5k | aouthdr_int->data_start = |
628 | 12.5k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); |
629 | | |
630 | | #ifdef RS6000COFF_C |
631 | | #ifdef XCOFF64 |
632 | 954 | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); |
633 | | #else |
634 | 1.18k | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); |
635 | | #endif |
636 | 2.13k | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); |
637 | 2.13k | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); |
638 | 2.13k | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); |
639 | 2.13k | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); |
640 | 2.13k | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); |
641 | 2.13k | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); |
642 | 2.13k | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); |
643 | 2.13k | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); |
644 | 2.13k | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); |
645 | 2.13k | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); |
646 | | #ifdef XCOFF64 |
647 | 954 | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); |
648 | 954 | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); |
649 | | #else |
650 | 1.18k | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); |
651 | 1.18k | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); |
652 | | #endif |
653 | | #endif |
654 | | |
655 | | #ifdef MIPSECOFF |
656 | 1.01k | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); |
657 | 1.01k | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); |
658 | 1.01k | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); |
659 | 1.01k | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); |
660 | 1.01k | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); |
661 | 1.01k | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); |
662 | 1.01k | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); |
663 | | #endif |
664 | | |
665 | | #ifdef ALPHAECOFF |
666 | 608 | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); |
667 | 608 | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); |
668 | 608 | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); |
669 | 608 | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); |
670 | | #endif |
671 | 12.5k | } coff-alpha.c:alpha_ecoff_swap_aouthdr_in Line | Count | Source | 613 | 608 | { | 614 | 608 | AOUTHDR *aouthdr_ext; | 615 | 608 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 608 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 608 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 608 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 608 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 608 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 608 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 608 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 608 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 608 | aouthdr_int->text_start = | 626 | 608 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 608 | aouthdr_int->data_start = | 628 | 608 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | 608 | #ifdef ALPHAECOFF | 666 | 608 | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | 608 | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | 608 | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | 608 | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | 608 | #endif | 671 | 608 | } |
coff64-rs6000.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 954 | { | 614 | 954 | AOUTHDR *aouthdr_ext; | 615 | 954 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 954 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 954 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 954 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 954 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 954 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 954 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 954 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 954 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 954 | aouthdr_int->text_start = | 626 | 954 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 954 | aouthdr_int->data_start = | 628 | 954 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | 954 | #ifdef RS6000COFF_C | 631 | 954 | #ifdef XCOFF64 | 632 | 954 | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | 954 | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | 954 | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | 954 | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | 954 | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | 954 | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | 954 | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | 954 | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | 954 | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | 954 | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | 954 | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | 954 | #ifdef XCOFF64 | 647 | 954 | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | 954 | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | 954 | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 954 | } |
cf-i386lynx.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 741 | { | 614 | 741 | AOUTHDR *aouthdr_ext; | 615 | 741 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 741 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 741 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 741 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 741 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 741 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 741 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 741 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 741 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 741 | aouthdr_int->text_start = | 626 | 741 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 741 | aouthdr_int->data_start = | 628 | 741 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 741 | } |
coff-go32.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 741 | { | 614 | 741 | AOUTHDR *aouthdr_ext; | 615 | 741 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 741 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 741 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 741 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 741 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 741 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 741 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 741 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 741 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 741 | aouthdr_int->text_start = | 626 | 741 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 741 | aouthdr_int->data_start = | 628 | 741 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 741 | } |
coff-i386.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 741 | { | 614 | 741 | AOUTHDR *aouthdr_ext; | 615 | 741 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 741 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 741 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 741 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 741 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 741 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 741 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 741 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 741 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 741 | aouthdr_int->text_start = | 626 | 741 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 741 | aouthdr_int->data_start = | 628 | 741 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 741 | } |
coff-mips.c:mips_ecoff_swap_aouthdr_in Line | Count | Source | 613 | 1.01k | { | 614 | 1.01k | AOUTHDR *aouthdr_ext; | 615 | 1.01k | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 1.01k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 1.01k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 1.01k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 1.01k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 1.01k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 1.01k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 1.01k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 1.01k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 1.01k | aouthdr_int->text_start = | 626 | 1.01k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 1.01k | aouthdr_int->data_start = | 628 | 1.01k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | 1.01k | #ifdef MIPSECOFF | 656 | 1.01k | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | 1.01k | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | 1.01k | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | 1.01k | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | 1.01k | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | 1.01k | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | 1.01k | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | 1.01k | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 1.01k | } |
coff-rs6000.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 1.18k | { | 614 | 1.18k | AOUTHDR *aouthdr_ext; | 615 | 1.18k | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 1.18k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 1.18k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 1.18k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 1.18k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 1.18k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 1.18k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 1.18k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 1.18k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 1.18k | aouthdr_int->text_start = | 626 | 1.18k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 1.18k | aouthdr_int->data_start = | 628 | 1.18k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | 1.18k | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | 1.18k | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | 1.18k | #endif | 636 | 1.18k | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | 1.18k | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | 1.18k | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | 1.18k | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | 1.18k | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | 1.18k | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | 1.18k | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | 1.18k | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | 1.18k | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | 1.18k | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | 1.18k | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | 1.18k | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | 1.18k | #endif | 653 | 1.18k | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 1.18k | } |
coff-sh.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 943 | { | 614 | 943 | AOUTHDR *aouthdr_ext; | 615 | 943 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 943 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 943 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 943 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 943 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 943 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 943 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 943 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 943 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 943 | aouthdr_int->text_start = | 626 | 943 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 943 | aouthdr_int->data_start = | 628 | 943 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 943 | } |
coff-stgo32.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 849 | { | 614 | 849 | AOUTHDR *aouthdr_ext; | 615 | 849 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 849 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 849 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 849 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 849 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 849 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 849 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 849 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 849 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 849 | aouthdr_int->text_start = | 626 | 849 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 849 | aouthdr_int->data_start = | 628 | 849 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 849 | } |
coff-tic30.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 833 | { | 614 | 833 | AOUTHDR *aouthdr_ext; | 615 | 833 | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 833 | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 833 | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 833 | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 833 | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 833 | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 833 | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 833 | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 833 | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 833 | aouthdr_int->text_start = | 626 | 833 | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 833 | aouthdr_int->data_start = | 628 | 833 | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 833 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in coff-tic54x.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 1.11k | { | 614 | 1.11k | AOUTHDR *aouthdr_ext; | 615 | 1.11k | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 1.11k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 1.11k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 1.11k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 1.11k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 1.11k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 1.11k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 1.11k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 1.11k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 1.11k | aouthdr_int->text_start = | 626 | 1.11k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 1.11k | aouthdr_int->data_start = | 628 | 1.11k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 1.11k | } |
coff-z80.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 1.47k | { | 614 | 1.47k | AOUTHDR *aouthdr_ext; | 615 | 1.47k | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 1.47k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 1.47k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 1.47k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 1.47k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 1.47k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 1.47k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 1.47k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 1.47k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 1.47k | aouthdr_int->text_start = | 626 | 1.47k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 1.47k | aouthdr_int->data_start = | 628 | 1.47k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 1.47k | } |
coff-z8k.c:coff_swap_aouthdr_in Line | Count | Source | 613 | 1.30k | { | 614 | 1.30k | AOUTHDR *aouthdr_ext; | 615 | 1.30k | struct internal_aouthdr *aouthdr_int; | 616 | | | 617 | 1.30k | aouthdr_ext = (AOUTHDR *) aouthdr_ext1; | 618 | 1.30k | aouthdr_int = (struct internal_aouthdr *) aouthdr_int1; | 619 | 1.30k | aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic); | 620 | 1.30k | aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp); | 621 | 1.30k | aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize); | 622 | 1.30k | aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize); | 623 | 1.30k | aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize); | 624 | 1.30k | aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry); | 625 | 1.30k | aouthdr_int->text_start = | 626 | 1.30k | GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start); | 627 | 1.30k | aouthdr_int->data_start = | 628 | 1.30k | GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start); | 629 | | | 630 | | #ifdef RS6000COFF_C | 631 | | #ifdef XCOFF64 | 632 | | aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc); | 633 | | #else | 634 | | aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc); | 635 | | #endif | 636 | | aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry); | 637 | | aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext); | 638 | | aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata); | 639 | | aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc); | 640 | | aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader); | 641 | | aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss); | 642 | | aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext); | 643 | | aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata); | 644 | | aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype); | 645 | | aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype); | 646 | | #ifdef XCOFF64 | 647 | | aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack); | 648 | | aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata); | 649 | | #else | 650 | | aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack); | 651 | | aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata); | 652 | | #endif | 653 | | #endif | 654 | | | 655 | | #ifdef MIPSECOFF | 656 | | aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start); | 657 | | aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value); | 658 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 659 | | aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]); | 660 | | aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]); | 661 | | aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]); | 662 | | aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]); | 663 | | #endif | 664 | | | 665 | | #ifdef ALPHAECOFF | 666 | | aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start); | 667 | | aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value); | 668 | | aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask); | 669 | | aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask); | 670 | | #endif | 671 | 1.30k | } |
|
672 | | |
673 | | static unsigned int |
674 | | coff_swap_aouthdr_out (bfd * abfd, void * in, void * out) |
675 | 470 | { |
676 | 470 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; |
677 | 470 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; |
678 | | |
679 | 470 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); |
680 | 470 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); |
681 | 470 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); |
682 | 470 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); |
683 | 470 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); |
684 | 470 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); |
685 | 470 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, |
686 | 470 | aouthdr_out->text_start); |
687 | 470 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, |
688 | 470 | aouthdr_out->data_start); |
689 | | |
690 | | #ifdef RS6000COFF_C |
691 | | #ifdef XCOFF64 |
692 | 18 | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); |
693 | | #else |
694 | 121 | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); |
695 | | #endif |
696 | 139 | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); |
697 | 139 | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); |
698 | 139 | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); |
699 | 139 | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); |
700 | 139 | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); |
701 | 139 | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); |
702 | 139 | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); |
703 | 139 | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); |
704 | 139 | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); |
705 | 139 | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); |
706 | | #ifdef XCOFF64 |
707 | 18 | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); |
708 | 18 | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); |
709 | | #else |
710 | 121 | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); |
711 | 121 | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); |
712 | | #endif |
713 | | /* TODO: set o_*psize dynamically */ |
714 | 139 | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); |
715 | 139 | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); |
716 | 139 | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); |
717 | 139 | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); |
718 | 139 | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); |
719 | 139 | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); |
720 | 139 | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); |
721 | | #ifdef XCOFF64 |
722 | 18 | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); |
723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); |
724 | | #endif |
725 | | #endif |
726 | | |
727 | | #ifdef MIPSECOFF |
728 | 115 | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); |
729 | 115 | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); |
730 | 115 | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); |
731 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); |
732 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); |
733 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); |
734 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); |
735 | | #endif |
736 | | |
737 | | #ifdef ALPHAECOFF |
738 | | /* FIXME: What does bldrev mean? */ |
739 | 67 | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); |
740 | 67 | H_PUT_16 (abfd, 0, aouthdr_out->padding); |
741 | 67 | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); |
742 | 67 | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); |
743 | 67 | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); |
744 | 67 | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); |
745 | | #endif |
746 | | |
747 | 470 | return AOUTSZ; |
748 | 470 | } coff-alpha.c:alpha_ecoff_swap_aouthdr_out Line | Count | Source | 675 | 67 | { | 676 | 67 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 67 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 67 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 67 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 67 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 67 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 67 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 67 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 67 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 67 | aouthdr_out->text_start); | 687 | 67 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 67 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | 67 | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | 67 | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | 67 | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | 67 | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | 67 | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | 67 | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | 67 | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | 67 | #endif | 746 | | | 747 | 67 | return AOUTSZ; | 748 | 67 | } |
coff64-rs6000.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 18 | { | 676 | 18 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 18 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 18 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 18 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 18 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 18 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 18 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 18 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 18 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 18 | aouthdr_out->text_start); | 687 | 18 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 18 | aouthdr_out->data_start); | 689 | | | 690 | 18 | #ifdef RS6000COFF_C | 691 | 18 | #ifdef XCOFF64 | 692 | 18 | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | 18 | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | 18 | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | 18 | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | 18 | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | 18 | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | 18 | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | 18 | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | 18 | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | 18 | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | 18 | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | 18 | #ifdef XCOFF64 | 707 | 18 | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | 18 | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | 18 | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | 18 | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | 18 | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | 18 | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | 18 | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | 18 | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | 18 | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | 18 | #ifdef XCOFF64 | 722 | 18 | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | 18 | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | 18 | #endif | 725 | 18 | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 18 | return AOUTSZ; | 748 | 18 | } |
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aouthdr_out Unexecuted instantiation: coff-go32.c:coff_swap_aouthdr_out Unexecuted instantiation: coff-i386.c:coff_swap_aouthdr_out coff-mips.c:mips_ecoff_swap_aouthdr_out Line | Count | Source | 675 | 115 | { | 676 | 115 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 115 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 115 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 115 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 115 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 115 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 115 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 115 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 115 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 115 | aouthdr_out->text_start); | 687 | 115 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 115 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | 115 | #ifdef MIPSECOFF | 728 | 115 | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | 115 | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | 115 | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | 115 | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | 115 | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 115 | return AOUTSZ; | 748 | 115 | } |
coff-rs6000.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 121 | { | 676 | 121 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 121 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 121 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 121 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 121 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 121 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 121 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 121 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 121 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 121 | aouthdr_out->text_start); | 687 | 121 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 121 | aouthdr_out->data_start); | 689 | | | 690 | 121 | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | 121 | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | 121 | #endif | 696 | 121 | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | 121 | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | 121 | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | 121 | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | 121 | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | 121 | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | 121 | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | 121 | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | 121 | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | 121 | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | 121 | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | 121 | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | 121 | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | 121 | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | 121 | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | 121 | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | 121 | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | 121 | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | 121 | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | 121 | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | 121 | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 121 | return AOUTSZ; | 748 | 121 | } |
coff-sh.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 32 | { | 676 | 32 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 32 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 32 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 32 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 32 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 32 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 32 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 32 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 32 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 32 | aouthdr_out->text_start); | 687 | 32 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 32 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 32 | return AOUTSZ; | 748 | 32 | } |
coff-stgo32.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 9 | { | 676 | 9 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 9 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 9 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 9 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 9 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 9 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 9 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 9 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 9 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 9 | aouthdr_out->text_start); | 687 | 9 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 9 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 9 | return AOUTSZ; | 748 | 9 | } |
coff-tic30.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 22 | { | 676 | 22 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 22 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 22 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 22 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 22 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 22 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 22 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 22 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 22 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 22 | aouthdr_out->text_start); | 687 | 22 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 22 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 22 | return AOUTSZ; | 748 | 22 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out coff-tic54x.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 24 | { | 676 | 24 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 24 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 24 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 24 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 24 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 24 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 24 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 24 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 24 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 24 | aouthdr_out->text_start); | 687 | 24 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 24 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 24 | return AOUTSZ; | 748 | 24 | } |
coff-z80.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 34 | { | 676 | 34 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 34 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 34 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 34 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 34 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 34 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 34 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 34 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 34 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 34 | aouthdr_out->text_start); | 687 | 34 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 34 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 34 | return AOUTSZ; | 748 | 34 | } |
coff-z8k.c:coff_swap_aouthdr_out Line | Count | Source | 675 | 28 | { | 676 | 28 | struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; | 677 | 28 | AOUTHDR *aouthdr_out = (AOUTHDR *) out; | 678 | | | 679 | 28 | H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic); | 680 | 28 | H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp); | 681 | 28 | PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize); | 682 | 28 | PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize); | 683 | 28 | PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize); | 684 | 28 | PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry); | 685 | 28 | PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, | 686 | 28 | aouthdr_out->text_start); | 687 | 28 | PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, | 688 | 28 | aouthdr_out->data_start); | 689 | | | 690 | | #ifdef RS6000COFF_C | 691 | | #ifdef XCOFF64 | 692 | | H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 693 | | #else | 694 | | H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); | 695 | | #endif | 696 | | H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); | 697 | | H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); | 698 | | H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); | 699 | | H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc); | 700 | | H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader); | 701 | | H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss); | 702 | | H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext); | 703 | | H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); | 704 | | H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); | 705 | | H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); | 706 | | #ifdef XCOFF64 | 707 | | H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 708 | | H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 709 | | #else | 710 | | H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); | 711 | | H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); | 712 | | #endif | 713 | | /* TODO: set o_*psize dynamically */ | 714 | | H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); | 715 | | H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); | 716 | | H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); | 717 | | H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); | 718 | | H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); | 719 | | H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); | 720 | | H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); | 721 | | #ifdef XCOFF64 | 722 | | H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); | 723 | | memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); | 724 | | #endif | 725 | | #endif | 726 | | | 727 | | #ifdef MIPSECOFF | 728 | | H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 729 | | H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 730 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 731 | | H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]); | 732 | | H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]); | 733 | | H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]); | 734 | | H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]); | 735 | | #endif | 736 | | | 737 | | #ifdef ALPHAECOFF | 738 | | /* FIXME: What does bldrev mean? */ | 739 | | H_PUT_16 (abfd, 2, aouthdr_out->bldrev); | 740 | | H_PUT_16 (abfd, 0, aouthdr_out->padding); | 741 | | H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start); | 742 | | H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value); | 743 | | H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask); | 744 | | H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask); | 745 | | #endif | 746 | | | 747 | 28 | return AOUTSZ; | 748 | 28 | } |
|
749 | | |
750 | | ATTRIBUTE_UNUSED |
751 | | static void |
752 | | coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in) |
753 | 1.11M | { |
754 | 1.11M | SCNHDR *scnhdr_ext = (SCNHDR *) ext; |
755 | 1.11M | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; |
756 | | |
757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE |
758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); |
759 | | #endif |
760 | 1.11M | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); |
761 | | |
762 | 1.11M | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); |
763 | 1.11M | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); |
764 | 1.11M | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); |
765 | | |
766 | 1.11M | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); |
767 | 1.11M | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); |
768 | 1.11M | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); |
769 | 1.11M | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); |
770 | 1.11M | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); |
771 | 1.11M | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); |
772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST |
773 | 90.0k | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); |
774 | | #endif |
775 | 1.11M | } coff-alpha.c:alpha_ecoff_swap_scnhdr_in Line | Count | Source | 753 | 16.3k | { | 754 | 16.3k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 16.3k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 16.3k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 16.3k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 16.3k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 16.3k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 16.3k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 16.3k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 16.3k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 16.3k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 16.3k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 16.3k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 16.3k | } |
coff64-rs6000.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 47.8k | { | 754 | 47.8k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 47.8k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 47.8k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 47.8k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 47.8k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 47.8k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 47.8k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 47.8k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 47.8k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 47.8k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 47.8k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 47.8k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 47.8k | } |
cf-i386lynx.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 106k | { | 754 | 106k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 106k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 106k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 106k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 106k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 106k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 106k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 106k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 106k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 106k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 106k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 106k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 106k | } |
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in coff-i386.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 106k | { | 754 | 106k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 106k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 106k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 106k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 106k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 106k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 106k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 106k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 106k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 106k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 106k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 106k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 106k | } |
coff-mips.c:mips_ecoff_swap_scnhdr_in Line | Count | Source | 753 | 170k | { | 754 | 170k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 170k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 170k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 170k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 170k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 170k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 170k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 170k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 170k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 170k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 170k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 170k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 170k | } |
coff-rs6000.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 91.2k | { | 754 | 91.2k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 91.2k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 91.2k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 91.2k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 91.2k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 91.2k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 91.2k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 91.2k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 91.2k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 91.2k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 91.2k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 91.2k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 91.2k | } |
coff-sh.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 123k | { | 754 | 123k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 123k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 123k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 123k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 123k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 123k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 123k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 123k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 123k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 123k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 123k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 123k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 123k | } |
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in coff-tic30.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 87.9k | { | 754 | 87.9k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 87.9k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 87.9k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 87.9k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 87.9k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 87.9k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 87.9k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 87.9k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 87.9k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 87.9k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 87.9k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 87.9k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 87.9k | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in coff-tic54x.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 90.0k | { | 754 | 90.0k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 90.0k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 90.0k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 90.0k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 90.0k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 90.0k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 90.0k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 90.0k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 90.0k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 90.0k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 90.0k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 90.0k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | 90.0k | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | 90.0k | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | 90.0k | #endif | 775 | 90.0k | } |
coff-z80.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 125k | { | 754 | 125k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 125k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 125k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 125k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 125k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 125k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 125k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 125k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 125k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 125k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 125k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 125k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 125k | } |
coff-z8k.c:coff_swap_scnhdr_in Line | Count | Source | 753 | 147k | { | 754 | 147k | SCNHDR *scnhdr_ext = (SCNHDR *) ext; | 755 | 147k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 756 | | | 757 | | #ifdef COFF_ADJUST_SCNHDR_IN_PRE | 758 | | COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); | 759 | | #endif | 760 | 147k | memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); | 761 | | | 762 | 147k | scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr); | 763 | 147k | scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr); | 764 | 147k | scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size); | 765 | | | 766 | 147k | scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr); | 767 | 147k | scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr); | 768 | 147k | scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr); | 769 | 147k | scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags); | 770 | 147k | scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc); | 771 | 147k | scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno); | 772 | | #ifdef COFF_ADJUST_SCNHDR_IN_POST | 773 | | COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in); | 774 | | #endif | 775 | 147k | } |
|
776 | | |
777 | | ATTRIBUTE_UNUSED |
778 | | static unsigned int |
779 | | coff_swap_scnhdr_out (bfd * abfd, void * in, void * out, |
780 | | const asection *section ATTRIBUTE_UNUSED) |
781 | 1.61k | { |
782 | 1.61k | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; |
783 | 1.61k | SCNHDR *scnhdr_ext = (SCNHDR *) out; |
784 | 1.61k | unsigned int ret = bfd_coff_scnhsz (abfd); |
785 | | |
786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE |
787 | 121 | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); |
788 | | #endif |
789 | 1.61k | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); |
790 | | |
791 | 1.61k | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); |
792 | 1.61k | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); |
793 | 1.61k | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); |
794 | 1.61k | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); |
795 | 1.61k | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); |
796 | 1.61k | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); |
797 | 1.61k | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); |
798 | 1.61k | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) |
799 | 1.61k | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); |
800 | 0 | else |
801 | 0 | { |
802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; |
803 | |
|
804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); |
805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; |
806 | 0 | _bfd_error_handler |
807 | | /* xgettext:c-format */ |
808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), |
809 | 0 | abfd, buf, scnhdr_int->s_nlnno); |
810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); |
811 | 0 | } |
812 | | |
813 | 1.61k | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) |
814 | 1.61k | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); |
815 | 0 | else |
816 | 0 | { |
817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; |
818 | |
|
819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); |
820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; |
821 | | /* xgettext:c-format */ |
822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), |
823 | 0 | abfd, buf, scnhdr_int->s_nreloc); |
824 | 0 | bfd_set_error (bfd_error_file_truncated); |
825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); |
826 | 0 | ret = 0; |
827 | 0 | } |
828 | | |
829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST |
830 | 193 | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); |
831 | | #endif |
832 | 1.61k | return ret; |
833 | 1.61k | } coff-alpha.c:alpha_ecoff_swap_scnhdr_out Line | Count | Source | 781 | 61 | { | 782 | 61 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 61 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 61 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 61 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 61 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 61 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 61 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 61 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 61 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 61 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 61 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 61 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 61 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 61 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 61 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 61 | return ret; | 833 | 61 | } |
coff64-rs6000.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 72 | { | 782 | 72 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 72 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 72 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 72 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 72 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 72 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 72 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 72 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 72 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 72 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 72 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 72 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 72 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 72 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 72 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | 72 | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | 72 | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | 72 | #endif | 832 | 72 | return ret; | 833 | 72 | } |
Unexecuted instantiation: cf-i386lynx.c:coff_swap_scnhdr_out Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_out Unexecuted instantiation: coff-i386.c:coff_swap_scnhdr_out coff-mips.c:mips_ecoff_swap_scnhdr_out Line | Count | Source | 781 | 446 | { | 782 | 446 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 446 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 446 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 446 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 446 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 446 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 446 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 446 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 446 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 446 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 446 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 446 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 446 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 446 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 446 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 446 | return ret; | 833 | 446 | } |
coff-rs6000.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 84 | { | 782 | 84 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 84 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 84 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 84 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 84 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 84 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 84 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 84 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 84 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 84 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 84 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 84 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 84 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 84 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 84 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 84 | return ret; | 833 | 84 | } |
coff-sh.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 113 | { | 782 | 113 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 113 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 113 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 113 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 113 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 113 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 113 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 113 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 113 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 113 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 113 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 113 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 113 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 113 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 113 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 113 | return ret; | 833 | 113 | } |
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out coff-tic30.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 401 | { | 782 | 401 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 401 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 401 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 401 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 401 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 401 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 401 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 401 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 401 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 401 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 401 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 401 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 401 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 401 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 401 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 401 | return ret; | 833 | 401 | } |
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out coff-tic54x.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 121 | { | 782 | 121 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 121 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 121 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | 121 | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | 121 | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | 121 | #endif | 789 | 121 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 121 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 121 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 121 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 121 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 121 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 121 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 121 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 121 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 121 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 121 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 121 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | 121 | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | 121 | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | 121 | #endif | 832 | 121 | return ret; | 833 | 121 | } |
coff-z80.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 124 | { | 782 | 124 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 124 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 124 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 124 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 124 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 124 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 124 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 124 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 124 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 124 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 124 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 124 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 124 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 124 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 124 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 124 | return ret; | 833 | 124 | } |
coff-z8k.c:coff_swap_scnhdr_out Line | Count | Source | 781 | 195 | { | 782 | 195 | struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; | 783 | 195 | SCNHDR *scnhdr_ext = (SCNHDR *) out; | 784 | 195 | unsigned int ret = bfd_coff_scnhsz (abfd); | 785 | | | 786 | | #ifdef COFF_ADJUST_SCNHDR_OUT_PRE | 787 | | COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); | 788 | | #endif | 789 | 195 | memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 790 | | | 791 | 195 | PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr); | 792 | 195 | PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr); | 793 | 195 | PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size); | 794 | 195 | PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr); | 795 | 195 | PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr); | 796 | 195 | PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr); | 797 | 195 | PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags); | 798 | 195 | if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) | 799 | 195 | PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno); | 800 | 0 | else | 801 | 0 | { | 802 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 803 | |
| 804 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 805 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 806 | 0 | _bfd_error_handler | 807 | | /* xgettext:c-format */ | 808 | 0 | (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"), | 809 | 0 | abfd, buf, scnhdr_int->s_nlnno); | 810 | 0 | PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno); | 811 | 0 | } | 812 | | | 813 | 195 | if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) | 814 | 195 | PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); | 815 | 0 | else | 816 | 0 | { | 817 | 0 | char buf[sizeof (scnhdr_int->s_name) + 1]; | 818 | |
| 819 | 0 | memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); | 820 | 0 | buf[sizeof (scnhdr_int->s_name)] = '\0'; | 821 | | /* xgettext:c-format */ | 822 | 0 | _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"), | 823 | 0 | abfd, buf, scnhdr_int->s_nreloc); | 824 | 0 | bfd_set_error (bfd_error_file_truncated); | 825 | 0 | PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc); | 826 | 0 | ret = 0; | 827 | 0 | } | 828 | | | 829 | | #ifdef COFF_ADJUST_SCNHDR_OUT_POST | 830 | | COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out); | 831 | | #endif | 832 | 195 | return ret; | 833 | 195 | } |
|