Coverage Report

Created: 2025-07-08 11:15

/src/binutils-gdb/bfd/coffswap.h
Line
Count
Source (jump to first uncovered line)
1
/* Generic COFF swapping routines, for BFD.
2
   Copyright (C) 1990-2025 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
1.48M
  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
1.48M
  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
0
  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
0
  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
7.70M
  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
6.37M
  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
0
  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
0
  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
9.62k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
14.4k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
14.4k
  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
0
  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
0
  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
0
  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
1.41M
  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
57.1M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
6
#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
222k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
4
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
222k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
4
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
222k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
4
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
222k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
4
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
222k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
4
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
222k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
4
#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
85.0M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
3
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
85.0M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
3
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
77.1M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
3
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
85.0M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
3
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
85.0M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
3
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
85.0M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
3
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
77.2M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
3
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
3
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
77.2M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
3
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
3
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
79.2M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
3
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
176k
#define GET_RELOC_VADDR H_GET_32
207
#endif
208
#ifndef PUT_RELOC_VADDR
209
0
#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
176k
{
217
176k
  RELOC *reloc_src = (RELOC *) src;
218
176k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
176k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
176k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
176k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
9.15k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
176k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
8.32k
{
217
8.32k
  RELOC *reloc_src = (RELOC *) src;
218
8.32k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
8.32k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
8.32k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
8.32k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
8.32k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
140k
{
217
140k
  RELOC *reloc_src = (RELOC *) src;
218
140k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
140k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
140k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
140k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
140k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
1.56k
{
217
1.56k
  RELOC *reloc_src = (RELOC *) src;
218
1.56k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
1.56k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
1.56k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
1.56k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
1.56k
#ifdef SWAP_IN_RELOC_OFFSET
225
1.56k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
1.56k
#endif
227
1.56k
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
18.3k
{
217
18.3k
  RELOC *reloc_src = (RELOC *) src;
218
18.3k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
18.3k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
18.3k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
18.3k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
18.3k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
1.49k
{
217
1.49k
  RELOC *reloc_src = (RELOC *) src;
218
1.49k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
1.49k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
1.49k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
1.49k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
1.49k
#ifdef SWAP_IN_RELOC_OFFSET
225
1.49k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
1.49k
#endif
227
1.49k
}
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
5.80k
{
217
5.80k
  RELOC *reloc_src = (RELOC *) src;
218
5.80k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
5.80k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
5.80k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
5.80k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
5.80k
#ifdef SWAP_IN_RELOC_OFFSET
225
5.80k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
5.80k
#endif
227
5.80k
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
290
{
217
290
  RELOC *reloc_src = (RELOC *) src;
218
290
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
290
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
290
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
290
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
290
#ifdef SWAP_IN_RELOC_OFFSET
225
290
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
290
#endif
227
290
}
228
229
static unsigned int
230
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
231
0
{
232
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
0
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
0
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
0
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
0
  return bfd_coff_relsz (abfd);
247
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_out
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
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out
248
249
#ifdef TICOFF
250
static void
251
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
252
138
{
253
138
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
138
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
138
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
138
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
138
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
138
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
138
{
253
138
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
138
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
138
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
138
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
138
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
138
}
260
261
static unsigned int
262
coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst)
263
0
{
264
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
265
0
  struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst;
266
267
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
268
0
  H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
269
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
270
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
271
272
0
  return bfd_coff_relsz (abfd);
273
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out
274
#endif
275
276
#endif /* NO_COFF_RELOCS */
277
278
static void
279
coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
280
65.1M
{
281
65.1M
  FILHDR *filehdr_src = (FILHDR *) src;
282
65.1M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
65.1M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
65.1M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
65.1M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
65.1M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
65.1M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
65.1M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
65.1M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
16.2M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
65.1M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
2.69M
{
281
2.69M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.69M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.69M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.69M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.69M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.69M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.69M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.69M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.69M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.69M
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
2.73M
{
281
2.73M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.73M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.73M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.73M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.73M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.73M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.73M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.73M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.73M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.73M
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
5.38M
{
281
5.38M
  FILHDR *filehdr_src = (FILHDR *) src;
282
5.38M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
5.38M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
5.38M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
5.38M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
5.38M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
5.38M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
5.38M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
5.38M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
5.38M
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
2.73M
{
281
2.73M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.73M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.73M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.73M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.73M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.73M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.73M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.73M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.73M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.73M
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
2.73M
{
281
2.73M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.73M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.73M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.73M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.73M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.73M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.73M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.73M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.73M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.73M
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
2.73M
{
281
2.73M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.73M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.73M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.73M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.73M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.73M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.73M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.73M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.73M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.73M
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
8.18M
{
281
8.18M
  FILHDR *filehdr_src = (FILHDR *) src;
282
8.18M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
8.18M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
8.18M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
8.18M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
8.18M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
8.18M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
8.18M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
8.18M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
8.18M
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
2.72M
{
281
2.72M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.72M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.72M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.72M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.72M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.72M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.72M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.72M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.72M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.72M
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
10.7M
{
281
10.7M
  FILHDR *filehdr_src = (FILHDR *) src;
282
10.7M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
10.7M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
10.7M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
10.7M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
10.7M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
10.7M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
10.7M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
10.7M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
10.7M
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
2.15k
{
281
2.15k
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.15k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.15k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.15k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.15k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.15k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.15k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.15k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.15k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.15k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
2.72M
{
281
2.72M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.72M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.72M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.72M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.72M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.72M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.72M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.72M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.72M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.72M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
16.2M
{
281
16.2M
  FILHDR *filehdr_src = (FILHDR *) src;
282
16.2M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
16.2M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
16.2M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
16.2M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
16.2M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
16.2M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
16.2M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
16.2M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
16.2M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
16.2M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
16.2M
#endif
298
16.2M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
2.72M
{
281
2.72M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.72M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.72M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.72M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.72M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.72M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.72M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.72M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.72M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.72M
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
2.72M
{
281
2.72M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.72M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.72M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.72M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.72M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.72M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.72M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.72M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.72M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.72M
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
10
{
303
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
10
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
10
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
0
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
10
  return bfd_coff_filhsz (abfd);
321
10
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
4
{
303
4
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
4
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
4
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
4
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
4
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
4
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
4
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
4
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
4
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
4
  return bfd_coff_filhsz (abfd);
321
4
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
2
{
303
2
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
2
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
2
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
2
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
2
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
2
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
2
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
2
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
2
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
2
  return bfd_coff_filhsz (abfd);
321
2
}
Unexecuted instantiation: coff64-rs6000.c:coff_swap_filehdr_out
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
302
4
{
303
4
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
4
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
4
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
4
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
4
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
4
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
4
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
4
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
4
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
4
  return bfd_coff_filhsz (abfd);
321
4
}
Unexecuted instantiation: coff-rs6000.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_filehdr_out
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
1.13M
{
328
1.13M
  SYMENT *ext = (SYMENT *) ext1;
329
1.13M
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.13M
  if (ext->e.e_name[0] == 0)
332
771k
    {
333
771k
      in->_n._n_n._n_zeroes = 0;
334
771k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
771k
    }
336
358k
  else
337
358k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
358k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
358k
#endif
343
358k
    }
344
345
1.13M
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.13M
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.13M
  if (sizeof (ext->e_type) == 2)
348
1.13M
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
1.13M
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.13M
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
222k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
1.13M
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
348k
{
328
348k
  SYMENT *ext = (SYMENT *) ext1;
329
348k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
348k
  if (ext->e.e_name[0] == 0)
332
218k
    {
333
218k
      in->_n._n_n._n_zeroes = 0;
334
218k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
218k
    }
336
130k
  else
337
130k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
130k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
130k
#endif
343
130k
    }
344
345
348k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
348k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
348k
  if (sizeof (ext->e_type) == 2)
348
348k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
348k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
348k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
348k
}
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
327
186k
{
328
186k
  SYMENT *ext = (SYMENT *) ext1;
329
186k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
186k
  if (ext->e.e_name[0] == 0)
332
135k
    {
333
135k
      in->_n._n_n._n_zeroes = 0;
334
135k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
135k
    }
336
50.8k
  else
337
50.8k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
50.8k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
50.8k
#endif
343
50.8k
    }
344
345
186k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
186k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
186k
  if (sizeof (ext->e_type) == 2)
348
186k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
186k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
186k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
186k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
86.6k
{
328
86.6k
  SYMENT *ext = (SYMENT *) ext1;
329
86.6k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
86.6k
  if (ext->e.e_name[0] == 0)
332
59.2k
    {
333
59.2k
      in->_n._n_n._n_zeroes = 0;
334
59.2k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
59.2k
    }
336
27.4k
  else
337
27.4k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
27.4k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
27.4k
#endif
343
27.4k
    }
344
345
86.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
86.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
86.6k
  if (sizeof (ext->e_type) == 2)
348
86.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
86.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
86.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
86.6k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
222k
{
328
222k
  SYMENT *ext = (SYMENT *) ext1;
329
222k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
222k
  if (ext->e.e_name[0] == 0)
332
159k
    {
333
159k
      in->_n._n_n._n_zeroes = 0;
334
159k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
159k
    }
336
62.6k
  else
337
62.6k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
62.6k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
62.6k
#endif
343
62.6k
    }
344
345
222k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
222k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
222k
  if (sizeof (ext->e_type) == 2)
348
222k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
222k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
222k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
222k
#ifdef COFF_ADJUST_SYM_IN_POST
354
222k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
222k
#endif
356
222k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
88.0k
{
328
88.0k
  SYMENT *ext = (SYMENT *) ext1;
329
88.0k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
88.0k
  if (ext->e.e_name[0] == 0)
332
58.6k
    {
333
58.6k
      in->_n._n_n._n_zeroes = 0;
334
58.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
58.6k
    }
336
29.3k
  else
337
29.3k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
29.3k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
29.3k
#endif
343
29.3k
    }
344
345
88.0k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
88.0k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
88.0k
  if (sizeof (ext->e_type) == 2)
348
88.0k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
88.0k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
88.0k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
88.0k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
198k
{
328
198k
  SYMENT *ext = (SYMENT *) ext1;
329
198k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
198k
  if (ext->e.e_name[0] == 0)
332
140k
    {
333
140k
      in->_n._n_n._n_zeroes = 0;
334
140k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
140k
    }
336
58.2k
  else
337
58.2k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
58.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
58.2k
#endif
343
58.2k
    }
344
345
198k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
198k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
198k
  if (sizeof (ext->e_type) == 2)
348
198k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
198k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
198k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
198k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
0
{
361
0
  struct internal_syment *in = (struct internal_syment *) inp;
362
0
  SYMENT *ext =(SYMENT *) extp;
363
364
#ifdef COFF_ADJUST_SYM_OUT_PRE
365
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
366
#endif
367
368
0
  if (in->_n._n_name[0] == 0)
369
0
    {
370
0
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
0
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
0
    }
373
0
  else
374
0
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
0
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
0
#endif
380
0
    }
381
382
0
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
0
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
0
  if (sizeof (ext->e_type) == 2)
386
0
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
0
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
0
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
0
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
0
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
0
  return SYMESZ;
398
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_sym_out
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
Unexecuted instantiation: coff-sh.c:coff_swap_sym_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic30.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_sym_out
Unexecuted instantiation: coff-z80.c:coff_swap_sym_out
Unexecuted instantiation: coff-z8k.c:coff_swap_sym_out
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx ATTRIBUTE_UNUSED,
406
      int numaux ATTRIBUTE_UNUSED,
407
      void * in1)
408
9.17M
{
409
9.17M
  AUXENT *ext = (AUXENT *) ext1;
410
9.17M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
9.17M
  switch (in_class)
417
9.17M
    {
418
156k
    case C_FILE:
419
156k
      if (ext->x_file.x_fname[0] == 0)
420
42.9k
  {
421
42.9k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
42.9k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
42.9k
  }
424
113k
      else
425
113k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
113k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
113k
#endif
431
113k
  }
432
156k
      goto end;
433
434
106k
    case C_STAT:
435
106k
#ifdef C_LEAFSTAT
436
120k
    case C_LEAFSTAT:
437
120k
#endif
438
170k
    case C_HIDDEN:
439
170k
      if (type == T_NULL)
440
14.4k
  {
441
14.4k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
14.4k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
14.4k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
14.4k
    in->x_scn.x_checksum = 0;
448
14.4k
    in->x_scn.x_associated = 0;
449
14.4k
    in->x_scn.x_comdat = 0;
450
451
14.4k
    goto end;
452
14.4k
  }
453
156k
      break;
454
9.17M
    }
455
456
8.99M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
8.99M
#ifndef NO_TVNDX
458
8.99M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
8.99M
#endif
460
461
8.99M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
8.99M
      || ISTAG (in_class))
463
1.48M
    {
464
1.48M
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
1.48M
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
1.48M
    }
467
7.51M
  else
468
7.51M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
7.51M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
7.51M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
7.51M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
7.51M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
7.51M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
7.51M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
7.51M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
7.51M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
7.51M
    }
481
482
8.99M
  if (ISFCN (type))
483
1.29M
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
7.70M
  else
485
7.70M
    {
486
7.70M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
7.70M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
7.70M
    }
489
490
9.17M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
9.17M
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
3.86M
{
409
3.86M
  AUXENT *ext = (AUXENT *) ext1;
410
3.86M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
3.86M
  switch (in_class)
417
3.86M
    {
418
24.3k
    case C_FILE:
419
24.3k
      if (ext->x_file.x_fname[0] == 0)
420
5.90k
  {
421
5.90k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
5.90k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
5.90k
  }
424
18.4k
      else
425
18.4k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
18.4k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
18.4k
#endif
431
18.4k
  }
432
24.3k
      goto end;
433
434
22.6k
    case C_STAT:
435
22.6k
#ifdef C_LEAFSTAT
436
25.4k
    case C_LEAFSTAT:
437
25.4k
#endif
438
37.2k
    case C_HIDDEN:
439
37.2k
      if (type == T_NULL)
440
2.60k
  {
441
2.60k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
2.60k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
2.60k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
2.60k
    in->x_scn.x_checksum = 0;
448
2.60k
    in->x_scn.x_associated = 0;
449
2.60k
    in->x_scn.x_comdat = 0;
450
451
2.60k
    goto end;
452
2.60k
  }
453
34.6k
      break;
454
3.86M
    }
455
456
3.83M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
3.83M
#ifndef NO_TVNDX
458
3.83M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
3.83M
#endif
460
461
3.83M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
3.83M
      || ISTAG (in_class))
463
611k
    {
464
611k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
611k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
611k
    }
467
3.22M
  else
468
3.22M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
3.22M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
3.22M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
3.22M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
3.22M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
3.22M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
3.22M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
3.22M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
3.22M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
3.22M
    }
481
482
3.83M
  if (ISFCN (type))
483
574k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
3.26M
  else
485
3.26M
    {
486
3.26M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
3.26M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
3.26M
    }
489
490
3.86M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
3.86M
}
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
408
1.23M
{
409
1.23M
  AUXENT *ext = (AUXENT *) ext1;
410
1.23M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
1.23M
  switch (in_class)
417
1.23M
    {
418
23.0k
    case C_FILE:
419
23.0k
      if (ext->x_file.x_fname[0] == 0)
420
6.28k
  {
421
6.28k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
6.28k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
6.28k
  }
424
16.7k
      else
425
16.7k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
16.7k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
16.7k
#endif
431
16.7k
  }
432
23.0k
      goto end;
433
434
17.9k
    case C_STAT:
435
17.9k
#ifdef C_LEAFSTAT
436
23.2k
    case C_LEAFSTAT:
437
23.2k
#endif
438
27.8k
    case C_HIDDEN:
439
27.8k
      if (type == T_NULL)
440
2.35k
  {
441
2.35k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
2.35k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
2.35k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
2.35k
    in->x_scn.x_checksum = 0;
448
2.35k
    in->x_scn.x_associated = 0;
449
2.35k
    in->x_scn.x_comdat = 0;
450
451
2.35k
    goto end;
452
2.35k
  }
453
25.4k
      break;
454
1.23M
    }
455
456
1.20M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
1.20M
#ifndef NO_TVNDX
458
1.20M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
1.20M
#endif
460
461
1.20M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
1.20M
      || ISTAG (in_class))
463
228k
    {
464
228k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
228k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
228k
    }
467
977k
  else
468
977k
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
977k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
977k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
977k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
977k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
977k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
977k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
977k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
977k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
977k
    }
481
482
1.20M
  if (ISFCN (type))
483
171k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
1.03M
  else
485
1.03M
    {
486
1.03M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
1.03M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
1.03M
    }
489
490
1.23M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
1.23M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
557k
{
409
557k
  AUXENT *ext = (AUXENT *) ext1;
410
557k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
557k
  switch (in_class)
417
557k
    {
418
10.8k
    case C_FILE:
419
10.8k
      if (ext->x_file.x_fname[0] == 0)
420
5.63k
  {
421
5.63k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
5.63k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
5.63k
  }
424
5.26k
      else
425
5.26k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
5.26k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
5.26k
#endif
431
5.26k
  }
432
10.8k
      goto end;
433
434
4.86k
    case C_STAT:
435
4.86k
#ifdef C_LEAFSTAT
436
5.82k
    case C_LEAFSTAT:
437
5.82k
#endif
438
19.9k
    case C_HIDDEN:
439
19.9k
      if (type == T_NULL)
440
1.56k
  {
441
1.56k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
1.56k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
1.56k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
1.56k
    in->x_scn.x_checksum = 0;
448
1.56k
    in->x_scn.x_associated = 0;
449
1.56k
    in->x_scn.x_comdat = 0;
450
451
1.56k
    goto end;
452
1.56k
  }
453
18.3k
      break;
454
557k
    }
455
456
544k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
544k
#ifndef NO_TVNDX
458
544k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
544k
#endif
460
461
544k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
544k
      || ISTAG (in_class))
463
119k
    {
464
119k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
119k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
119k
    }
467
425k
  else
468
425k
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
425k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
425k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
425k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
425k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
425k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
425k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
425k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
425k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
425k
    }
481
482
544k
  if (ISFCN (type))
483
101k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
443k
  else
485
443k
    {
486
443k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
443k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
443k
    }
489
490
557k
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
557k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
1.54M
{
409
1.54M
  AUXENT *ext = (AUXENT *) ext1;
410
1.54M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
1.54M
  switch (in_class)
417
1.54M
    {
418
25.1k
    case C_FILE:
419
25.1k
      if (ext->x_file.x_fname[0] == 0)
420
8.29k
  {
421
8.29k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
8.29k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
8.29k
  }
424
16.8k
      else
425
16.8k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
16.8k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
16.8k
#endif
431
16.8k
  }
432
25.1k
      goto end;
433
434
25.1k
    case C_STAT:
435
25.1k
#ifdef C_LEAFSTAT
436
26.9k
    case C_LEAFSTAT:
437
26.9k
#endif
438
30.9k
    case C_HIDDEN:
439
30.9k
      if (type == T_NULL)
440
4.78k
  {
441
4.78k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
4.78k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
4.78k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
4.78k
    in->x_scn.x_checksum = 0;
448
4.78k
    in->x_scn.x_associated = 0;
449
4.78k
    in->x_scn.x_comdat = 0;
450
451
4.78k
    goto end;
452
4.78k
  }
453
26.1k
      break;
454
1.54M
    }
455
456
1.51M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
1.51M
#ifndef NO_TVNDX
458
1.51M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
1.51M
#endif
460
461
1.51M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
1.51M
      || ISTAG (in_class))
463
214k
    {
464
214k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
214k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
214k
    }
467
1.30M
  else
468
1.30M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
1.30M
    }
481
482
1.51M
  if (ISFCN (type))
483
187k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
1.33M
  else
485
1.33M
    {
486
1.33M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
1.33M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
1.33M
    }
489
490
1.54M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
1.54M
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
698k
{
409
698k
  AUXENT *ext = (AUXENT *) ext1;
410
698k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
698k
  switch (in_class)
417
698k
    {
418
48.4k
    case C_FILE:
419
48.4k
      if (ext->x_file.x_fname[0] == 0)
420
6.30k
  {
421
6.30k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
6.30k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
6.30k
  }
424
42.1k
      else
425
42.1k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
42.1k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
42.1k
#endif
431
42.1k
  }
432
48.4k
      goto end;
433
434
6.42k
    case C_STAT:
435
6.42k
#ifdef C_LEAFSTAT
436
7.03k
    case C_LEAFSTAT:
437
7.03k
#endif
438
13.8k
    case C_HIDDEN:
439
13.8k
      if (type == T_NULL)
440
1.17k
  {
441
1.17k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
1.17k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
1.17k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
1.17k
    in->x_scn.x_checksum = 0;
448
1.17k
    in->x_scn.x_associated = 0;
449
1.17k
    in->x_scn.x_comdat = 0;
450
451
1.17k
    goto end;
452
1.17k
  }
453
12.6k
      break;
454
698k
    }
455
456
649k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
649k
#ifndef NO_TVNDX
458
649k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
649k
#endif
460
461
649k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
649k
      || ISTAG (in_class))
463
122k
    {
464
122k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
122k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
122k
    }
467
527k
  else
468
527k
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
527k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
527k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
527k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
527k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
527k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
527k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
527k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
527k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
527k
    }
481
482
649k
  if (ISFCN (type))
483
93.8k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
555k
  else
485
555k
    {
486
555k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
555k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
555k
    }
489
490
698k
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
698k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
1.27M
{
409
1.27M
  AUXENT *ext = (AUXENT *) ext1;
410
1.27M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
1.27M
  switch (in_class)
417
1.27M
    {
418
25.1k
    case C_FILE:
419
25.1k
      if (ext->x_file.x_fname[0] == 0)
420
10.5k
  {
421
10.5k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
10.5k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
10.5k
  }
424
14.5k
      else
425
14.5k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
14.5k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
14.5k
#endif
431
14.5k
  }
432
25.1k
      goto end;
433
434
29.6k
    case C_STAT:
435
29.6k
#ifdef C_LEAFSTAT
436
31.7k
    case C_LEAFSTAT:
437
31.7k
#endif
438
40.8k
    case C_HIDDEN:
439
40.8k
      if (type == T_NULL)
440
1.92k
  {
441
1.92k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
1.92k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
1.92k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
1.92k
    in->x_scn.x_checksum = 0;
448
1.92k
    in->x_scn.x_associated = 0;
449
1.92k
    in->x_scn.x_comdat = 0;
450
451
1.92k
    goto end;
452
1.92k
  }
453
38.9k
      break;
454
1.27M
    }
455
456
1.24M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
1.24M
#ifndef NO_TVNDX
458
1.24M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
1.24M
#endif
460
461
1.24M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
1.24M
      || ISTAG (in_class))
463
192k
    {
464
192k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
192k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
192k
    }
467
1.05M
  else
468
1.05M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
1.05M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
1.05M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
1.05M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
1.05M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
1.05M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
1.05M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
1.05M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
1.05M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
1.05M
    }
