Coverage Report

Created: 2024-05-21 06:29

/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-2024 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
4.96M
  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
4.96M
  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
20.3M
  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
18.1M
  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
291k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
306k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
306k
  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
703k
  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
35.0M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
0
#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
116k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
0
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
116k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
0
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
116k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
0
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
116k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
0
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
116k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
0
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
116k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
0
#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
105M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
0
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
105M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
0
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
94.0M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
0
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
105M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
0
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
105M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
0
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
105M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
0
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
94.1M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
0
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
0
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
94.1M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
0
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
0
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
100M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
0
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
294k
#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
294k
{
217
294k
  RELOC *reloc_src = (RELOC *) src;
218
294k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
294k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
294k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
294k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
25.7k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
294k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
4.24k
{
217
4.24k
  RELOC *reloc_src = (RELOC *) src;
218
4.24k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
4.24k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
4.24k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
4.24k
  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
4.24k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
239k
{
217
239k
  RELOC *reloc_src = (RELOC *) src;
218
239k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
239k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
239k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
239k
  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
239k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
14.1k
{
217
14.1k
  RELOC *reloc_src = (RELOC *) src;
218
14.1k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
14.1k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
14.1k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
14.1k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
14.1k
#ifdef SWAP_IN_RELOC_OFFSET
225
14.1k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
14.1k
#endif
227
14.1k
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
24.7k
{
217
24.7k
  RELOC *reloc_src = (RELOC *) src;
218
24.7k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
24.7k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
24.7k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
24.7k
  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
24.7k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
4.48k
{
217
4.48k
  RELOC *reloc_src = (RELOC *) src;
218
4.48k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
4.48k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
4.48k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
4.48k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
4.48k
#ifdef SWAP_IN_RELOC_OFFSET
225
4.48k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
4.48k
#endif
227
4.48k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_in
coff-tic54x.c:coff_swap_reloc_in
Line
Count
Source
216
202
{
217
202
  RELOC *reloc_src = (RELOC *) src;
218
202
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
202
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
202
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
202
  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
202
}
coff-z80.c:coff_swap_reloc_in
Line
Count
Source
216
6.15k
{
217
6.15k
  RELOC *reloc_src = (RELOC *) src;
218
6.15k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
6.15k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
6.15k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
6.15k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
6.15k
#ifdef SWAP_IN_RELOC_OFFSET
225
6.15k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
6.15k
#endif
227
6.15k
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
906
{
217
906
  RELOC *reloc_src = (RELOC *) src;
218
906
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
906
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
906
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
906
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
906
#ifdef SWAP_IN_RELOC_OFFSET
225
906
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
906
#endif
227
906
}
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
610
{
253
610
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
610
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
610
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
610
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
610
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
610
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
610
{
253
610
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
610
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
610
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
610
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
610
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
610
}
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
40.0M
{
281
40.0M
  FILHDR *filehdr_src = (FILHDR *) src;
282
40.0M
  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
40.0M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
40.0M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
40.0M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
40.0M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
40.0M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
40.0M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
40.0M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
10.0M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
40.0M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
1.66M
{
281
1.66M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.66M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.66M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.66M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.66M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.66M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.66M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.66M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.66M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.66M
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
1.68M
{
281
1.68M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.68M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.68M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.68M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.68M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.68M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.68M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.68M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.68M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.68M
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
3.32M
{
281
3.32M
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.32M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
3.32M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.32M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.32M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.32M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.32M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.32M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.32M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
3.32M
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
1.68M
{
281
1.68M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.68M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.68M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.68M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.68M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.68M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.68M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.68M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.68M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.68M
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
1.68M
{
281
1.68M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.68M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.68M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.68M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.68M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.68M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.68M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.68M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.68M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.68M
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
1.68M
{
281
1.68M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.68M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.68M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.68M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.68M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.68M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.68M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.68M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.68M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.68M
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
5.02M
{
281
5.02M
  FILHDR *filehdr_src = (FILHDR *) src;
282
5.02M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
5.02M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
5.02M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
5.02M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
5.02M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
5.02M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
5.02M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
5.02M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
5.02M
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
1.67M
{
281
1.67M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.67M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.67M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.67M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.67M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.67M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.67M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.67M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.67M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.67M
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
6.55M
{
281
6.55M
  FILHDR *filehdr_src = (FILHDR *) src;
282
6.55M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
6.55M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
6.55M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
6.55M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
6.55M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
6.55M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
6.55M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
6.55M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
6.55M
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
2.88k
{
281
2.88k
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.88k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.88k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.88k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.88k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.88k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.88k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.88k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.88k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.88k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
1.67M
{
281
1.67M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.67M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.67M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.67M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.67M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.67M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.67M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.67M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.67M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.67M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
10.0M
{
281
10.0M
  FILHDR *filehdr_src = (FILHDR *) src;
282
10.0M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
10.0M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
10.0M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
10.0M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
10.0M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
10.0M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
10.0M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
10.0M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
10.0M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
10.0M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
10.0M
#endif
298
10.0M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
1.67M
{
281
1.67M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.67M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.67M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.67M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.67M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.67M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.67M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.67M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.67M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.67M
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
1.67M
{
281
1.67M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.67M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
1.67M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.67M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.67M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.67M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.67M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.67M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.67M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
1.67M
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
0
{
303
0
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
0
  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
0
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
0
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
0
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
0
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
0
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
0
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
0
  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
0
  return bfd_coff_filhsz (abfd);
321
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_filehdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_filehdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_filehdr_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_filehdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_filehdr_out
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
1.66M
{
328
1.66M
  SYMENT *ext = (SYMENT *) ext1;
329
1.66M
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.66M
  if (ext->e.e_name[0] == 0)
332
1.11M
    {
333
1.11M
      in->_n._n_n._n_zeroes = 0;
334
1.11M
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
1.11M
    }
336
552k
  else
337
552k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
552k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
552k
#endif
343
552k
    }
344
345
1.66M
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.66M
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.66M
  if (sizeof (ext->e_type) == 2)
348
1.66M
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
1.66M
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.66M
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
286k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
1.66M
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
89.4k
{
328
89.4k
  SYMENT *ext = (SYMENT *) ext1;
329
89.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
89.4k
  if (ext->e.e_name[0] == 0)
332
61.4k
    {
333
61.4k
      in->_n._n_n._n_zeroes = 0;
334
61.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
61.4k
    }
336
28.0k
  else
337
28.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
28.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
28.0k
#endif
343
28.0k
    }
344
345
89.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
89.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
89.4k
  if (sizeof (ext->e_type) == 2)
348
89.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
89.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
89.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
89.4k
}
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
76.3k
{
328
76.3k
  SYMENT *ext = (SYMENT *) ext1;
329
76.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
76.3k
  if (ext->e.e_name[0] == 0)
332
44.3k
    {
333
44.3k
      in->_n._n_n._n_zeroes = 0;
334
44.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
44.3k
    }
336
31.9k
  else
337
31.9k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
31.9k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
31.9k
#endif
343
31.9k
    }
344
345
76.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
76.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
76.3k
  if (sizeof (ext->e_type) == 2)
348
76.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
76.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
76.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
76.3k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
631k
{
328
631k
  SYMENT *ext = (SYMENT *) ext1;
329
631k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
631k
  if (ext->e.e_name[0] == 0)
332
371k
    {
333
371k
      in->_n._n_n._n_zeroes = 0;
334
371k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
371k
    }
336
260k
  else
337
260k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
260k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
260k
#endif
343
260k
    }
344
345
631k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
631k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
631k
  if (sizeof (ext->e_type) == 2)
348
631k
    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
631k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
631k
  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
631k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
286k
{
328
286k
  SYMENT *ext = (SYMENT *) ext1;
329
286k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
286k
  if (ext->e.e_name[0] == 0)
332
193k
    {
333
193k
      in->_n._n_n._n_zeroes = 0;
334
193k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
193k
    }
336
92.5k
  else
337
92.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
92.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
92.5k
#endif
343
92.5k
    }
344
345
286k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
286k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
286k
  if (sizeof (ext->e_type) == 2)
348
286k
    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
286k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
286k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
286k
#ifdef COFF_ADJUST_SYM_IN_POST
354
286k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
286k
#endif
356
286k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
398k
{
328
398k
  SYMENT *ext = (SYMENT *) ext1;
329
398k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
398k
  if (ext->e.e_name[0] == 0)
332
307k
    {
333
307k
      in->_n._n_n._n_zeroes = 0;
334
307k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
307k
    }
336
90.7k
  else
337
90.7k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
90.7k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
90.7k
#endif
343
90.7k
    }
344
345
398k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
398k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
398k
  if (sizeof (ext->e_type) == 2)
348
398k
    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
398k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
398k
  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
398k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
182k
{
328
182k
  SYMENT *ext = (SYMENT *) ext1;
329
182k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
182k
  if (ext->e.e_name[0] == 0)
332
134k
    {
333
134k
      in->_n._n_n._n_zeroes = 0;
334
134k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
134k
    }
336
48.6k
  else
337
48.6k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
48.6k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
48.6k
#endif
343
48.6k
    }
344
345
182k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
182k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
182k
  if (sizeof (ext->e_type) == 2)
348
182k
    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
182k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
182k
  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
182k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
0
{
361
0
  struct internal_syment *in = (struct internal_syment *) inp;
362
0
  SYMENT *ext =(SYMENT *) extp;
363
364
#ifdef COFF_ADJUST_SYM_OUT_PRE
365
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
366
#endif
367
368
0
  if (in->_n._n_name[0] == 0)
369
0
    {
370
0
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
0
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
0
    }
373
0
  else
374
0
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
0
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
0
#endif
380
0
    }
381
382
0
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
0
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
0
  if (sizeof (ext->e_type) == 2)
386
0
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
0
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
0
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
0
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
0
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
0
  return SYMESZ;
398
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_sym_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out
Unexecuted instantiation: coff-go32.c:coff_swap_sym_out
Unexecuted instantiation: coff-i386.c:coff_swap_sym_out
Unexecuted instantiation: coff-sh.c:coff_swap_sym_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic30.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_sym_out
Unexecuted instantiation: coff-z80.c:coff_swap_sym_out
Unexecuted instantiation: coff-z8k.c:coff_swap_sym_out
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx ATTRIBUTE_UNUSED,
406
      int numaux ATTRIBUTE_UNUSED,
407
      void * in1)
408
24.7M
{
409
24.7M
  AUXENT *ext = (AUXENT *) ext1;
410
24.7M
  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
24.7M
  switch (in_class)
417
24.7M
    {
418
209k
    case C_FILE:
419
209k
      if (ext->x_file.x_fname[0] == 0)
420
96.2k
  {
421
96.2k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
96.2k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
96.2k
  }
424
112k
      else
425
112k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
112k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
112k
#endif
431
112k
  }
432
209k
      goto end;
433
434
175k
    case C_STAT:
435
175k
#ifdef C_LEAFSTAT
436
469k
    case C_LEAFSTAT:
437
469k
#endif
438
512k
    case C_HIDDEN:
439
512k
      if (type == T_NULL)
440
306k
  {
441
306k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
306k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
306k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
306k
    in->x_scn.x_checksum = 0;
448
306k
    in->x_scn.x_associated = 0;
449
306k
    in->x_scn.x_comdat = 0;
450
451
306k
    goto end;
452
306k
  }
453
206k
      break;
454
24.7M
    }
455
456
24.2M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
24.2M
#ifndef NO_TVNDX
458
24.2M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
24.2M
#endif
460
461
24.2M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
24.2M
      || ISTAG (in_class))
463
4.96M
    {
464
4.96M
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
4.96M
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
4.96M
    }
467
19.2M
  else
468
19.2M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
19.2M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
19.2M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
19.2M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
19.2M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
19.2M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
19.2M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
19.2M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
19.2M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
19.2M
    }
481
482
24.2M
  if (ISFCN (type))
483
3.90M
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
20.3M
  else
485
20.3M
    {
486
20.3M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
20.3M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
20.3M
    }
489
490
24.7M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
24.7M
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
690k
{
409
690k
  AUXENT *ext = (AUXENT *) ext1;
410
690k
  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
690k
  switch (in_class)
417
690k
    {
418
9.80k
    case C_FILE:
419
9.80k
      if (ext->x_file.x_fname[0] == 0)
420
5.00k
  {
421
5.00k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
5.00k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
5.00k
  }
424
4.79k
      else
425
4.79k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
4.79k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
4.79k
#endif
431
4.79k
  }
432
9.80k
      goto end;
433
434
5.41k
    case C_STAT:
435
5.41k
#ifdef C_LEAFSTAT
436
6.64k
    case C_LEAFSTAT:
437
6.64k
#endif
438
15.4k
    case C_HIDDEN:
439
15.4k
      if (type == T_NULL)
440
2.87k
  {
441
2.87k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
2.87k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
2.87k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
2.87k
    in->x_scn.x_checksum = 0;
448
2.87k
    in->x_scn.x_associated = 0;
449
2.87k
    in->x_scn.x_comdat = 0;
450
451
2.87k
    goto end;
452
2.87k
  }
453
12.5k
      break;
454
690k
    }
455
456
678k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
678k
#ifndef NO_TVNDX
458
678k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
678k
#endif
460
461
678k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
678k
      || ISTAG (in_class))
463
155k
    {
464
155k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
155k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
155k
    }
467
522k
  else
468
522k
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
522k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
522k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
522k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
522k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
522k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
522k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
522k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
522k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
522k
    }
481
482
678k
  if (ISFCN (type))
483
143k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
534k
  else
485
534k
    {
486
534k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
534k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
534k
    }
489
490
690k
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
690k
}
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
597k
{
409
597k
  AUXENT *ext = (AUXENT *) ext1;
410
597k
  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
597k
  switch (in_class)
417
597k
    {
418
10.0k
    case C_FILE:
419
10.0k
      if (ext->x_file.x_fname[0] == 0)
420
4.57k
  {
421
4.57k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
4.57k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
4.57k
  }
424
5.45k
      else
425
5.45k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
5.45k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
5.45k
#endif
431
5.45k
  }
432
10.0k
      goto end;
433
434
3.35k
    case C_STAT:
435
3.35k
#ifdef C_LEAFSTAT
436
3.45k
    case C_LEAFSTAT:
437
3.45k
#endif
438
11.2k
    case C_HIDDEN:
439
11.2k
      if (type == T_NULL)
440
1.39k
  {
441
1.39k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
1.39k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
1.39k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
1.39k
    in->x_scn.x_checksum = 0;
448
1.39k
    in->x_scn.x_associated = 0;
449
1.39k
    in->x_scn.x_comdat = 0;
450
451
1.39k
    goto end;
452
1.39k
  }
453
9.81k
      break;
454
597k
    }
455
456
586k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
586k
#ifndef NO_TVNDX
458
586k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
586k
#endif
460
461
586k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
586k
      || ISTAG (in_class))
463
132k
    {
464
132k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
132k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
132k
    }
467
453k
  else
468
453k
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
453k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
453k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
453k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
453k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
453k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
453k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
453k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
453k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
453k
    }
481
482
586k
  if (ISFCN (type))
483
120k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
465k
  else
485
465k
    {
486
465k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
465k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
465k
    }
489
490
597k
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
597k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
15.1M
{
409
15.1M
  AUXENT *ext = (AUXENT *) ext1;
410
15.1M
  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
15.1M
  switch (in_class)
417
15.1M
    {
418
42.6k
    case C_FILE:
419
42.6k
      if (ext->x_file.x_fname[0] == 0)
420
23.3k
  {
421
23.3k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
23.3k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
23.3k
  }
424
19.2k
      else
425
19.2k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
19.2k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
19.2k
#endif
431
19.2k
  }
432
42.6k
      goto end;
433
434
6.75k
    case C_STAT:
435
6.75k
#ifdef C_LEAFSTAT
436
289k
    case C_LEAFSTAT:
437
289k
#endif
438
294k
    case C_HIDDEN:
439
294k
      if (type == T_NULL)
440
283k
  {
441
283k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
283k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
283k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
283k
    in->x_scn.x_checksum = 0;
448
283k
    in->x_scn.x_associated = 0;
449
283k
    in->x_scn.x_comdat = 0;
450
451
283k
    goto end;
452
283k
  }
453
10.2k
      break;
454
15.1M
    }
455
456
14.8M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
14.8M
#ifndef NO_TVNDX
458
14.8M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
14.8M
#endif
460
461
14.8M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
14.8M
      || ISTAG (in_class))
463
3.44M
    {
464
3.44M
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
3.44M
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
3.44M
    }
467
11.3M
  else
468
11.3M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
11.3M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
11.3M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
11.3M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
11.3M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
11.3M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
11.3M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
11.3M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
11.3M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
11.3M
    }
481
482
14.8M
  if (ISFCN (type))
483
2.63M
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
12.1M
  else
485
12.1M
    {
486
12.1M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
12.1M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
12.1M
    }
489
490
15.1M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
15.1M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
2.61M
{
409
2.61M
  AUXENT *ext = (AUXENT *) ext1;
410
2.61M
  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
2.61M
  switch (in_class)
417
2.61M
    {
418
85.6k
    case C_FILE:
419
85.6k
      if (ext->x_file.x_fname[0] == 0)
420
36.9k
  {
421
36.9k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
36.9k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
36.9k
  }
424
48.7k
      else
425
48.7k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
48.7k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
48.7k
#endif
431
48.7k
  }
432
85.6k
      goto end;
433
434
68.9k
    case C_STAT:
435
68.9k
#ifdef C_LEAFSTAT
436
76.6k
    case C_LEAFSTAT:
437
76.6k
#endif
438
81.0k
    case C_HIDDEN:
439
81.0k
      if (type == T_NULL)
440
15.4k
  {
441
15.4k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
15.4k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
15.4k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
15.4k
    in->x_scn.x_checksum = 0;
448
15.4k
    in->x_scn.x_associated = 0;
449
15.4k
    in->x_scn.x_comdat = 0;
450
451
15.4k
    goto end;
452
15.4k
  }
453
65.5k
      break;
454
2.61M
    }
455
456
2.51M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
2.51M
#ifndef NO_TVNDX
458
2.51M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
2.51M
#endif
460
461
2.51M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
2.51M
      || ISTAG (in_class))
463
423k
    {
464
423k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
423k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
423k
    }
467
2.08M
  else
468
2.08M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
2.08M
    }
481
482
2.51M
  if (ISFCN (type))
483
341k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
2.17M
  else
485
2.17M
    {
486
2.17M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
2.17M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
2.17M
    }
489
490
2.61M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
2.61M
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
4.05M
{
409
4.05M
  AUXENT *ext = (AUXENT *) ext1;
410
4.05M
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
4.05M
  switch (in_class)
417
4.05M
    {
418
32.7k
    case C_FILE:
419
32.7k
      if (ext->x_file.x_fname[0] == 0)
420
13.7k
  {
421
13.7k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
13.7k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
13.7k
  }
424
18.9k
      else
425
18.9k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
18.9k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
18.9k
#endif
431
18.9k
  }
432
32.7k
      goto end;
433
434
85.4k
    case C_STAT:
435
85.4k
#ifdef C_LEAFSTAT
436
86.2k
    case C_LEAFSTAT:
437
86.2k
#endif
438
100k
    case C_HIDDEN:
439
100k
      if (type == T_NULL)
440
868
  {
441
868
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
868
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
868
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
868
    in->x_scn.x_checksum = 0;
448
868
    in->x_scn.x_associated = 0;
449
868
    in->x_scn.x_comdat = 0;
450
451
868
    goto end;
452
868
  }
453
99.9k
      break;
454
4.05M
    }
455
456
4.02M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
4.02M
#ifndef NO_TVNDX
458
4.02M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
4.02M
#endif
460
461
4.02M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
4.02M
      || ISTAG (in_class))
463
461k
    {
464
461k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
461k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
461k
    }
467
3.56M
  else
468
3.56M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
3.56M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
3.56M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
3.56M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
3.56M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
3.56M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
3.56M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
3.56M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
3.56M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
3.56M
    }
481
482
4.02M
  if (ISFCN (type))
483
353k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
3.66M
  else
485
3.66M
    {
486
3.66M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
3.66M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
3.66M
    }
489
490
4.05M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
4.05M
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
1.67M
{
409
1.67M
  AUXENT *ext = (AUXENT *) ext1;
410
1.67M
  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.67M
  switch (in_class)
417
1.67M
    {
418
28.2k
    case C_FILE:
419
28.2k
      if (ext->x_file.x_fname[0] == 0)
420
12.5k
  {
421
12.5k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
12.5k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
12.5k
  }
424
15.6k
      else
425
15.6k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
15.6k
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
15.6k
#endif
431
15.6k
  }
432
28.2k
      goto end;
433
434
5.80k
    case C_STAT:
435
5.80k
#ifdef C_LEAFSTAT
436
6.78k
    case C_LEAFSTAT:
437
6.78k
#endif
438
10.1k
    case C_HIDDEN:
439
10.1k
      if (type == T_NULL)
440
2.03k
  {
441
2.03k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
442
2.03k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
443
2.03k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
444
445
    /* PE defines some extra fields; we zero them out for
446
       safety.  */
447
2.03k
    in->x_scn.x_checksum = 0;
448
2.03k
    in->x_scn.x_associated = 0;
449
2.03k
    in->x_scn.x_comdat = 0;
450
451
2.03k
    goto end;
452
2.03k
  }
453
8.10k
      break;
454
1.67M
    }
455
456
1.64M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
457
1.64M
#ifndef NO_TVNDX
458
1.64M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
459
1.64M
#endif
460
461
1.64M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
462
1.64M
      || ISTAG (in_class))
463
340k
    {
464
340k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
465
340k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
466
340k
    }
467
1.30M
  else
468
1.30M
    {
469
#if DIMNUM != E_DIMNUM
470
#error we need to cope with truncating or extending DIMNUM
471
#endif
472
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
473
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
474
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
475
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
476
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
477
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
478
1.30M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
479
1.30M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
480
1.30M
    }
481
482
1.64M
  if (ISFCN (type))
483
318k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
484
1.32M
  else
485
1.32M
    {
486
1.32M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
487
1.32M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
488
1.32M
    }
489
490
1.67M
 end: ;
491
492
#ifdef COFF_ADJUST_AUX_IN_POST
493
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
494
#endif
495
1.67M
}
496
497
static unsigned int
498
coff_swap_aux_out (bfd * abfd,
499
       void * inp,
500
       int type,
501
       int in_class,
502
       int indx ATTRIBUTE_UNUSED,
503
       int numaux ATTRIBUTE_UNUSED,
504
       void * extp)
505
0
{
506
0
  union internal_auxent * in = (union internal_auxent *) inp;
507
0
  AUXENT *ext = (AUXENT *) extp;
508
509
#ifdef COFF_ADJUST_AUX_OUT_PRE
510
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
511
#endif
512
513
0
  memset (ext, 0, AUXESZ);
514
515
0
  switch (in_class)
516
0
    {
517
0
    case C_FILE:
518
0
      if (in->x_file.x_n.x_fname[0] == 0)
519
0
  {
520
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
521
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
522
0
  }
523
0
      else
524
0
  {
525
#if FILNMLEN != E_FILNMLEN
526
#error we need to cope with truncating or extending FILNMLEN
527
#else
528
0
    memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
529
0
#endif
530
0
  }
531
0
      goto end;
532
533
0
    case C_STAT:
534
0
#ifdef C_LEAFSTAT
535
0
    case C_LEAFSTAT:
536
0
#endif
537
0
    case C_HIDDEN:
538
0
      if (type == T_NULL)
539
0
  {
540
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
541
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
542
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
543
0
    goto end;
544
0
  }
545
0
      break;
546
0
    }
547
548
0
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
549
0
#ifndef NO_TVNDX
550
0
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
551
0
#endif
552
553
0
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
554
0
      || ISTAG (in_class))
555
0
    {
556
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
557
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
558
0
    }
559
0
  else
560
0
    {
561
#if DIMNUM != E_DIMNUM
562
#error we need to cope with truncating or extending DIMNUM
563
#endif
564
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
565
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
566
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
567
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
568
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
569
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
570
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
571
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
572
0
    }
573
574
0
  if (ISFCN (type))
575
0
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
576
0
  else
577
0
    {
578
0
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
579
0
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
580
0
    }
581
582
0
 end:
583
#ifdef COFF_ADJUST_AUX_OUT_POST
584
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
585
#endif
586
0
  return AUXESZ;
587
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
Unexecuted instantiation: coff-sh.c:coff_swap_aux_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aux_out
Unexecuted instantiation: coff-z80.c:coff_swap_aux_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aux_out
588
589
#endif /* NO_COFF_SYMBOLS */
590
591
#ifndef NO_COFF_LINENOS
592
593
static void
594
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
595
1.81M
{
596
1.81M
  LINENO *ext = (LINENO *) ext1;
597
1.81M
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
1.81M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
1.81M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
1.81M
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
595
322k
{
596
322k
  LINENO *ext = (LINENO *) ext1;
597
322k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
322k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
322k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
322k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_in
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_in
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_in
coff-rs6000.c:coff_swap_lineno_in
Line
Count
Source
595
345k
{
596
345k
  LINENO *ext = (LINENO *) ext1;
597
345k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
345k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
345k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
345k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
595
190k
{
596
190k
  LINENO *ext = (LINENO *) ext1;
597
190k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
190k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
190k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
190k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
595
183k
{
596
183k
  LINENO *ext = (LINENO *) ext1;
597
183k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
183k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
183k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
183k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
595
357k
{
596
357k
  LINENO *ext = (LINENO *) ext1;
597
357k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
357k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
357k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
357k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
595
184k
{
596
184k
  LINENO *ext = (LINENO *) ext1;
597
184k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
184k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
184k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
184k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
595
231k
{
596
231k
  LINENO *ext = (LINENO *) ext1;
597
231k
  struct internal_lineno *in = (struct internal_lineno *) in1;
598
599
231k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
600
231k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
601
231k
}
602
603
static unsigned int
604
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
605
0
{
606
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
607
0
  struct external_lineno *ext = (struct external_lineno *) outp;
608
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
609
610
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
611
0
  return LINESZ;
612
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z80.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out
613
614
#endif /* NO_COFF_LINENOS */
615
616
static void
617
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
618
153k
{
619
153k
  AOUTHDR *aouthdr_ext;
620
153k
  struct internal_aouthdr *aouthdr_int;
621
622
153k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
153k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
153k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
153k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
153k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
153k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
153k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
153k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
153k
  aouthdr_int->text_start =
631
153k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
153k
  aouthdr_int->data_start =
633
153k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
26.2k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
21.2k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
47.4k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
47.4k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
47.4k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
47.4k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
47.4k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
47.4k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
47.4k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
47.4k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
47.4k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
47.4k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
26.2k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
26.2k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
21.2k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
21.2k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
5.95k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
5.95k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
5.95k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
5.95k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
5.95k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
5.95k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
5.95k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
10.5k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
10.5k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
10.5k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
10.5k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
153k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
618
10.5k
{
619
10.5k
  AOUTHDR *aouthdr_ext;
620
10.5k
  struct internal_aouthdr *aouthdr_int;
621
622
10.5k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
10.5k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
10.5k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
10.5k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
10.5k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
10.5k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
10.5k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
10.5k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
10.5k
  aouthdr_int->text_start =
631
10.5k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
10.5k
  aouthdr_int->data_start =
633
10.5k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
10.5k
#ifdef ALPHAECOFF
671
10.5k
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
10.5k
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
10.5k
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
10.5k
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
10.5k
#endif
676
10.5k
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
618
16.9k
{
619
16.9k
  AOUTHDR *aouthdr_ext;
620
16.9k
  struct internal_aouthdr *aouthdr_int;
621
622
16.9k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
16.9k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
16.9k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
16.9k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
16.9k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
16.9k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
16.9k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
16.9k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
16.9k
  aouthdr_int->text_start =
631
16.9k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
16.9k
  aouthdr_int->data_start =
633
16.9k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
16.9k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
618
26.2k
{
619
26.2k
  AOUTHDR *aouthdr_ext;
620
26.2k
  struct internal_aouthdr *aouthdr_int;
621
622
26.2k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
26.2k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
26.2k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
26.2k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
26.2k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
26.2k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
26.2k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
26.2k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
26.2k
  aouthdr_int->text_start =
631
26.2k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
26.2k
  aouthdr_int->data_start =
633
26.2k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
26.2k
#ifdef RS6000COFF_C
636
26.2k
#ifdef XCOFF64
637
26.2k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
26.2k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
26.2k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
26.2k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
26.2k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
26.2k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
26.2k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
26.2k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
26.2k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
26.2k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
26.2k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
26.2k
#ifdef XCOFF64
652
26.2k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
26.2k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
26.2k
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
26.2k
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
618
13.1k
{
619
13.1k
  AOUTHDR *aouthdr_ext;
620
13.1k
  struct internal_aouthdr *aouthdr_int;
621
622
13.1k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
13.1k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
13.1k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
13.1k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
13.1k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
13.1k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
13.1k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
13.1k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
13.1k
  aouthdr_int->text_start =
631
13.1k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
13.1k
  aouthdr_int->data_start =
633
13.1k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
13.1k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
618
12.7k
{
619
12.7k
  AOUTHDR *aouthdr_ext;
620
12.7k
  struct internal_aouthdr *aouthdr_int;
621
622
12.7k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
12.7k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
12.7k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
12.7k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
12.7k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
12.7k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
12.7k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
12.7k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
12.7k
  aouthdr_int->text_start =
631
12.7k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
12.7k
  aouthdr_int->data_start =
633
12.7k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
12.7k
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
618
12.7k
{
619
12.7k
  AOUTHDR *aouthdr_ext;
620
12.7k
  struct internal_aouthdr *aouthdr_int;
621
622
12.7k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
12.7k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
12.7k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
12.7k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
12.7k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
12.7k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
12.7k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
12.7k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
12.7k
  aouthdr_int->text_start =
631
12.7k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
12.7k
  aouthdr_int->data_start =
633
12.7k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
12.7k
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
618
5.95k
{
619
5.95k
  AOUTHDR *aouthdr_ext;
620
5.95k
  struct internal_aouthdr *aouthdr_int;
621
622
5.95k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
5.95k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
5.95k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
5.95k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
5.95k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
5.95k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
5.95k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
5.95k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
5.95k
  aouthdr_int->text_start =
631
5.95k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
5.95k
  aouthdr_int->data_start =
633
5.95k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
5.95k
#ifdef MIPSECOFF
661
5.95k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
5.95k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
5.95k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
5.95k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
5.95k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
5.95k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
5.95k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
5.95k
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
5.95k
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
618
21.2k
{
619
21.2k
  AOUTHDR *aouthdr_ext;
620
21.2k
  struct internal_aouthdr *aouthdr_int;
621
622
21.2k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
21.2k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
21.2k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
21.2k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
21.2k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
21.2k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
21.2k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
21.2k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
21.2k
  aouthdr_int->text_start =
631
21.2k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
21.2k
  aouthdr_int->data_start =
633
21.2k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
21.2k
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
21.2k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
21.2k
#endif
641
21.2k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
21.2k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
21.2k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
21.2k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
21.2k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
21.2k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
21.2k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
21.2k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
21.2k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
21.2k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
21.2k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
21.2k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
21.2k
#endif
658
21.2k
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
21.2k
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
618
1.46k
{
619
1.46k
  AOUTHDR *aouthdr_ext;
620
1.46k
  struct internal_aouthdr *aouthdr_int;
621
622
1.46k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
1.46k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
1.46k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
1.46k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
1.46k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
1.46k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
1.46k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
1.46k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
1.46k
  aouthdr_int->text_start =
631
1.46k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
1.46k
  aouthdr_int->data_start =
633
1.46k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
1.46k
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
618
425
{
619
425
  AOUTHDR *aouthdr_ext;
620
425
  struct internal_aouthdr *aouthdr_int;
621
622
425
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
425
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
425
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
425
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
425
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
425
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
425
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
425
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
425
  aouthdr_int->text_start =
631
425
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
425
  aouthdr_int->data_start =
633
425
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
425
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
618
1.50k
{
619
1.50k
  AOUTHDR *aouthdr_ext;
620
1.50k
  struct internal_aouthdr *aouthdr_int;
621
622
1.50k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
1.50k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
1.50k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
1.50k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
1.50k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
1.50k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
1.50k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
1.50k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
1.50k
  aouthdr_int->text_start =
631
1.50k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
1.50k
  aouthdr_int->data_start =
633
1.50k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
1.50k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
618
16.1k
{
619
16.1k
  AOUTHDR *aouthdr_ext;
620
16.1k
  struct internal_aouthdr *aouthdr_int;
621
622
16.1k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
16.1k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
16.1k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
16.1k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
16.1k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
16.1k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
16.1k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
16.1k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
16.1k
  aouthdr_int->text_start =
631
16.1k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
16.1k
  aouthdr_int->data_start =
633
16.1k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
16.1k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
618
4.05k
{
619
4.05k
  AOUTHDR *aouthdr_ext;
620
4.05k
  struct internal_aouthdr *aouthdr_int;
621
622
4.05k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
4.05k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
4.05k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
4.05k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
4.05k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
4.05k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
4.05k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
4.05k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
4.05k
  aouthdr_int->text_start =
631
4.05k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
4.05k
  aouthdr_int->data_start =
633
4.05k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
4.05k
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
618
10.3k
{
619
10.3k
  AOUTHDR *aouthdr_ext;
620
10.3k
  struct internal_aouthdr *aouthdr_int;
621
622
10.3k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
623
10.3k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
624
10.3k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
625
10.3k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
626
10.3k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
627
10.3k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
628
10.3k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
629
10.3k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
630
10.3k
  aouthdr_int->text_start =
631
10.3k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
632
10.3k
  aouthdr_int->data_start =
633
10.3k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
634
635
#ifdef RS6000COFF_C
636
#ifdef XCOFF64
637
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
638
#else
639
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
640
#endif
641
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
643
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
644
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
645
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
646
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
647
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
648
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
649
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
650
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
651
#ifdef XCOFF64
652
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
653
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
654
#else
655
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
656
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
657
#endif
658
#endif
659
660
#ifdef MIPSECOFF
661
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
662
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
663
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
664
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
665
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
666
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
667
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
668
#endif
669
670
#ifdef ALPHAECOFF
671
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
672
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
673
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
674
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
675
#endif
676
10.3k
}
677
678
static unsigned int
679
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
680
0
{
681
0
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
682
0
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
683
684
0
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
685
0
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
686
0
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
687
0
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
688
0
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
689
0
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
690
0
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
691
0
        aouthdr_out->text_start);
692
0
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
693
0
        aouthdr_out->data_start);
694
695
#ifdef RS6000COFF_C
696
#ifdef XCOFF64
697
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
698
#else
699
0
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
700
#endif
701
0
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
702
0
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
703
0
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
704
0
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
705
0
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
706
0
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
707
0
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
708
0
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
709
0
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
710
0
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
711
#ifdef XCOFF64
712
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
713
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
714
#else
715
0
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
716
0
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
717
#endif
718
  /* TODO: set o_*psize dynamically */
719
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
720
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
721
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
722
0
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
723
0
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
724
0
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
725
0
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
726
#ifdef XCOFF64
727
0
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
728
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
729
#endif
730
#endif
731
732
#ifdef MIPSECOFF
733
0
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
734
0
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
735
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
736
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
737
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
738
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
739
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
740
#endif
741
742
#ifdef ALPHAECOFF
743
  /* FIXME: What does bldrev mean?  */
744
0
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
745
0
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
746
0
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
747
0
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
748
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
749
0
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
750
#endif
751
752
0
  return AOUTSZ;
753
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_aouthdr_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_aouthdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_out
754
755
ATTRIBUTE_UNUSED
756
static void
757
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
758
106M
{
759
106M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
106M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
106M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
106M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
106M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
106M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
106M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
106M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
106M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
106M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
106M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
106M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
11.4M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
106M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
758
93.2k
{
759
93.2k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
93.2k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
93.2k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
93.2k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
93.2k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
93.2k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
93.2k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
93.2k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
93.2k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
93.2k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
93.2k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
93.2k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
93.2k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
758
16.5M
{
759
16.5M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
16.5M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
16.5M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
16.5M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
16.5M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
16.5M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
16.5M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
16.5M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
16.5M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
16.5M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
16.5M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
16.5M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
16.5M
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
758
6.43M
{
759
6.43M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
6.43M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
6.43M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
6.43M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
6.43M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
6.43M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
6.43M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
6.43M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
6.43M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
6.43M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
6.43M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
6.43M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
6.43M
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
758
6.53M
{
759
6.53M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
6.53M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
6.53M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
6.53M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
6.53M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
6.53M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
6.53M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
6.53M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
6.53M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
6.53M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
6.53M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
6.53M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
6.53M
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
758
5.93M
{
759
5.93M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
5.93M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
5.93M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
5.93M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
5.93M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
5.93M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
5.93M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
5.93M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
5.93M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
5.93M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
5.93M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
5.93M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
5.93M
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
758
4.80M
{
759
4.80M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
4.80M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
4.80M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
4.80M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
4.80M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
4.80M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
4.80M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
4.80M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
4.80M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
4.80M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
4.80M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
4.80M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
4.80M
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
758
26.6M
{
759
26.6M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
26.6M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
26.6M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
26.6M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
26.6M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
26.6M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
26.6M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
26.6M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
26.6M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
26.6M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
26.6M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
26.6M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
26.6M
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
758
12.8M
{
759
12.8M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
12.8M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
12.8M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
12.8M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
12.8M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
12.8M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
12.8M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
12.8M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
12.8M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
12.8M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
12.8M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
12.8M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
12.8M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
758
7.18M
{
759
7.18M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
7.18M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
7.18M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
7.18M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
7.18M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
7.18M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
7.18M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
7.18M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
7.18M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
7.18M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
7.18M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
7.18M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
7.18M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
758
11.4M
{
759
11.4M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
11.4M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
11.4M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
11.4M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
11.4M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
11.4M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
11.4M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
11.4M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
11.4M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
11.4M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
11.4M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
11.4M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
11.4M
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
11.4M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
11.4M
#endif
780
11.4M
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
758
1.03M
{
759
1.03M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
1.03M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
1.03M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
1.03M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
1.03M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
1.03M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
1.03M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
1.03M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
1.03M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
1.03M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
1.03M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
1.03M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
1.03M
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
758
7.23M
{
759
7.23M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
760
7.23M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
761
762
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
763
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
764
#endif
765
7.23M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
766
767
7.23M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
768
7.23M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
769
7.23M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
770
771
7.23M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
772
7.23M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
773
7.23M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
774
7.23M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
775
7.23M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
776
7.23M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
777
#ifdef COFF_ADJUST_SCNHDR_IN_POST
778
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
779
#endif
780
7.23M
}
781
782
ATTRIBUTE_UNUSED
783
static unsigned int
784
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
785
0
{
786
0
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
787
0
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
788
0
  unsigned int ret = bfd_coff_scnhsz (abfd);
789
790
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
791
0
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
792
#endif
793
0
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
794
795
0
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
796
0
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
797
0
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
798
0
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
799
0
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
800
0
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
801
0
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
802
0
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
803
0
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
804
0
  else
805
0
    {
806
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
807
808
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
809
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
810
0
      _bfd_error_handler
811
  /* xgettext:c-format */
812
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
813
0
   abfd, buf, scnhdr_int->s_nlnno);
814
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
815
0
    }
816
817
0
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
818
0
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
819
0
  else
820
0
    {
821
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
822
823
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
824
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
825
      /* xgettext:c-format */
826
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
827
0
        abfd, buf, scnhdr_int->s_nreloc);
828
0
      bfd_set_error (bfd_error_file_truncated);
829
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
830
0
      ret = 0;
831
0
    }
832
833
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
834
0
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
835
#endif
836
0
  return ret;
837
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out