Coverage Report

Created: 2023-08-28 06:26

/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
246k
  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
246k
  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
1.24M
  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
1.08M
  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
1.85k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
2.34k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
2.34k
  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
106k
  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
92.4k
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
7
#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
83
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
6
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
83
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
6
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
83
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
6
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
83
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
6
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
83
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
6
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
83
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
6
#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
940k
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
255
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
940k
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
255
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
917k
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
255
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
940k
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
255
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
940k
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
255
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
940k
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
255
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
917k
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
255
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
255
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
917k
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
255
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
255
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.09M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
255
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
2.51k
#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
2.51k
{
217
2.51k
  RELOC *reloc_src = (RELOC *) src;
218
2.51k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
2.51k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
2.51k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
2.51k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
0
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
2.51k
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_in
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
196
{
217
196
  RELOC *reloc_src = (RELOC *) src;
218
196
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
196
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
196
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
196
  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
196
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_in
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
2.32k
{
217
2.32k
  RELOC *reloc_src = (RELOC *) src;
218
2.32k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
2.32k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
2.32k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
2.32k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
2.32k
}
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_in
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_in
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_in
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
0
{
253
0
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
0
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
0
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
0
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
0
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_in
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
105k
{
281
105k
  FILHDR *filehdr_src = (FILHDR *) src;
282
105k
  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
105k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
105k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
105k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
105k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
105k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
105k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
105k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
27.0k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
105k
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
4.51k
{
281
4.51k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.51k
  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
4.51k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.51k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.51k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.51k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.51k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.51k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.51k
  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
4.51k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
4.73k
{
281
4.73k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.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
4.73k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.73k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.73k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.73k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.73k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.73k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.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
4.73k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
9.03k
{
281
9.03k
  FILHDR *filehdr_src = (FILHDR *) src;
282
9.03k
  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
9.03k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
9.03k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
9.03k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
9.03k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
9.03k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
9.03k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
9.03k
  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
9.03k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
4.73k
{
281
4.73k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.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
4.73k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.73k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.73k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.73k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.73k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.73k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.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
4.73k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
4.73k
{
281
4.73k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.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
4.73k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.73k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.73k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.73k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.73k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.73k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.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
4.73k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
4.73k
{
281
4.73k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.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
4.73k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.73k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.73k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.73k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.73k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.73k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.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
4.73k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
13.5k
{
281
13.5k
  FILHDR *filehdr_src = (FILHDR *) src;
282
13.5k
  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
13.5k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
13.5k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
13.5k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
13.5k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
13.5k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
13.5k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
13.5k
  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
13.5k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
4.51k
{
281
4.51k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.51k
  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
4.51k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.51k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.51k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.51k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.51k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.51k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.51k
  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
4.51k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
14.6k
{
281
14.6k
  FILHDR *filehdr_src = (FILHDR *) src;
282
14.6k
  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
14.6k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
14.6k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
14.6k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
14.6k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
14.6k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
14.6k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
14.6k
  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
14.6k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
106
{
281
106
  FILHDR *filehdr_src = (FILHDR *) src;
282
106
  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
106
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
106
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
106
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
106
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
106
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
106
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
106
  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
106
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
4.51k
{
281
4.51k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.51k
  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
4.51k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.51k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.51k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.51k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.51k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.51k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.51k
  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
4.51k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
27.0k
{
281
27.0k
  FILHDR *filehdr_src = (FILHDR *) src;
282
27.0k
  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
27.0k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
27.0k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
27.0k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
27.0k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
27.0k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
27.0k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
27.0k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
27.0k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
27.0k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
27.0k
#endif
298
27.0k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
4.51k
{
281
4.51k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.51k
  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
4.51k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.51k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.51k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.51k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.51k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.51k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.51k
  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
4.51k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
4.51k
{
281
4.51k
  FILHDR *filehdr_src = (FILHDR *) src;
282
4.51k
  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
4.51k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
4.51k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
4.51k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
4.51k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
4.51k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
4.51k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
4.51k
  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
4.51k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
10
{
303
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
10
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
10
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
0
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
10
  return bfd_coff_filhsz (abfd);
321
10
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
2
{
303
2
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
2
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
2
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
2
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
2
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
2
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
2
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
2
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
2
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
2
  return bfd_coff_filhsz (abfd);
321
2
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
2
{
303
2
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
2
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
2
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
2
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
2
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
2
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
2
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
2
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
2
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
2
  return bfd_coff_filhsz (abfd);
321
2
}
coff64-rs6000.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: 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
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: coff-rs6000.c:coff_swap_filehdr_out
coff-sh.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: coff-stgo32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_filehdr_out
coff-z8k.c:coff_swap_filehdr_out
Line
Count
Source
302
3
{
303
3
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
3
  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
3
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
3
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
3
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
3
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
3
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
3
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
3
  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
3
  return bfd_coff_filhsz (abfd);
321
3
}
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
154k
{
328
154k
  SYMENT *ext = (SYMENT *) ext1;
329
154k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
154k
  if (ext->e.e_name[0] == 0)
332
114k
    {
333
114k
      in->_n._n_n._n_zeroes = 0;
334
114k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
114k
    }
336
40.3k
  else
337
40.3k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
40.3k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
40.3k
#endif
343
40.3k
    }
344
345
154k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
154k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
154k
  if (sizeof (ext->e_type) == 2)
348
154k
    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
154k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
154k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
22.3k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
154k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
26.2k
{
328
26.2k
  SYMENT *ext = (SYMENT *) ext1;
329
26.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
26.2k
  if (ext->e.e_name[0] == 0)
332
19.0k
    {
333
19.0k
      in->_n._n_n._n_zeroes = 0;
334
19.0k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
19.0k
    }
336
7.26k
  else
337
7.26k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
7.26k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
7.26k
#endif
343
7.26k
    }
344
345
26.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
26.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
26.2k
  if (sizeof (ext->e_type) == 2)
348
26.2k
    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
26.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
26.2k
  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
26.2k
}
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
61.6k
{
328
61.6k
  SYMENT *ext = (SYMENT *) ext1;
329
61.6k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
61.6k
  if (ext->e.e_name[0] == 0)
332
46.4k
    {
333
46.4k
      in->_n._n_n._n_zeroes = 0;
334
46.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
46.4k
    }
336
15.2k
  else
337
15.2k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
15.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
15.2k
#endif
343
15.2k
    }
344
345
61.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
61.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
61.6k
  if (sizeof (ext->e_type) == 2)
348
61.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
61.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
61.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
61.6k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
12.4k
{
328
12.4k
  SYMENT *ext = (SYMENT *) ext1;
329
12.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
12.4k
  if (ext->e.e_name[0] == 0)
332
8.65k
    {
333
8.65k
      in->_n._n_n._n_zeroes = 0;
334
8.65k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
8.65k
    }
336
3.83k
  else
337
3.83k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
3.83k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
3.83k
#endif
343
3.83k
    }
344
345
12.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
12.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
12.4k
  if (sizeof (ext->e_type) == 2)
348
12.4k
    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
12.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
12.4k
  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
12.4k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
22.3k
{
328
22.3k
  SYMENT *ext = (SYMENT *) ext1;
329
22.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
22.3k
  if (ext->e.e_name[0] == 0)
332
16.4k
    {
333
16.4k
      in->_n._n_n._n_zeroes = 0;
334
16.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
16.4k
    }
336
5.92k
  else
337
5.92k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
5.92k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
5.92k
#endif
343
5.92k
    }
344
345
22.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
22.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
22.3k
  if (sizeof (ext->e_type) == 2)
348
22.3k
    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
22.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
22.3k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
22.3k
#ifdef COFF_ADJUST_SYM_IN_POST
354
22.3k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
22.3k
#endif
356
22.3k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
18.3k
{
328
18.3k
  SYMENT *ext = (SYMENT *) ext1;
329
18.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
18.3k
  if (ext->e.e_name[0] == 0)
332
13.7k
    {
333
13.7k
      in->_n._n_n._n_zeroes = 0;
334
13.7k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
13.7k
    }
336
4.58k
  else
337
4.58k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
4.58k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
4.58k
#endif
343
4.58k
    }
344
345
18.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
18.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
18.3k
  if (sizeof (ext->e_type) == 2)
348
18.3k
    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
18.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
18.3k
  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
18.3k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
13.4k
{
328
13.4k
  SYMENT *ext = (SYMENT *) ext1;
329
13.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
13.4k
  if (ext->e.e_name[0] == 0)
332
9.87k
    {
333
9.87k
      in->_n._n_n._n_zeroes = 0;
334
9.87k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
9.87k
    }
336
3.52k
  else
337
3.52k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
3.52k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
3.52k
#endif
343
3.52k
    }
344
345
13.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
13.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
13.4k
  if (sizeof (ext->e_type) == 2)
348
13.4k
    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
13.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
13.4k
  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
13.4k
}
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
1.48M
{
409
1.48M
  AUXENT *ext = (AUXENT *) ext1;
410
1.48M
  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.48M
  switch (in_class)
417
1.48M
    {
418
16.5k
    case C_FILE:
419
16.5k
      if (ext->x_file.x_fname[0] == 0)
420
6.80k
  {
421
6.80k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
6.80k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
6.80k
  }
424
9.74k
      else
425
9.74k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
9.74k
    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
9.74k
    else
436
9.74k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
9.74k
#endif
438
9.74k
  }
439
16.5k
      goto end;
440
441
13.5k
    case C_STAT:
442
13.5k
#ifdef C_LEAFSTAT
443
15.5k
    case C_LEAFSTAT:
444
15.5k
#endif
445
20.5k
    case C_HIDDEN:
446
20.5k
      if (type == T_NULL)
447
2.34k
  {
448
2.34k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
2.34k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
2.34k
    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.34k
    in->x_scn.x_checksum = 0;
455
2.34k
    in->x_scn.x_associated = 0;
456
2.34k
    in->x_scn.x_comdat = 0;
457
458
2.34k
    goto end;
459
2.34k
  }
460
18.1k
      break;
461
1.48M
    }
462
463
1.46M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.46M
#ifndef NO_TVNDX
465
1.46M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.46M
#endif
467
468
1.46M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.46M
      || ISTAG (in_class))
470
246k
    {
471
246k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
246k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
246k
    }
474
1.21M
  else
475
1.21M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
1.21M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
1.21M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
1.21M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
1.21M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
1.21M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
1.21M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
1.21M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
1.21M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
1.21M
    }
488
489
1.46M
  if (ISFCN (type))
490
218k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
1.24M
  else
492
1.24M
    {
493
1.24M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
1.24M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
1.24M
    }
496
497
1.48M
 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.48M
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
202k
{
409
202k
  AUXENT *ext = (AUXENT *) ext1;
410
202k
  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
202k
  switch (in_class)
417
202k
    {
418
1.18k
    case C_FILE:
419
1.18k
      if (ext->x_file.x_fname[0] == 0)
420
423
  {
421
423
    in->x_file.x_n.x_n.x_zeroes = 0;
422
423
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
423
  }
424
759
      else
425
759
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
759
    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
759
    else
436
759
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
759
#endif
438
759
  }
439
1.18k
      goto end;
440
441
2.73k
    case C_STAT:
442
2.73k
#ifdef C_LEAFSTAT
443
2.77k
    case C_LEAFSTAT:
444
2.77k
#endif
445
3.29k
    case C_HIDDEN:
446
3.29k
      if (type == T_NULL)
447
203
  {
448
203
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
203
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
203
    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
203
    in->x_scn.x_checksum = 0;
455
203
    in->x_scn.x_associated = 0;
456
203
    in->x_scn.x_comdat = 0;
457
458
203
    goto end;
459
203
  }
460
3.09k
      break;
461
202k
    }
462
463
201k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
201k
#ifndef NO_TVNDX
465
201k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
201k
#endif
467
468
201k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
201k
      || ISTAG (in_class))
470
43.0k
    {
471
43.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
43.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
43.0k
    }
474
158k
  else
475
158k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
158k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
158k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
158k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
158k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
158k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
158k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
158k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
158k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
158k
    }
488
489
201k
  if (ISFCN (type))
490
40.6k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
160k
  else
492
160k
    {
493
160k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
160k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
160k
    }
496
497
202k
 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
202k
}
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
726k
{
409
726k
  AUXENT *ext = (AUXENT *) ext1;
410
726k
  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
726k
  switch (in_class)
417
726k
    {
418
5.02k
    case C_FILE:
419
5.02k
      if (ext->x_file.x_fname[0] == 0)
420
1.82k
  {
421
1.82k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.82k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.82k
  }
424
3.19k
      else
425
3.19k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
3.19k
    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
3.19k
    else
436
3.19k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
3.19k
#endif
438
3.19k
  }
439
5.02k
      goto end;
440
441
6.05k
    case C_STAT:
442
6.05k
#ifdef C_LEAFSTAT
443
7.42k
    case C_LEAFSTAT:
444
7.42k
#endif
445
9.40k
    case C_HIDDEN:
446
9.40k
      if (type == T_NULL)
447
946
  {
448
946
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
946
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
946
    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
946
    in->x_scn.x_checksum = 0;
455
946
    in->x_scn.x_associated = 0;
456
946
    in->x_scn.x_comdat = 0;
457
458
946
    goto end;
459
946
  }
460
8.45k
      break;
461
726k
    }
462
463
720k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
720k
#ifndef NO_TVNDX
465
720k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
720k
#endif
467
468
720k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
720k
      || ISTAG (in_class))
470
112k
    {
471
112k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
112k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
112k
    }
474
608k
  else
475
608k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
608k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
608k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
608k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
608k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
608k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
608k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
608k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
608k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
608k
    }
488
489
720k
  if (ISFCN (type))
490
100k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
620k
  else
492
620k
    {
493
620k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
620k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
620k
    }
496
497
726k
 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
726k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
91.9k
{
409
91.9k
  AUXENT *ext = (AUXENT *) ext1;
410
91.9k
  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
91.9k
  switch (in_class)
417
91.9k
    {
418
1.13k
    case C_FILE:
419
1.13k
      if (ext->x_file.x_fname[0] == 0)
420
404
  {
421
404
    in->x_file.x_n.x_n.x_zeroes = 0;
422
404
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
404
  }
424
734
      else
425
734
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
734
    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
734
    else
436
734
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
734
#endif
438
734
  }
439
1.13k
      goto end;
440
441
323
    case C_STAT:
442
323
#ifdef C_LEAFSTAT
443
467
    case C_LEAFSTAT:
444
467
#endif
445
1.11k
    case C_HIDDEN:
446
1.11k
      if (type == T_NULL)
447
227
  {
448
227
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
227
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
227
    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
227
    in->x_scn.x_checksum = 0;
455
227
    in->x_scn.x_associated = 0;
456
227
    in->x_scn.x_comdat = 0;
457
458
227
    goto end;
459
227
  }
460
887
      break;
461
91.9k
    }
462
463
90.6k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
90.6k
#ifndef NO_TVNDX
465
90.6k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
90.6k
#endif
467
468
90.6k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
90.6k
      || ISTAG (in_class))
470
11.6k
    {
471
11.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
11.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
11.6k
    }
474
78.9k
  else
475
78.9k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
78.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
78.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
78.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
78.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
78.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
78.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
78.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
78.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
78.9k
    }
488
489
90.6k
  if (ISFCN (type))
490
10.5k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
80.1k
  else
492
80.1k
    {
493
80.1k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
80.1k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
80.1k
    }
496
497
91.9k
 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
91.9k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
186k
{
409
186k
  AUXENT *ext = (AUXENT *) ext1;
410
186k
  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
186k
  switch (in_class)
417
186k
    {
418
3.00k
    case C_FILE:
419
3.00k
      if (ext->x_file.x_fname[0] == 0)
420
1.43k
  {
421
1.43k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.43k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.43k
  }
424
1.56k
      else
425
1.56k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
1.56k
    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
1.56k
    else
436
1.56k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
1.56k
#endif
438
1.56k
  }
439
3.00k
      goto end;
440
441
2.80k
    case C_STAT:
442
2.80k
#ifdef C_LEAFSTAT
443
2.95k
    case C_LEAFSTAT:
444
2.95k
#endif
445
3.53k
    case C_HIDDEN:
446
3.53k
      if (type == T_NULL)
447
490
  {
448
490
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
490
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
490
    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
490
    in->x_scn.x_checksum = 0;
455
490
    in->x_scn.x_associated = 0;
456
490
    in->x_scn.x_comdat = 0;
457
458
490
    goto end;
459
490
  }
460
3.04k
      break;
461
186k
    }
462
463
182k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
182k
#ifndef NO_TVNDX
465
182k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
182k
#endif
467
468
182k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
182k
      || ISTAG (in_class))
470
29.7k
    {
471
29.7k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
29.7k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
29.7k
    }
474
153k
  else
475
153k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
153k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
153k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
153k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
153k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
153k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
153k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
153k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
153k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
153k
    }
488
489
182k
  if (ISFCN (type))
490
19.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
163k
  else
492
163k
    {
493
163k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
163k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
163k
    }
496
497
186k
 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
186k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
115k
{
409
115k
  AUXENT *ext = (AUXENT *) ext1;
410
115k
  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
115k
  switch (in_class)
417
115k
    {
418
2.96k
    case C_FILE:
419
2.96k
      if (ext->x_file.x_fname[0] == 0)
420
1.34k
  {
421
1.34k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.34k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.34k
  }
424
1.62k
      else
425
1.62k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
1.62k
    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
1.62k
    else
436
1.62k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
1.62k
#endif
438
1.62k
  }
439
2.96k
      goto end;
440
441
640
    case C_STAT:
442
640
#ifdef C_LEAFSTAT
443
694
    case C_LEAFSTAT:
444
694
#endif
445
1.30k
    case C_HIDDEN:
446
1.30k
      if (type == T_NULL)
447
64
  {
448
64
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
64
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
64
    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
64
    in->x_scn.x_checksum = 0;
455
64
    in->x_scn.x_associated = 0;
456
64
    in->x_scn.x_comdat = 0;
457
458
64
    goto end;
459
64
  }
460
1.23k
      break;
461
115k
    }
462
463
112k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
112k
#ifndef NO_TVNDX
465
112k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
112k
#endif
467
468
112k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
112k
      || ISTAG (in_class))
470
19.6k
    {
471
19.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
19.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
19.6k
    }
474
92.7k
  else
475
92.7k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
92.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
92.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
92.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
92.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
92.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
92.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
92.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
92.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
92.7k
    }
488
489
112k
  if (ISFCN (type))
490
18.5k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
93.8k
  else
492
93.8k
    {
493
93.8k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
93.8k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
93.8k
    }
496
497
115k
 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
115k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
160k
{
409
160k
  AUXENT *ext = (AUXENT *) ext1;
410
160k
  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
160k
  switch (in_class)
417
160k
    {
418
3.23k
    case C_FILE:
419
3.23k
      if (ext->x_file.x_fname[0] == 0)
420
1.37k
  {
421
1.37k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.37k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.37k
  }
424
1.86k
      else
425
1.86k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
1.86k
    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
1.86k
    else
436
1.86k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
1.86k
#endif
438
1.86k
  }
439
3.23k
      goto end;
440
441
957
    case C_STAT:
442
957
#ifdef C_LEAFSTAT
443
1.22k
    case C_LEAFSTAT:
444
1.22k
#endif
445
1.85k
    case C_HIDDEN:
446
1.85k
      if (type == T_NULL)
447
418
  {
448
418
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
418
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
418
    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
418
    in->x_scn.x_checksum = 0;
455
418
    in->x_scn.x_associated = 0;
456
418
    in->x_scn.x_comdat = 0;
457
458
418
    goto end;
459
418
  }
460
1.43k
      break;
461
160k
    }
462
463
157k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
157k
#ifndef NO_TVNDX
465
157k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
157k
#endif
467
468
157k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
157k
      || ISTAG (in_class))
470
30.4k
    {
471
30.4k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
30.4k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
30.4k
    }
474
126k
  else
475
126k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
126k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
126k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
126k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
126k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
126k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
126k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
126k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
126k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
126k
    }
488
489
157k
  if (ISFCN (type))
490
28.5k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
128k
  else
492
128k
    {
493
128k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
128k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
128k
    }
496
497
160k
 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
160k
}
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
563k
{
603
563k
  LINENO *ext = (LINENO *) ext1;
604
563k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
563k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
563k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
563k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
602
246k
{
603
246k
  LINENO *ext = (LINENO *) ext1;
604
246k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
246k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
246k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
246k
}
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
28.9k
{
603
28.9k
  LINENO *ext = (LINENO *) ext1;
604
28.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
28.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
28.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
28.9k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
602
44.5k
{
603
44.5k
  LINENO *ext = (LINENO *) ext1;
604
44.5k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
44.5k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
44.5k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
44.5k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
602
26.6k
{
603
26.6k
  LINENO *ext = (LINENO *) ext1;
604
26.6k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
26.6k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
26.6k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
26.6k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
602
77.3k
{
603
77.3k
  LINENO *ext = (LINENO *) ext1;
604
77.3k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
77.3k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
77.3k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
77.3k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
602
33.3k
{
603
33.3k
  LINENO *ext = (LINENO *) ext1;
604
33.3k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
33.3k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
33.3k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
33.3k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
602
105k
{
603
105k
  LINENO *ext = (LINENO *) ext1;
604
105k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
105k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
105k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
105k
}
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
1.40k
{
626
1.40k
  AOUTHDR *aouthdr_ext;
627
1.40k
  struct internal_aouthdr *aouthdr_int;
628
629
1.40k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1.40k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1.40k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1.40k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1.40k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1.40k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1.40k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1.40k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1.40k
  aouthdr_int->text_start =
638
1.40k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1.40k
  aouthdr_int->data_start =
640
1.40k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
1.31k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
4
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
1.32k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
1.32k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
1.32k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
1.32k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
1.32k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
1.32k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
1.32k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
1.32k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
1.32k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
1.32k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
1.31k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
1.31k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
4
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
4
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
1
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
1
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
1
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
1
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
1
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
1
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
1
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
0
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
0
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
0
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
0
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
1.40k
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_aouthdr_in
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
625
6
{
626
6
  AOUTHDR *aouthdr_ext;
627
6
  struct internal_aouthdr *aouthdr_int;
628
629
6
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
6
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
6
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
6
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
6
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
6
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
6
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
6
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
6
  aouthdr_int->text_start =
638
6
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
6
  aouthdr_int->data_start =
640
6
    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
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
1.31k
{
626
1.31k
  AOUTHDR *aouthdr_ext;
627
1.31k
  struct internal_aouthdr *aouthdr_int;
628
629
1.31k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1.31k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1.31k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1.31k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1.31k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1.31k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1.31k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1.31k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1.31k
  aouthdr_int->text_start =
638
1.31k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1.31k
  aouthdr_int->data_start =
640
1.31k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
1.31k
#ifdef RS6000COFF_C
643
1.31k
#ifdef XCOFF64
644
1.31k
  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
1.31k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
1.31k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
1.31k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
1.31k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
1.31k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
1.31k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
1.31k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
1.31k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
1.31k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
1.31k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
1.31k
#ifdef XCOFF64
659
1.31k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
1.31k
  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
1.31k
#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
1.31k
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
625
10
{
626
10
  AOUTHDR *aouthdr_ext;
627
10
  struct internal_aouthdr *aouthdr_int;
628
629
10
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
10
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
10
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
10
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
10
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
10
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
10
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
10
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
10
  aouthdr_int->text_start =
638
10
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
10
  aouthdr_int->data_start =
640
10
    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
10
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
625
6
{
626
6
  AOUTHDR *aouthdr_ext;
627
6
  struct internal_aouthdr *aouthdr_int;
628
629
6
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
6
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
6
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
6
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
6
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
6
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
6
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
6
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
6
  aouthdr_int->text_start =
638
6
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
6
  aouthdr_int->data_start =
640
6
    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
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
625
6
{
626
6
  AOUTHDR *aouthdr_ext;
627
6
  struct internal_aouthdr *aouthdr_int;
628
629
6
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
6
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
6
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
6
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
6
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
6
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
6
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
6
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
6
  aouthdr_int->text_start =
638
6
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
6
  aouthdr_int->data_start =
640
6
    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
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
625
1
{
626
1
  AOUTHDR *aouthdr_ext;
627
1
  struct internal_aouthdr *aouthdr_int;
628
629
1
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1
  aouthdr_int->text_start =
638
1
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1
  aouthdr_int->data_start =
640
1
    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
1
#ifdef MIPSECOFF
668
1
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
1
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
1
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
1
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
1
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
1
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
1
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
1
#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
1
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
4
{
626
4
  AOUTHDR *aouthdr_ext;
627
4
  struct internal_aouthdr *aouthdr_int;
628
629
4
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
4
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
4
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
4
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
4
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
4
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
4
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
4
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
4
  aouthdr_int->text_start =
638
4
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
4
  aouthdr_int->data_start =
640
4
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
4
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
4
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
4
#endif
648
4
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
4
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
4
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
4
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
4
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
4
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
4
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
4
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
4
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
4
  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
4
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
4
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
4
#endif
665
4
#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
4
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
625
19
{
626
19
  AOUTHDR *aouthdr_ext;
627
19
  struct internal_aouthdr *aouthdr_int;
628
629
19
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
19
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
19
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
19
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
19
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
19
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
19
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
19
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
19
  aouthdr_int->text_start =
638
19
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
19
  aouthdr_int->data_start =
640
19
    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
19
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
625
10
{
626
10
  AOUTHDR *aouthdr_ext;
627
10
  struct internal_aouthdr *aouthdr_int;
628
629
10
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
10
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
10
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
10
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
10
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
10
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
10
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
10
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
10
  aouthdr_int->text_start =
638
10
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
10
  aouthdr_int->data_start =
640
10
    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
10
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
625
12
{
626
12
  AOUTHDR *aouthdr_ext;
627
12
  struct internal_aouthdr *aouthdr_int;
628
629
12
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
12
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
12
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
12
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
12
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
12
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
12
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
12
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
12
  aouthdr_int->text_start =
638
12
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
12
  aouthdr_int->data_start =
640
12
    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
12
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
625
4
{
626
4
  AOUTHDR *aouthdr_ext;
627
4
  struct internal_aouthdr *aouthdr_int;
628
629
4
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
4
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
4
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
4
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
4
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
4
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
4
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
4
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
4
  aouthdr_int->text_start =
638
4
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
4
  aouthdr_int->data_start =
640
4
    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
4
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
625
5
{
626
5
  AOUTHDR *aouthdr_ext;
627
5
  struct internal_aouthdr *aouthdr_int;
628
629
5
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
5
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
5
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
5
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
5
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
5
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
5
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
5
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
5
  aouthdr_int->text_start =
638
5
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
5
  aouthdr_int->data_start =
640
5
    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
5
}
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_in
684
685
static unsigned int
686
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
687
8
{
688
8
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
8
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
8
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
8
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
8
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
8
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
8
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
8
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
8
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
8
        aouthdr_out->text_start);
699
8
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
8
        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
1
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
1
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
1
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
1
  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
2
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
2
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
2
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
2
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
2
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
2
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
8
  return AOUTSZ;
760
8
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
687
2
{
688
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
2
        aouthdr_out->text_start);
699
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
2
        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
2
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
2
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
2
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
2
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
2
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
2
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
2
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
2
#endif
758
759
2
  return AOUTSZ;
760
2
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
687
2
{
688
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
2
        aouthdr_out->text_start);
699
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
2
        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
2
  return AOUTSZ;
760
2
}
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
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
1
#ifdef MIPSECOFF
740
1
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
1
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
1
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
1
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
1
#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: 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
coff-z8k.c:coff_swap_aouthdr_out
Line
Count
Source
687
3
{
688
3
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
3
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
3
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
3
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
3
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
3
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
3
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
3
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
3
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
3
        aouthdr_out->text_start);
699
3
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
3
        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
3
  return AOUTSZ;
760
3
}
761
762
ATTRIBUTE_UNUSED
763
static void
764
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
765
1.02M
{
766
1.02M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
1.02M
  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.02M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
1.02M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
1.02M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
1.02M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
1.02M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
1.02M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
1.02M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
1.02M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
1.02M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
1.02M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
22.8k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
1.02M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
765
179
{
766
179
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
179
  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
179
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
179
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
179
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
179
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
179
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
179
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
179
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
179
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
179
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
179
  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
179
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
765
20.3k
{
766
20.3k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
20.3k
  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
20.3k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
20.3k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
20.3k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
20.3k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
20.3k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
20.3k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
20.3k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
20.3k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
20.3k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
20.3k
  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
20.3k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
180k
{
766
180k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
180k
  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
180k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
180k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
180k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
180k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
180k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
180k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
180k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
180k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
180k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
180k
  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
180k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
765
82.1k
{
766
82.1k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
82.1k
  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
82.1k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
82.1k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
82.1k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
82.1k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
82.1k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
82.1k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
82.1k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
82.1k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
82.1k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
82.1k
  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
82.1k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
765
7.92k
{
766
7.92k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
7.92k
  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.92k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
7.92k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
7.92k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
7.92k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
7.92k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
7.92k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
7.92k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
7.92k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
7.92k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
7.92k
  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.92k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
765
6.44k
{
766
6.44k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
6.44k
  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
6.44k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
6.44k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
6.44k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
6.44k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
6.44k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
6.44k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
6.44k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
6.44k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
6.44k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
6.44k
  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
6.44k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
220k
{
766
220k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
220k
  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
220k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
220k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
220k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
220k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
220k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
220k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
220k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
220k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
220k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
220k
  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
220k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
765
360k
{
766
360k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
360k
  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
360k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
360k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
360k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
360k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
360k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
360k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
360k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
360k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
360k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
360k
  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
360k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
765
10.6k
{
766
10.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
10.6k
  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.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
10.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
10.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
10.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
10.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
10.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
10.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
10.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
10.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
10.6k
  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.6k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
765
22.8k
{
766
22.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
22.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
22.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
22.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
22.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
22.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
22.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
22.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
22.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
22.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
22.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
22.8k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
22.8k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
22.8k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
22.8k
#endif
787
22.8k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
765
9.17k
{
766
9.17k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
9.17k
  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
9.17k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
9.17k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
9.17k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
9.17k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
9.17k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
9.17k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
9.17k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
9.17k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
9.17k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
9.17k
  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
9.17k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
765
98.5k
{
766
98.5k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
98.5k
  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
98.5k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
98.5k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
98.5k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
98.5k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
98.5k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
98.5k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
98.5k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
98.5k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
98.5k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
98.5k
  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
98.5k
}
788
789
ATTRIBUTE_UNUSED
790
static unsigned int
791
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
792
255
{
793
255
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
255
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
255
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
0
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
255
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
255
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
255
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
255
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
255
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
255
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
255
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
255
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
255
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
255
    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
255
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
255
    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
0
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
255
  return ret;
844
255
}
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
coff-mips.c:mips_ecoff_swap_scnhdr_out
Line
Count
Source
792
1
{
793
1
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
1
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
1
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
1
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
1
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
1
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
1
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
1
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
1
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
1
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
1
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
1
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
1
    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
1
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
1
    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
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
1
  return ret;
844
1
}
Unexecuted instantiation: coff-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_scnhdr_out
coff-z8k.c:coff_swap_scnhdr_out
Line
Count
Source
792
254
{
793
254
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
254
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
254
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
254
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
254
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
254
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
254
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
254
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
254
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
254
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
254
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
254
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
254
    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
254
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
254
    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
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
254
  return ret;
844
254
}