481
482
1.24M
  if (ISFCN (type))
483
165k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
1.07M
  else
485
1.07M
    {
486
1.07M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
1.07M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
1.07M
    }
489
490
1.27M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
1.27M
}
496
497
static unsigned int
498
coff_swap_aux_out (bfd * abfd,
499
       void * inp,
500
       int type,
501
       int in_class,
502
       int indx ATTRIBUTE_UNUSED,
503
       int numaux ATTRIBUTE_UNUSED,
504
       void * extp)
505
0
{
506
0
  union internal_auxent * in = (union internal_auxent *) inp;
507
0
  AUXENT *ext = (AUXENT *) extp;
508
509
#ifdef COFF_ADJUST_AUX_OUT_PRE
510
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
511
#endif
512
513
0
  memset (ext, 0, AUXESZ);
514
515
0
  switch (in_class)
516
0
    {
517
0
    case C_FILE:
518
0
      if (in->x_file.x_n.x_fname[0] == 0)
519
0
  {
520
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
521
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
522
0
  }
523
0
      else
524
0
  {
525
#if FILNMLEN != E_FILNMLEN
526
#error we need to cope with truncating or extending FILNMLEN
527
#else
528
0
    memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
529
0
#endif
530
0
  }
531
0
      goto end;
532
533
0
    case C_STAT:
534
0
#ifdef C_LEAFSTAT
535
0
    case C_LEAFSTAT:
536
0
#endif
537
0
    case C_HIDDEN:
538
0
      if (type == T_NULL)
539
0
  {
540
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
541
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
542
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
543
0
    goto end;
544
0
  }
545
0
      break;
546
0
    }
547
548
0
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
549
0
#ifndef NO_TVNDX
550
0
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
551
0
#endif
552
553
0
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
554
0
      || ISTAG (in_class))
