Coverage Report

Created: 2023-06-29 07:13

/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-2023 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.16M
  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.16M
  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
6.03M
  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
4.54M
  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
17.0k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
21.8k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
21.8k
  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.15M
  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
37.0M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
11
#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
108k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
10
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
108k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
10
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
108k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
10
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
108k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
10
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
108k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
10
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
108k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
10
#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
155M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
2
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
155M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
2
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
142M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
0
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
155M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
2
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
155M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
2
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
155M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
2
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
142M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
2
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
0
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
142M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
2
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
0
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
148M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
0
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
457k
#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
456k
{
217
456k
  RELOC *reloc_src = (RELOC *) src;
218
456k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
456k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
456k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
456k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
19.9k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
456k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
11.1k
{
217
11.1k
  RELOC *reloc_src = (RELOC *) src;
218
11.1k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
11.1k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
11.1k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
11.1k
  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
11.1k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
406k
{
217
406k
  RELOC *reloc_src = (RELOC *) src;
218
406k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
406k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
406k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
406k
  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
406k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
2.66k
{
217
2.66k
  RELOC *reloc_src = (RELOC *) src;
218
2.66k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
2.66k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
2.66k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
2.66k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
2.66k
#ifdef SWAP_IN_RELOC_OFFSET
225
2.66k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
2.66k
#endif
227
2.66k
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
18.8k
{
217
18.8k
  RELOC *reloc_src = (RELOC *) src;
218
18.8k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
18.8k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
18.8k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
18.8k
  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.8k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
12.8k
{
217
12.8k
  RELOC *reloc_src = (RELOC *) src;
218
12.8k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
12.8k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
12.8k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
12.8k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
12.8k
#ifdef SWAP_IN_RELOC_OFFSET
225
12.8k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
12.8k
#endif
227
12.8k
}
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
4.31k
{
217
4.31k
  RELOC *reloc_src = (RELOC *) src;
218
4.31k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
4.31k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
4.31k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
4.31k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
4.31k
#ifdef SWAP_IN_RELOC_OFFSET
225
4.31k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
4.31k
#endif
227
4.31k
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
107
{
217
107
  RELOC *reloc_src = (RELOC *) src;
218
107
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
107
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
107
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
107
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
107
#ifdef SWAP_IN_RELOC_OFFSET
225
107
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
107
#endif
227
107
}
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
434
{
253
434
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
434
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
434
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
434
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
434
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
434
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
434
{
253
434
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
434
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
434
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
434
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
434
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
434
}
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
42.3M
{
281
42.3M
  FILHDR *filehdr_src = (FILHDR *) src;
282
42.3M
  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
42.3M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
42.3M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
42.3M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
42.3M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
42.3M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
42.3M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
42.3M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
10.6M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
42.3M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
1.76M
{
281
1.76M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.76M
  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
1.76M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.76M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.76M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.76M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.76M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.76M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.76M
  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
1.76M
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
1.78M
{
281
1.78M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.78M
  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
1.78M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.78M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.78M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.78M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.78M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.78M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.78M
  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
1.78M
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
3.52M
{
281
3.52M
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.52M
  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
3.52M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.52M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.52M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.52M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.52M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.52M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.52M
  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
3.52M
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
1.78M
{
281
1.78M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.78M
  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
1.78M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.78M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.78M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.78M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.78M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.78M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.78M
  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
1.78M
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
1.78M
{
281
1.78M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.78M
  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
1.78M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.78M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.78M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.78M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.78M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.78M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.78M
  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
1.78M
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
1.78M
{
281
1.78M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.78M
  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
1.78M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.78M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.78M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.78M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.78M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.78M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.78M
  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
1.78M
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
5.32M
{
281
5.32M
  FILHDR *filehdr_src = (FILHDR *) src;
282
5.32M
  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.32M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
5.32M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
5.32M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
5.32M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
5.32M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
5.32M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
5.32M
  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.32M
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
1.77M
{
281
1.77M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.77M
  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
1.77M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.77M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.77M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.77M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.77M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.77M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.77M
  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
1.77M
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
6.87M
{
281
6.87M
  FILHDR *filehdr_src = (FILHDR *) src;
282
6.87M
  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
6.87M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
6.87M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
6.87M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
6.87M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
6.87M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
6.87M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
6.87M
  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
6.87M
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
2.73k
{
281
2.73k
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.73k
  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.73k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.73k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.73k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.73k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.73k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.73k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.73k
  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.73k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
1.77M
{
281
1.77M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.77M
  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
1.77M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.77M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.77M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.77M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.77M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.77M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.77M
  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
1.77M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
10.6M
{
281
10.6M
  FILHDR *filehdr_src = (FILHDR *) src;
282
10.6M
  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.6M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
10.6M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
10.6M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
10.6M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
10.6M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
10.6M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
10.6M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
10.6M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
10.6M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
10.6M
#endif
298
10.6M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
1.77M
{
281
1.77M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.77M
  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
1.77M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.77M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.77M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.77M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.77M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.77M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.77M
  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
1.77M
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
1.77M
{
281
1.77M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.77M
  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
1.77M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.77M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.77M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.77M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.77M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.77M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.77M
  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
1.77M
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
11
{
303
11
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
11
  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
11
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
11
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
11
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
11
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
11
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
11
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
11
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
1
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
11
  return bfd_coff_filhsz (abfd);
321
11
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_filehdr_out
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
1
{
303
1
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
1
  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
1
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
1
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
1
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
1
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
1
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
1
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
1
  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
1
  return bfd_coff_filhsz (abfd);
321
1
}
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
9
{
303
9
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
9
  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
9
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
9
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
9
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
9
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
9
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
9
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
9
  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
9
  return bfd_coff_filhsz (abfd);
321
9
}
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
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
302
1
{
303
1
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
1
  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
1
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
1
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
1
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
1
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
1
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
1
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
1
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
1
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
1
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
1
#endif
320
1
  return bfd_coff_filhsz (abfd);
321
1
}
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.11M
{
328
1.11M
  SYMENT *ext = (SYMENT *) ext1;
329
1.11M
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.11M
  if (ext->e.e_name[0] == 0)
332
773k
    {
333
773k
      in->_n._n_n._n_zeroes = 0;
334
773k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
773k
    }
336
344k
  else
337
344k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
344k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
344k
#endif
343
344k
    }
344
345
1.11M
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.11M
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.11M
  if (sizeof (ext->e_type) == 2)
348
1.11M
    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.11M
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.11M
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
246k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
1.11M
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
163k
{
328
163k
  SYMENT *ext = (SYMENT *) ext1;
329
163k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
163k
  if (ext->e.e_name[0] == 0)
332
109k
    {
333
109k
      in->_n._n_n._n_zeroes = 0;
334
109k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
109k
    }
336
54.1k
  else
337
54.1k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
54.1k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
54.1k
#endif
343
54.1k
    }
344
345
163k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
163k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
163k
  if (sizeof (ext->e_type) == 2)
348
163k
    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
163k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
163k
  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
163k
}
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
196k
{
328
196k
  SYMENT *ext = (SYMENT *) ext1;
329
196k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
196k
  if (ext->e.e_name[0] == 0)
332
145k
    {
333
145k
      in->_n._n_n._n_zeroes = 0;
334
145k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
145k
    }
336
51.3k
  else
337
51.3k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
51.3k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
51.3k
#endif
343
51.3k
    }
344
345
196k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
196k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
196k
  if (sizeof (ext->e_type) == 2)
348
196k
    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
196k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
196k
  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
196k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
134k
{
328
134k
  SYMENT *ext = (SYMENT *) ext1;
329
134k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
134k
  if (ext->e.e_name[0] == 0)
332
91.3k
    {
333
91.3k
      in->_n._n_n._n_zeroes = 0;
334
91.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
91.3k
    }
336
42.8k
  else
337
42.8k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
42.8k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
42.8k
#endif
343
42.8k
    }
344
345
134k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
134k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
134k
  if (sizeof (ext->e_type) == 2)
348
134k
    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
134k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
134k
  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
134k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
246k
{
328
246k
  SYMENT *ext = (SYMENT *) ext1;
329
246k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
246k
  if (ext->e.e_name[0] == 0)
332
166k
    {
333
166k
      in->_n._n_n._n_zeroes = 0;
334
166k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
166k
    }
336
79.6k
  else
337
79.6k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
79.6k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
79.6k
#endif
343
79.6k
    }
344
345
246k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
246k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
246k
  if (sizeof (ext->e_type) == 2)
348
246k
    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
246k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
246k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
246k
#ifdef COFF_ADJUST_SYM_IN_POST
354
246k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
246k
#endif
356
246k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
161k
{
328
161k
  SYMENT *ext = (SYMENT *) ext1;
329
161k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
161k
  if (ext->e.e_name[0] == 0)
332
111k
    {
333
111k
      in->_n._n_n._n_zeroes = 0;
334
111k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
111k
    }
336
49.9k
  else
337
49.9k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
49.9k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
49.9k
#endif
343
49.9k
    }
344
345
161k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
161k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
161k
  if (sizeof (ext->e_type) == 2)
348
161k
    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
161k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
161k
  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
161k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
216k
{
328
216k
  SYMENT *ext = (SYMENT *) ext1;
329
216k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
216k
  if (ext->e.e_name[0] == 0)
332
149k
    {
333
149k
      in->_n._n_n._n_zeroes = 0;
334
149k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
149k
    }
336
66.5k
  else
337
66.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
66.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
66.5k
#endif
343
66.5k
    }
344
345
216k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
216k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
216k
  if (sizeof (ext->e_type) == 2)
348
216k
    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
216k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
216k
  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
216k
}
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,
406
      int numaux,
407
      void * in1)
408
7.19M
{
409
7.19M
  AUXENT *ext = (AUXENT *) ext1;
410
7.19M
  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
7.19M
  switch (in_class)
417
7.19M
    {
418
134k
    case C_FILE:
419
134k
      if (ext->x_file.x_fname[0] == 0)
420
50.8k
  {
421
50.8k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
50.8k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
50.8k
  }
424
83.9k
      else
425
83.9k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
83.9k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
83.9k
    else
436
83.9k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
83.9k
#endif
438
83.9k
  }
439
134k
      goto end;
440
441
118k
    case C_STAT:
442
118k
#ifdef C_LEAFSTAT
443
134k
    case C_LEAFSTAT:
444
134k
#endif
445
175k
    case C_HIDDEN:
446
175k
      if (type == T_NULL)
447
21.8k
  {
448
21.8k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
21.8k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
21.8k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
21.8k
    in->x_scn.x_checksum = 0;
455
21.8k
    in->x_scn.x_associated = 0;
456
21.8k
    in->x_scn.x_comdat = 0;
457
458
21.8k
    goto end;
459
21.8k
  }
460
153k
      break;
461
7.19M
    }
462
463
7.04M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
7.04M
#ifndef NO_TVNDX
465
7.04M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
7.04M
#endif
467
468
7.04M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
7.04M
      || ISTAG (in_class))
470
1.16M
    {
471
1.16M
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
1.16M
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
1.16M
    }
474
5.87M
  else
475
5.87M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
5.87M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
5.87M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
5.87M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
5.87M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
5.87M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
5.87M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
5.87M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
5.87M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
5.87M
    }
488
489
7.04M
  if (ISFCN (type))
490
1.00M
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
6.03M
  else
492
6.03M
    {
493
6.03M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
6.03M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
6.03M
    }
496
497
7.19M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
7.19M
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
1.00M
{
409
1.00M
  AUXENT *ext = (AUXENT *) ext1;
410
1.00M
  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.00M
  switch (in_class)
417
1.00M
    {
418
13.4k
    case C_FILE:
419
13.4k
      if (ext->x_file.x_fname[0] == 0)
420
5.02k
  {
421
5.02k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
5.02k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
5.02k
  }
424
8.41k
      else
425
8.41k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
8.41k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
8.41k
    else
436
8.41k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
8.41k
#endif
438
8.41k
  }
439
13.4k
      goto end;
440
441
10.3k
    case C_STAT:
442
10.3k
#ifdef C_LEAFSTAT
443
12.3k
    case C_LEAFSTAT:
444
12.3k
#endif
445
18.2k
    case C_HIDDEN:
446
18.2k
      if (type == T_NULL)
447
3.83k
  {
448
3.83k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
3.83k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
3.83k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
3.83k
    in->x_scn.x_checksum = 0;
455
3.83k
    in->x_scn.x_associated = 0;
456
3.83k
    in->x_scn.x_comdat = 0;
457
458
3.83k
    goto end;
459
3.83k
  }
460
14.4k
      break;
461
1.00M
    }
462
463
985k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
985k
#ifndef NO_TVNDX
465
985k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
985k
#endif
467
468
985k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
985k
      || ISTAG (in_class))
470
183k
    {
471
183k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
183k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
183k
    }
474
802k
  else
475
802k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
802k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
802k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
802k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
802k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
802k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
802k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
802k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
802k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
802k
    }
488
489
985k
  if (ISFCN (type))
490
158k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
827k
  else
492
827k
    {
493
827k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
827k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
827k
    }
496
497
1.00M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.00M
}
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.34M
{
409
1.34M
  AUXENT *ext = (AUXENT *) ext1;
410
1.34M
  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.34M
  switch (in_class)
417
1.34M
    {
418
21.6k
    case C_FILE:
419
21.6k
      if (ext->x_file.x_fname[0] == 0)
420
9.84k
  {
421
9.84k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
9.84k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
9.84k
  }
424
11.8k
      else
425
11.8k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
11.8k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
11.8k
    else
436
11.8k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
11.8k
#endif
438
11.8k
  }
439
21.6k
      goto end;
440
441
19.4k
    case C_STAT:
442
19.4k
#ifdef C_LEAFSTAT
443
21.7k
    case C_LEAFSTAT:
444
21.7k
#endif
445
26.0k
    case C_HIDDEN:
446
26.0k
      if (type == T_NULL)
447
4.02k
  {
448
4.02k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
4.02k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
4.02k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
4.02k
    in->x_scn.x_checksum = 0;
455
4.02k
    in->x_scn.x_associated = 0;
456
4.02k
    in->x_scn.x_comdat = 0;
457
458
4.02k
    goto end;
459
4.02k
  }
460
22.0k
      break;
461
1.34M
    }
462
463
1.31M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.31M
#ifndef NO_TVNDX
465
1.31M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.31M
#endif
467
468
1.31M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.31M
      || ISTAG (in_class))
470
194k
    {
471
194k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
194k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
194k
    }
474
1.12M
  else
475
1.12M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
1.12M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
1.12M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
1.12M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
1.12M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
1.12M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
1.12M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
1.12M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
1.12M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
1.12M
    }
488
489
1.31M
  if (ISFCN (type))
490
172k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
1.14M
  else
492
1.14M
    {
493
1.14M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
1.14M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
1.14M
    }
496
497
1.34M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.34M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
751k
{
409
751k
  AUXENT *ext = (AUXENT *) ext1;
410
751k
  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
751k
  switch (in_class)
417
751k
    {
418
20.0k
    case C_FILE:
419
20.0k
      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
14.1k
      else
425
14.1k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
14.1k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
14.1k
    else
436
14.1k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
14.1k
#endif
438
14.1k
  }
439
20.0k
      goto end;
440
441
12.1k
    case C_STAT:
442
12.1k
#ifdef C_LEAFSTAT
443
14.1k
    case C_LEAFSTAT:
444
14.1k
#endif
445
18.1k
    case C_HIDDEN:
446
18.1k
      if (type == T_NULL)
447
2.99k
  {
448
2.99k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
2.99k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
2.99k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
2.99k
    in->x_scn.x_checksum = 0;
455
2.99k
    in->x_scn.x_associated = 0;
456
2.99k
    in->x_scn.x_comdat = 0;
457
458
2.99k
    goto end;
459
2.99k
  }
460
15.1k
      break;
461
751k
    }
462
463
728k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
728k
#ifndef NO_TVNDX
465
728k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
728k
#endif
467
468
728k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
728k
      || ISTAG (in_class))
470
130k
    {
471
130k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
130k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
130k
    }
474
598k
  else
475
598k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
598k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
598k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
598k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
598k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
598k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
598k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
598k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
598k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
598k
    }
488
489
728k
  if (ISFCN (type))
490
104k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
624k
  else
492
624k
    {
493
624k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
624k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
624k
    }
496
497
751k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
751k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
1.80M
{
409
1.80M
  AUXENT *ext = (AUXENT *) ext1;
410
1.80M
  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.80M
  switch (in_class)
417
1.80M
    {
418
29.2k
    case C_FILE:
419
29.2k
      if (ext->x_file.x_fname[0] == 0)
420
14.3k
  {
421
14.3k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
14.3k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
14.3k
  }
424
14.8k
      else
425
14.8k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
14.8k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
14.8k
    else
436
14.8k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
14.8k
#endif
438
14.8k
  }
439
29.2k
      goto end;
440
441
39.9k
    case C_STAT:
442
39.9k
#ifdef C_LEAFSTAT
443
45.9k
    case C_LEAFSTAT:
444
45.9k
#endif
445
56.3k
    case C_HIDDEN:
446
56.3k
      if (type == T_NULL)
447
4.80k
  {
448
4.80k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
4.80k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
4.80k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
4.80k
    in->x_scn.x_checksum = 0;
455
4.80k
    in->x_scn.x_associated = 0;
456
4.80k
    in->x_scn.x_comdat = 0;
457
458
4.80k
    goto end;
459
4.80k
  }
460
51.5k
      break;
461
1.80M
    }
462
463
1.77M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.77M
#ifndef NO_TVNDX
465
1.77M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.77M
#endif
467
468
1.77M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.77M
      || ISTAG (in_class))
470
317k
    {
471
317k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
317k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
317k
    }
474
1.45M
  else
475
1.45M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
1.45M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
1.45M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
1.45M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
1.45M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
1.45M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
1.45M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
1.45M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
1.45M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
1.45M
    }
488
489
1.77M
  if (ISFCN (type))
490
279k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
1.49M
  else
492
1.49M
    {
493
1.49M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
1.49M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
1.49M
    }
496
497
1.80M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.80M
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
1.05M
{
409
1.05M
  AUXENT *ext = (AUXENT *) ext1;
410
1.05M
  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.05M
  switch (in_class)
417
1.05M
    {
418
31.7k
    case C_FILE:
419
31.7k
      if (ext->x_file.x_fname[0] == 0)
420
9.34k
  {
421
9.34k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
9.34k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
9.34k
  }
424
22.4k
      else
425
22.4k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
22.4k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
22.4k
    else
436
22.4k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
22.4k
#endif
438
22.4k
  }
439
31.7k
      goto end;
440
441
17.2k
    case C_STAT:
442
17.2k
#ifdef C_LEAFSTAT
443
18.7k
    case C_LEAFSTAT:
444
18.7k
#endif
445
29.1k
    case C_HIDDEN:
446
29.1k
      if (type == T_NULL)
447
2.43k
  {
448
2.43k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
2.43k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
2.43k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
2.43k
    in->x_scn.x_checksum = 0;
455
2.43k
    in->x_scn.x_associated = 0;
456
2.43k
    in->x_scn.x_comdat = 0;
457
458
2.43k
    goto end;
459
2.43k
  }
460
26.7k
      break;
461
1.05M
    }
462
463
1.01M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.01M
#ifndef NO_TVNDX
465
1.01M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.01M
#endif
467
468
1.01M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.01M
      || ISTAG (in_class))
470
162k
    {
471
162k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
162k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
162k
    }
474
855k
  else
475
855k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
855k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
855k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
855k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
855k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
855k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
855k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
855k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
855k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
855k
    }
488
489
1.01M
  if (ISFCN (type))
490
140k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
878k
  else
492
878k
    {
493
878k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
878k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
878k
    }
496
497
1.05M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.05M
}
coff-z8k.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
18.5k
    case C_FILE:
419
18.5k
      if (ext->x_file.x_fname[0] == 0)
420
6.38k
  {
421
6.38k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
6.38k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
6.38k
  }
424
12.1k
      else
425
12.1k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
12.1k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
12.1k
    else
436
12.1k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
12.1k
#endif
438
12.1k
  }
439
18.5k
      goto end;
440
441
19.0k
    case C_STAT:
442
19.0k
#ifdef C_LEAFSTAT
443
21.2k
    case C_LEAFSTAT:
444
21.2k
#endif
445
26.9k
    case C_HIDDEN:
446
26.9k
      if (type == T_NULL)
447
3.74k
  {
448
3.74k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
3.74k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
3.74k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
3.74k
    in->x_scn.x_checksum = 0;
455
3.74k
    in->x_scn.x_associated = 0;
456
3.74k
    in->x_scn.x_comdat = 0;
457
458
3.74k
    goto end;
459
3.74k
  }
460
23.2k
      break;
461
1.23M
    }
462
463
1.21M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.21M
#ifndef NO_TVNDX
465
1.21M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.21M
#endif
467
468
1.21M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.21M
      || ISTAG (in_class))
470
174k
    {
471
174k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
174k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
174k
    }
474
1.04M
  else
475
1.04M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
1.04M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
1.04M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
1.04M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
1.04M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
1.04M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
1.04M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
1.04M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
1.04M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
1.04M
    }
488
489
1.21M
  if (ISFCN (type))
490
146k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
1.07M
  else
492
1.07M
    {
493
1.07M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
1.07M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
1.07M
    }
496
497
1.23M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.23M
}
503
504
static unsigned int
505
coff_swap_aux_out (bfd * abfd,
506
       void * inp,
507
       int type,
508
       int in_class,
509
       int indx ATTRIBUTE_UNUSED,
510
       int numaux ATTRIBUTE_UNUSED,
511
       void * extp)
512
0
{
513
0
  union internal_auxent * in = (union internal_auxent *) inp;
514
0
  AUXENT *ext = (AUXENT *) extp;
515
516
#ifdef COFF_ADJUST_AUX_OUT_PRE
517
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
518
#endif
519
520
0
  memset (ext, 0, AUXESZ);
521
522
0
  switch (in_class)
523
0
    {
524
0
    case C_FILE:
525
0
      if (in->x_file.x_n.x_fname[0] == 0)
526
0
  {
527
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
528
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
529
0
  }
530
0
      else
531
0
  {
532
#if FILNMLEN != E_FILNMLEN
533
#error we need to cope with truncating or extending FILNMLEN
534
#else
535
0
    memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
536
0
#endif
537
0
  }
538
0
      goto end;
539
540
0
    case C_STAT:
541
0
#ifdef C_LEAFSTAT
542
0
    case C_LEAFSTAT:
543
0
#endif
544
0
    case C_HIDDEN:
545
0
      if (type == T_NULL)
546
0
  {
547
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
548
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
549
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
550
0
    goto end;
551
0
  }
552
0
      break;
553
0
    }
554
555
0
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
556
0
#ifndef NO_TVNDX
557
0
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
558
0
#endif
559
560
0
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
561
0
      || ISTAG (in_class))
562
0
    {
563
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
564
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
565
0
    }
566
0
  else
567
0
    {
568
#if DIMNUM != E_DIMNUM
569
#error we need to cope with truncating or extending DIMNUM
570
#endif
571
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
572
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
573
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
574
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
575
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
576
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
577
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
578
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
579
0
    }
580
581
0
  if (ISFCN (type))
582
0
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
583
0
  else
584
0
    {
585
0
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
586
0
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
587
0
    }
588
589
0
 end:
590
#ifdef COFF_ADJUST_AUX_OUT_POST
591
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
592
#endif
593
0
  return AUXESZ;
594
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
595
596
#endif /* NO_COFF_SYMBOLS */
597
598
#ifndef NO_COFF_LINENOS
599
600
static void
601
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
602
4.00M
{
603
4.00M
  LINENO *ext = (LINENO *) ext1;
604
4.00M
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
4.00M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
4.00M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
4.00M
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
602
584k
{
603
584k
  LINENO *ext = (LINENO *) ext1;
604
584k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
584k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
584k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
584k
}
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
602
419k
{
603
419k
  LINENO *ext = (LINENO *) ext1;
604
419k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
419k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
419k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
419k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
602
445k
{
603
445k
  LINENO *ext = (LINENO *) ext1;
604
445k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
445k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
445k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
445k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
602
703k
{
603
703k
  LINENO *ext = (LINENO *) ext1;
604
703k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
703k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
703k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
703k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
602
730k
{
603
730k
  LINENO *ext = (LINENO *) ext1;
604
730k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
730k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
730k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
730k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
602
518k
{
603
518k
  LINENO *ext = (LINENO *) ext1;
604
518k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
518k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
518k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
518k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
602
605k
{
603
605k
  LINENO *ext = (LINENO *) ext1;
604
605k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
605k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
605k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
605k
}
609
610
static unsigned int
611
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
612
0
{
613
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
614
0
  struct external_lineno *ext = (struct external_lineno *) outp;
615
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
616
617
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
618
0
  return LINESZ;
619
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
620
621
#endif /* NO_COFF_LINENOS */
622
623
static void
624
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
625
151k
{
626
151k
  AOUTHDR *aouthdr_ext;
627
151k
  struct internal_aouthdr *aouthdr_int;
628
629
151k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
151k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
151k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
151k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
151k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
151k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
151k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
151k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
151k
  aouthdr_int->text_start =
638
151k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
151k
  aouthdr_int->data_start =
640
151k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
32.0k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
25.7k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
57.8k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
57.8k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
57.8k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
57.8k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
57.8k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
57.8k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
57.8k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
57.8k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
57.8k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
57.8k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
32.0k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
32.0k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
25.7k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
25.7k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
7.20k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
7.20k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
7.20k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
7.20k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
7.20k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
7.20k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
7.20k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
11.1k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
11.1k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
11.1k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
11.1k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
151k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
625
11.1k
{
626
11.1k
  AOUTHDR *aouthdr_ext;
627
11.1k
  struct internal_aouthdr *aouthdr_int;
628
629
11.1k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
11.1k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
11.1k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
11.1k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
11.1k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
11.1k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
11.1k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
11.1k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
11.1k
  aouthdr_int->text_start =
638
11.1k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
11.1k
  aouthdr_int->data_start =
640
11.1k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
11.1k
#ifdef ALPHAECOFF
678
11.1k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
11.1k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
11.1k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
11.1k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
11.1k
#endif
683
11.1k
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
625
11.0k
{
626
11.0k
  AOUTHDR *aouthdr_ext;
627
11.0k
  struct internal_aouthdr *aouthdr_int;
628
629
11.0k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
11.0k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
11.0k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
11.0k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
11.0k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
11.0k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
11.0k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
11.0k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
11.0k
  aouthdr_int->text_start =
638
11.0k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
11.0k
  aouthdr_int->data_start =
640
11.0k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
11.0k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
32.0k
{
626
32.0k
  AOUTHDR *aouthdr_ext;
627
32.0k
  struct internal_aouthdr *aouthdr_int;
628
629
32.0k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
32.0k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
32.0k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
32.0k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
32.0k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
32.0k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
32.0k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
32.0k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
32.0k
  aouthdr_int->text_start =
638
32.0k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
32.0k
  aouthdr_int->data_start =
640
32.0k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
32.0k
#ifdef RS6000COFF_C
643
32.0k
#ifdef XCOFF64
644
32.0k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
32.0k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
32.0k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
32.0k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
32.0k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
32.0k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
32.0k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
32.0k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
32.0k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
32.0k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
32.0k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
32.0k
#ifdef XCOFF64
659
32.0k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
32.0k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
32.0k
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
32.0k
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
625
9.65k
{
626
9.65k
  AOUTHDR *aouthdr_ext;
627
9.65k
  struct internal_aouthdr *aouthdr_int;
628
629
9.65k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
9.65k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
9.65k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
9.65k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
9.65k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
9.65k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
9.65k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
9.65k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
9.65k
  aouthdr_int->text_start =
638
9.65k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
9.65k
  aouthdr_int->data_start =
640
9.65k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
9.65k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
625
9.23k
{
626
9.23k
  AOUTHDR *aouthdr_ext;
627
9.23k
  struct internal_aouthdr *aouthdr_int;
628
629
9.23k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
9.23k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
9.23k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
9.23k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
9.23k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
9.23k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
9.23k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
9.23k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
9.23k
  aouthdr_int->text_start =
638
9.23k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
9.23k
  aouthdr_int->data_start =
640
9.23k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
9.23k
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
625
9.23k
{
626
9.23k
  AOUTHDR *aouthdr_ext;
627
9.23k
  struct internal_aouthdr *aouthdr_int;
628
629
9.23k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
9.23k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
9.23k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
9.23k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
9.23k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
9.23k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
9.23k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
9.23k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
9.23k
  aouthdr_int->text_start =
638
9.23k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
9.23k
  aouthdr_int->data_start =
640
9.23k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
9.23k
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
625
7.20k
{
626
7.20k
  AOUTHDR *aouthdr_ext;
627
7.20k
  struct internal_aouthdr *aouthdr_int;
628
629
7.20k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
7.20k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
7.20k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
7.20k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
7.20k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
7.20k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
7.20k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
7.20k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
7.20k
  aouthdr_int->text_start =
638
7.20k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
7.20k
  aouthdr_int->data_start =
640
7.20k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
7.20k
#ifdef MIPSECOFF
668
7.20k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
7.20k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
7.20k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
7.20k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
7.20k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
7.20k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
7.20k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
7.20k
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
7.20k
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
25.7k
{
626
25.7k
  AOUTHDR *aouthdr_ext;
627
25.7k
  struct internal_aouthdr *aouthdr_int;
628
629
25.7k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
25.7k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
25.7k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
25.7k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
25.7k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
25.7k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
25.7k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
25.7k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
25.7k
  aouthdr_int->text_start =
638
25.7k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
25.7k
  aouthdr_int->data_start =
640
25.7k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
25.7k
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
25.7k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
25.7k
#endif
648
25.7k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
25.7k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
25.7k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
25.7k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
25.7k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
25.7k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
25.7k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
25.7k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
25.7k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
25.7k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
25.7k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
25.7k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
25.7k
#endif
665
25.7k
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
25.7k
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
625
2.28k
{
626
2.28k
  AOUTHDR *aouthdr_ext;
627
2.28k
  struct internal_aouthdr *aouthdr_int;
628
629
2.28k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2.28k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2.28k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2.28k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2.28k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2.28k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2.28k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2.28k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2.28k
  aouthdr_int->text_start =
638
2.28k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2.28k
  aouthdr_int->data_start =
640
2.28k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2.28k
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
625
454
{
626
454
  AOUTHDR *aouthdr_ext;
627
454
  struct internal_aouthdr *aouthdr_int;
628
629
454
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
454
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
454
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
454
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
454
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
454
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
454
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
454
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
454
  aouthdr_int->text_start =
638
454
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
454
  aouthdr_int->data_start =
640
454
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
454
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
625
2.28k
{
626
2.28k
  AOUTHDR *aouthdr_ext;
627
2.28k
  struct internal_aouthdr *aouthdr_int;
628
629
2.28k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2.28k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2.28k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2.28k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2.28k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2.28k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2.28k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2.28k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2.28k
  aouthdr_int->text_start =
638
2.28k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2.28k
  aouthdr_int->data_start =
640
2.28k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2.28k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
625
16.2k
{
626
16.2k
  AOUTHDR *aouthdr_ext;
627
16.2k
  struct internal_aouthdr *aouthdr_int;
628
629
16.2k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
16.2k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
16.2k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
16.2k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
16.2k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
16.2k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
16.2k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
16.2k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
16.2k
  aouthdr_int->text_start =
638
16.2k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
16.2k
  aouthdr_int->data_start =
640
16.2k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
16.2k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
625
6.01k
{
626
6.01k
  AOUTHDR *aouthdr_ext;
627
6.01k
  struct internal_aouthdr *aouthdr_int;
628
629
6.01k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
6.01k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
6.01k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
6.01k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
6.01k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
6.01k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
6.01k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
6.01k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
6.01k
  aouthdr_int->text_start =
638
6.01k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
6.01k
  aouthdr_int->data_start =
640
6.01k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
6.01k
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
625
8.83k
{
626
8.83k
  AOUTHDR *aouthdr_ext;
627
8.83k
  struct internal_aouthdr *aouthdr_int;
628
629
8.83k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
8.83k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
8.83k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
8.83k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
8.83k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
8.83k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
8.83k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
8.83k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
8.83k
  aouthdr_int->text_start =
638
8.83k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
8.83k
  aouthdr_int->data_start =
640
8.83k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
8.83k
}
684
685
static unsigned int
686
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
687
10
{
688
10
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
10
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
10
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
10
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
10
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
10
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
10
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
10
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
10
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
10
        aouthdr_out->text_start);
699
10
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
10
        aouthdr_out->data_start);
701
702
#ifdef RS6000COFF_C
703
#ifdef XCOFF64
704
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
705
#else
706
0
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
707
#endif
708
0
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
709
0
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
710
0
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
711
0
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
712
0
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
713
0
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
714
0
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
715
0
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
716
0
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
717
0
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
718
#ifdef XCOFF64
719
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
720
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
721
#else
722
0
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
723
0
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
724
#endif
725
  /* TODO: set o_*psize dynamically */
726
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
727
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
728
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
729
0
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
730
0
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
731
0
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
732
0
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
733
#ifdef XCOFF64
734
0
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
735
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
736
#endif
737
#endif
738
739
#ifdef MIPSECOFF
740
9
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
9
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
9
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
#endif
748
749
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
0
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
0
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
0
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
0
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
0
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
10
  return AOUTSZ;
760
10
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_aouthdr_out
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
687
1
{
688
1
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
1
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
1
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
1
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
1
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
1
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
1
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
1
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
1
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
1
        aouthdr_out->text_start);
699
1
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
1
        aouthdr_out->data_start);
701
702
#ifdef RS6000COFF_C
703
#ifdef XCOFF64
704
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
705
#else
706
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
707
#endif
708
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
709
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
710
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
711
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
712
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
713
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
714
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
715
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
716
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
717
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
718
#ifdef XCOFF64
719
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
720
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
721
#else
722
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
723
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
724
#endif
725
  /* TODO: set o_*psize dynamically */
726
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
727
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
728
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
729
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
730
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
731
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
732
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
733
#ifdef XCOFF64
734
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
735
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
736
#endif
737
#endif
738
739
#ifdef MIPSECOFF
740
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
#endif
748
749
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
1
  return AOUTSZ;
760
1
}
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
687
9
{
688
9
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
9
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
9
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
9
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
9
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
9
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
9
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
9
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
9
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
9
        aouthdr_out->text_start);
699
9
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
9
        aouthdr_out->data_start);
701
702
#ifdef RS6000COFF_C
703
#ifdef XCOFF64
704
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
705
#else
706
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
707
#endif
708
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
709
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
710
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
711
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
712
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
713
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
714
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
715
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
716
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
717
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
718
#ifdef XCOFF64
719
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
720
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
721
#else
722
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
723
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
724
#endif
725
  /* TODO: set o_*psize dynamically */
726
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
727
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
728
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
729
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
730
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
731
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
732
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
733
#ifdef XCOFF64
734
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
735
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
736
#endif
737
#endif
738
739
9
#ifdef MIPSECOFF
740
9
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
9
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
9
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
9
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
9
#endif
748
749
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
9
  return AOUTSZ;
760
9
}
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
761
762
ATTRIBUTE_UNUSED
763
static void
764
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
765
151M
{
766
151M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
151M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
151M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
151M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
151M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
151M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
151M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
151M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
151M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
151M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
151M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
151M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
12.5M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
151M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
765
77.8k
{
766
77.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
77.8k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
77.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
77.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
77.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
77.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
77.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
77.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
77.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
77.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
77.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
77.8k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
77.8k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
765
12.1M
{
766
12.1M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
12.1M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
12.1M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
12.1M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
12.1M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
12.1M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
12.1M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
12.1M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
12.1M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
12.1M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
12.1M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
12.1M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
12.1M
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
5.61M
{
766
5.61M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
5.61M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
5.61M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
5.61M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
5.61M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
5.61M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
5.61M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
5.61M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
5.61M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
5.61M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
5.61M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
5.61M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
5.61M
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
765
11.3M
{
766
11.3M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
11.3M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
11.3M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
11.3M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
11.3M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
11.3M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
11.3M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
11.3M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
11.3M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
11.3M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
11.3M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
11.3M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
11.3M
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
765
10.9M
{
766
10.9M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
10.9M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
10.9M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
10.9M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
10.9M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
10.9M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
10.9M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
10.9M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
10.9M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
10.9M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
10.9M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
10.9M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
10.9M
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
765
19.3M
{
766
19.3M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
19.3M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
19.3M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
19.3M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
19.3M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
19.3M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
19.3M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
19.3M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
19.3M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
19.3M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
19.3M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
19.3M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
19.3M
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
32.3M
{
766
32.3M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
32.3M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
32.3M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
32.3M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
32.3M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
32.3M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
32.3M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
32.3M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
32.3M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
32.3M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
32.3M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
32.3M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
32.3M
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
765
15.4M
{
766
15.4M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
15.4M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
15.4M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
15.4M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
15.4M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
15.4M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
15.4M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
15.4M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
15.4M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
15.4M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
15.4M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
15.4M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
15.4M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
765
22.7M
{
766
22.7M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
22.7M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
22.7M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
22.7M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
22.7M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
22.7M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
22.7M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
22.7M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
22.7M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
22.7M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
22.7M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
22.7M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
22.7M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
765
12.5M
{
766
12.5M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
12.5M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
12.5M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
12.5M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
12.5M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
12.5M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
12.5M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
12.5M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
12.5M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
12.5M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
12.5M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
12.5M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
12.5M
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
12.5M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
12.5M
#endif
787
12.5M
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
765
1.36M
{
766
1.36M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
1.36M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
1.36M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
1.36M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
1.36M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
1.36M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
1.36M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
1.36M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
1.36M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
1.36M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
1.36M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
1.36M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
1.36M
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
765
7.73M
{
766
7.73M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
7.73M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
7.73M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
7.73M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
7.73M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
7.73M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
7.73M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
7.73M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
7.73M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
7.73M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
7.73M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
7.73M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
7.73M
}
788
789
ATTRIBUTE_UNUSED
790
static unsigned int
791
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
792
2
{
793
2
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
2
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
2
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
2
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
2
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
2
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
2
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
2
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
2
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
2
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
2
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
2
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
2
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
2
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
811
0
  else
812
0
    {
813
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
814
815
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
816
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
817
0
      _bfd_error_handler
818
  /* xgettext:c-format */
819
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
820
0
   abfd, buf, scnhdr_int->s_nlnno);
821
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
822
0
    }
823
824
2
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
2
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
826
0
  else
827
0
    {
828
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
829
830
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
831
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
832
      /* xgettext:c-format */
833
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
834
0
        abfd, buf, scnhdr_int->s_nreloc);
835
0
      bfd_set_error (bfd_error_file_truncated);
836
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
837
0
      ret = 0;
838
0
    }
839
840
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
841
2
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
2
  return ret;
844
2
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_scnhdr_out
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
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
792
2
{
793
2
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
2
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
2
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
2
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
2
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
2
#endif
800
2
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
2
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
2
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
2
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
2
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
2
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
2
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
2
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
2
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
2
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
811
0
  else
812
0
    {
813
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
814
815
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
816
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
817
0
      _bfd_error_handler
818
  /* xgettext:c-format */
819
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
820
0
   abfd, buf, scnhdr_int->s_nlnno);
821
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
822
0
    }
823
824
2
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
2
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
826
0
  else
827
0
    {
828
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
829
830
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
831
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
832
      /* xgettext:c-format */
833
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
834
0
        abfd, buf, scnhdr_int->s_nreloc);
835
0
      bfd_set_error (bfd_error_file_truncated);
836
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
837
0
      ret = 0;
838
0
    }
839
840
2
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
841
2
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
2
#endif
843
2
  return ret;
844
2
}
Unexecuted instantiation: coff-z80.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out