555
0
    {
556
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
557
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
558
0
    }
559
0
  else
560
0
    {
561
#if DIMNUM != E_DIMNUM
562
#error we need to cope with truncating or extending DIMNUM
563
#endif
564
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
565
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
566
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
567
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
568
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
569
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
570
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
571
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
572
0
    }
573
574
0
  if (ISFCN (type))
575
0
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
576
0
  else
577
0
    {
578
0
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
579
0
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
580
0
    }
581
582
0
 end:
583
#ifdef COFF_ADJUST_AUX_OUT_POST
584
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
585
#endif
586
0
  return AUXESZ;
587
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
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
Unexecuted instantiation: coff-sh.c:coff_swap_aux_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aux_out
Unexecuted instantiation: coff-z80.c:coff_swap_aux_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aux_out
588
589
#endif /* NO_COFF_SYMBOLS */
590
591
#ifndef NO_COFF_LINENOS
592
593
static void
594
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
595
4.67M
{
596
4.67M
  LINENO *ext = (LINENO *) ext1;
597
4.67M
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
4.67M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
4.67M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
4.67M
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
595
1.10M
{
596
1.10M
  LINENO *ext = (LINENO *) ext1;
597
1.10M
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
1.10M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
1.10M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
1.10M
}
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
595
202k
{
596
202k
  LINENO *ext = (LINENO *) ext1;
597
202k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
202k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
202k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
202k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
595
1.12M
{
596
1.12M
  LINENO *ext = (LINENO *) ext1;
597
1.12M
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
1.12M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
1.12M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
1.12M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
595
473k
{
596
473k
  LINENO *ext = (LINENO *) ext1;
597
473k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
473k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
473k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
473k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
595
1.21M
{
596
1.21M
  LINENO *ext = (LINENO *) ext1;
597
1.21M
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
1.21M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
1.21M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
1.21M
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
595
218k
{
596
218k
  LINENO *ext = (LINENO *) ext1;
597
218k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
218k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
218k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
218k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
595
337k
{
596
337k
  LINENO *ext = (LINENO *) ext1;
597
337k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
337k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
337k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
337k
}
602
603
static unsigned int
604
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
605
0
{
606
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
607
0
  struct external_lineno *ext = (struct external_lineno *) outp;
608
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
609
610
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
611
0
  return LINESZ;
612
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
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
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z80.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out
613
614
#endif /* NO_COFF_LINENOS */
615
616
static void
617
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
618
275k
{
619
275k
  AOUTHDR *aouthdr_ext;
620
275k
  struct internal_aouthdr *aouthdr_int;
621
622
275k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
275k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
275k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
275k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
275k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
275k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
275k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
275k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
275k
  aouthdr_int->text_start =
631
275k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
275k
  aouthdr_int->data_start =
633
275k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
35.9k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
26.6k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
62.6k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
62.6k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
62.6k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
62.6k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
62.6k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
62.6k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
62.6k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
62.6k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
62.6k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
62.6k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
35.9k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
35.9k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
26.6k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
26.6k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
8.83k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
8.83k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
8.83k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
8.83k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
8.83k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
8.83k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
8.83k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
17.6k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
17.6k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
17.6k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
17.6k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
275k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
618
17.6k
{
619
17.6k
  AOUTHDR *aouthdr_ext;
620
17.6k
  struct internal_aouthdr *aouthdr_int;
621
622
17.6k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
17.6k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
17.6k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
17.6k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
17.6k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
17.6k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
17.6k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
17.6k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
17.6k
  aouthdr_int->text_start =
631
17.6k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
17.6k
  aouthdr_int->data_start =
633
17.6k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
17.6k
#ifdef ALPHAECOFF
671
17.6k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
17.6k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
17.6k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
17.6k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
17.6k
#endif
676
17.6k
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
618
48.1k
{
619
48.1k
  AOUTHDR *aouthdr_ext;
620
48.1k
  struct internal_aouthdr *aouthdr_int;
621
622
48.1k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
48.1k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
48.1k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
48.1k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
48.1k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
48.1k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
48.1k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
48.1k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
48.1k
  aouthdr_int->text_start =
631
48.1k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
48.1k
  aouthdr_int->data_start =
633
48.1k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
48.1k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
618
35.9k
{
619
35.9k
  AOUTHDR *aouthdr_ext;
620
35.9k
  struct internal_aouthdr *aouthdr_int;
621
622
35.9k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
35.9k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
35.9k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
35.9k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
35.9k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
35.9k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
35.9k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
35.9k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
35.9k
  aouthdr_int->text_start =
631
35.9k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
35.9k
  aouthdr_int->data_start =
633
35.9k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
35.9k
#ifdef RS6000COFF_C
636
35.9k
#ifdef XCOFF64
637
35.9k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
35.9k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
35.9k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
35.9k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
35.9k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
35.9k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
35.9k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
35.9k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
35.9k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
35.9k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
35.9k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
35.9k
#ifdef XCOFF64
652
35.9k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
35.9k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
35.9k
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
35.9k
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
618
21.6k
{
619
21.6k
  AOUTHDR *aouthdr_ext;
620
21.6k
  struct internal_aouthdr *aouthdr_int;
621
622
21.6k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
21.6k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
21.6k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
21.6k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
21.6k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
21.6k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
21.6k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
21.6k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
21.6k
  aouthdr_int->text_start =
631
21.6k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
21.6k
  aouthdr_int->data_start =
633
21.6k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
21.6k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
618
21.4k
{
619
21.4k
  AOUTHDR *aouthdr_ext;
620
21.4k
  struct internal_aouthdr *aouthdr_int;
621
622
21.4k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
21.4k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
21.4k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
21.4k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
21.4k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
21.4k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
21.4k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
21.4k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
21.4k
  aouthdr_int->text_start =
631
21.4k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
21.4k
  aouthdr_int->data_start =
633
21.4k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
21.4k
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
618
21.4k
{
619
21.4k
  AOUTHDR *aouthdr_ext;
620
21.4k
  struct internal_aouthdr *aouthdr_int;
621
622
21.4k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
21.4k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
21.4k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
21.4k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
21.4k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
21.4k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
21.4k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
21.4k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
21.4k
  aouthdr_int->text_start =
631
21.4k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
21.4k
  aouthdr_int->data_start =
633
21.4k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
21.4k
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
618
8.83k
{
619
8.83k
  AOUTHDR *aouthdr_ext;
620
8.83k
  struct internal_aouthdr *aouthdr_int;
621
622
8.83k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
8.83k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
8.83k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
8.83k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
8.83k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
8.83k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
8.83k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
8.83k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
8.83k
  aouthdr_int->text_start =
631
8.83k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
8.83k
  aouthdr_int->data_start =
633
8.83k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
8.83k
#ifdef MIPSECOFF
661
8.83k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
8.83k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
8.83k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
8.83k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
8.83k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
8.83k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
8.83k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
8.83k
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
8.83k
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
618
26.6k
{
619
26.6k
  AOUTHDR *aouthdr_ext;
620
26.6k
  struct internal_aouthdr *aouthdr_int;
621
622
26.6k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
26.6k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
26.6k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
26.6k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
26.6k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
26.6k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
26.6k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
26.6k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
26.6k
  aouthdr_int->text_start =
631
26.6k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
26.6k
  aouthdr_int->data_start =
633
26.6k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
26.6k
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
26.6k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
26.6k
#endif
641
26.6k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
26.6k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
26.6k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
26.6k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
26.6k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
26.6k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
26.6k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
26.6k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
26.6k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
26.6k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
26.6k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
26.6k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
26.6k
#endif
658
26.6k
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
26.6k
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
618
14.1k
{
619
14.1k
  AOUTHDR *aouthdr_ext;
620
14.1k
  struct internal_aouthdr *aouthdr_int;
621
622
14.1k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
14.1k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
14.1k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
14.1k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
14.1k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
14.1k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
14.1k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
14.1k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
14.1k
  aouthdr_int->text_start =
631
14.1k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
14.1k
  aouthdr_int->data_start =
633
14.1k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
14.1k
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
618
229
{
619
229
  AOUTHDR *aouthdr_ext;
620
229
  struct internal_aouthdr *aouthdr_int;
621
622
229
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
229
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
229
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
229
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
229
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
229
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
229
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
229
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
229
  aouthdr_int->text_start =
631
229
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
229
  aouthdr_int->data_start =
633
229
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
229
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
618
9.15k
{
619
9.15k
  AOUTHDR *aouthdr_ext;
620
9.15k
  struct internal_aouthdr *aouthdr_int;
621
622
9.15k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
9.15k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
9.15k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
9.15k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
9.15k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
9.15k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
9.15k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
9.15k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
9.15k
  aouthdr_int->text_start =
631
9.15k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
9.15k
  aouthdr_int->data_start =
633
9.15k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
9.15k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
618
27.8k
{
619
27.8k
  AOUTHDR *aouthdr_ext;
620
27.8k
  struct internal_aouthdr *aouthdr_int;
621
622
27.8k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
27.8k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
27.8k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
27.8k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
27.8k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
27.8k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
27.8k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
27.8k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
27.8k
  aouthdr_int->text_start =
631
27.8k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
27.8k
  aouthdr_int->data_start =
633
27.8k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
27.8k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
618
7.03k
{
619
7.03k
  AOUTHDR *aouthdr_ext;
620
7.03k
  struct internal_aouthdr *aouthdr_int;
621
622
7.03k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
7.03k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
7.03k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
7.03k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
7.03k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
7.03k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
7.03k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
7.03k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
7.03k
  aouthdr_int->text_start =
631
7.03k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
7.03k
  aouthdr_int->data_start =
633
7.03k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
7.03k
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
618
15.4k
{
619
15.4k
  AOUTHDR *aouthdr_ext;
620
15.4k
  struct internal_aouthdr *aouthdr_int;
621
622
15.4k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
15.4k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
15.4k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
15.4k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
15.4k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
15.4k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
15.4k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
15.4k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
15.4k
  aouthdr_int->text_start =
631
15.4k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
15.4k
  aouthdr_int->data_start =
633
15.4k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
15.4k
}
677
678
static unsigned int
679
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
680
8
{
681
8
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
682
8
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
683
684
8
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
685
8
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
686
8
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
687
8
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
688
8
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
689
8
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
690
8
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
691
8
        aouthdr_out->text_start);
692
8
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
693
8
        aouthdr_out->data_start);
694
695
#ifdef RS6000COFF_C
696
#ifdef XCOFF64
697
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
698
#else
699
0
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
700
#endif
701
0
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
702
0
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
703
0
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
704
0
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
705
0
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
706
0
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
707
0
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
708
0
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
709
0
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
710
0
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
711
#ifdef XCOFF64
712
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
713
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
714
#else
715
0
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
716
0
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
717
#endif
718
  /* TODO: set o_*psize dynamically */
719
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
720
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
721
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
722
0
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
723
0
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
724
0
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
725
0
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
726
#ifdef XCOFF64
727
0
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
728
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
729
#endif
730
#endif
731
732
#ifdef MIPSECOFF
733
4
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
734
4
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
735
4
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
736
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
737
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
738
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
739
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
740
#endif
741
742
#ifdef ALPHAECOFF
743
  /* FIXME: What does bldrev mean?  */
744
4
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
745
4
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
746
4
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
747
4
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
748
4
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
749
4
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
750
#endif
751
752
8
  return AOUTSZ;
753
8
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
680
4
{
681
4
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
682
4
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
683
684
4
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
685
4
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
686
4
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
687
4
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
688
4
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
689
4
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
690
4
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
691
4
        aouthdr_out->text_start);
692
4
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
693
4
        aouthdr_out->data_start);
694
695
#ifdef RS6000COFF_C
696
#ifdef XCOFF64
697
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
698
#else
699
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
700
#endif
701
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
702
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
705
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
706
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
707
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
708
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
709
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
710
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
711
#ifdef XCOFF64
712
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
713
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
714
#else
715
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
716
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
717
#endif
718
  /* TODO: set o_*psize dynamically */
719
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
720
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
721
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
722
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
723
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
724
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
725
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
726
#ifdef XCOFF64
727
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
728
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
729
#endif
730
#endif
731
732
#ifdef MIPSECOFF
733
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
734
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
735
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
736
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
737
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
738
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
739
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
740
#endif
741
742
4
#ifdef ALPHAECOFF
743
  /* FIXME: What does bldrev mean?  */
744
4
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
745
4
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
746
4
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
747
4
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
748
4
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
749
4
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
750
4
#endif
751
752
4
  return AOUTSZ;
753
4
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_aouthdr_out
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
680
4
{
681
4
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
682
4
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
683
684
4
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
685
4
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
686
4
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
687
4
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
688
4
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
689
4
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
690
4
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
691
4
        aouthdr_out->text_start);
692
4
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
693
4
        aouthdr_out->data_start);
694
695
#ifdef RS6000COFF_C
696
#ifdef XCOFF64
697
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
698
#else
699
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
700
#endif
701
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
702
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
705
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
706
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
707
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
708
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
709
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
710
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
711
#ifdef XCOFF64
712
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
713
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
714
#else
715
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
716
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
717
#endif
718
  /* TODO: set o_*psize dynamically */
719
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
720
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
721
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
722
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
723
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
724
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
725
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
726
#ifdef XCOFF64
727
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
728
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
729
#endif
730
#endif
731
732
4
#ifdef MIPSECOFF
733
4
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
734
4
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
735
4
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
736
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
737
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
738
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
739
4
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
740
4
#endif
741
742
#ifdef ALPHAECOFF
743
  /* FIXME: What does bldrev mean?  */
744
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
745
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
746
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
747
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
748
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
749
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
750
#endif
751
752
4
  return AOUTSZ;
753
4
}
Unexecuted instantiation: coff-rs6000.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_out
754
755
ATTRIBUTE_UNUSED
756
static void
757
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
758
83.7M
{
759
83.7M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
83.7M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
83.7M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
83.7M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
83.7M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
83.7M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
83.7M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
83.7M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
83.7M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
83.7M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
83.7M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
83.7M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
7.89M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
83.7M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
758
103k
{
759
103k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
103k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
103k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
103k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
103k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
103k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
103k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
103k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
103k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
103k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
103k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
103k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
103k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
758
10.9M
{
759
10.9M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
10.9M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
10.9M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
10.9M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
10.9M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
10.9M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
10.9M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
10.9M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
10.9M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
10.9M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
10.9M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
10.9M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
10.9M
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
758
2.00M
{
759
2.00M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
2.00M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
2.00M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
2.00M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
2.00M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
2.00M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
2.00M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
2.00M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
2.00M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
2.00M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
2.00M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
2.00M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
2.00M
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
758
4.37M
{
759
4.37M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
4.37M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
4.37M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
4.37M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
4.37M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
4.37M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
4.37M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
4.37M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
4.37M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
4.37M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
4.37M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
4.37M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
4.37M
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
758
3.87M
{
759
3.87M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
3.87M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
3.87M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
3.87M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
3.87M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
3.87M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
3.87M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
3.87M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
3.87M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
3.87M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
3.87M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
3.87M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
3.87M
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
758
6.14M
{
759
6.14M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
6.14M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
6.14M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
6.14M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
6.14M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
6.14M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
6.14M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
6.14M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
6.14M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
6.14M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
6.14M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
6.14M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
6.14M
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
758
22.3M
{
759
22.3M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
22.3M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
22.3M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
22.3M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
22.3M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
22.3M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
22.3M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
22.3M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
22.3M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
22.3M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
22.3M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
22.3M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
22.3M
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
758
6.73M
{
759
6.73M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
6.73M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
6.73M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
6.73M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
6.73M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
6.73M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
6.73M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
6.73M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
6.73M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
6.73M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
6.73M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
6.73M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
6.73M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
758
4.73M
{
759
4.73M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
4.73M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
4.73M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
4.73M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
4.73M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
4.73M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
4.73M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
4.73M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
4.73M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
4.73M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
4.73M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
4.73M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
4.73M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
758
7.89M
{
759
7.89M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
7.89M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
7.89M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
7.89M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
7.89M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
7.89M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
7.89M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
7.89M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
7.89M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
7.89M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
7.89M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
7.89M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
7.89M
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
7.89M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
7.89M
#endif
780
7.89M
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
758
1.20M
{
759
1.20M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
1.20M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
1.20M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
1.20M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
1.20M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
1.20M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
1.20M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
1.20M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
1.20M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
1.20M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
1.20M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
1.20M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
1.20M
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
758
13.4M
{
759
13.4M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
13.4M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
13.4M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
13.4M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
13.4M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
13.4M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
13.4M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
13.4M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
13.4M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
13.4M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
13.4M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
13.4M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
13.4M
}
781
782
ATTRIBUTE_UNUSED
783
static unsigned int
784
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
785
3
{
786
3
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
787
3
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
788
3
  unsigned int ret = bfd_coff_scnhsz (abfd);
789
790
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
791
0
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
792
#endif
793
3
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
794
795
3
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
796
3
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
797
3
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
798
3
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
799
3
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
800
3
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
801
3
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
802
3
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
803
3
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
804
0
  else
805
0
    {
806
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
807
808
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
809
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
810
0
      _bfd_error_handler
811
  /* xgettext:c-format */
812
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
813
0
   abfd, buf, scnhdr_int->s_nlnno);
814
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
815
0
    }
816
817
3
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
818
3
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
819
0
  else
820
0
    {
821
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
822
823
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
824
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
825
      /* xgettext:c-format */
826
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
827
0
        abfd, buf, scnhdr_int->s_nreloc);
828
0
      bfd_set_error (bfd_error_file_truncated);
829
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
830
0
      ret = 0;
831
0
    }
832
833
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
834
0
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
835
#endif
836
3
  return ret;
837
3
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_scnhdr_out
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
785
3
{
786
3
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
787
3
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
788
3
  unsigned int ret = bfd_coff_scnhsz (abfd);
789
790
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
791
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
792
#endif
793
3
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
794
795
3
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
796
3
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
797
3
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
798
3
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
799
3
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
800
3
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
801
3
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
802
3
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
803
3
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
804
0
  else
805
0
    {
806
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
807
808
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
809
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
810
0
      _bfd_error_handler
811
  /* xgettext:c-format */
812
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
813
0
   abfd, buf, scnhdr_int->s_nlnno);
814
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
815
0
    }
816
817
3
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
818
3
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
819
0
  else
820
0
    {
821
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
822
823
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
824
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
825
      /* xgettext:c-format */
826
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
827
0
        abfd, buf, scnhdr_int->s_nreloc);
828
0
      bfd_set_error (bfd_error_file_truncated);
829
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
830
0
      ret = 0;
831
0
    }
832
833
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
834
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
835
#endif
836
3
  return ret;
837
3
}
Unexecuted instantiation: coff64-rs6000.c:coff_swap_scnhdr_out
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
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out