Coverage Report

Created: 2023-08-28 06:28

/src/binutils-gdb/bfd/coffswap.h
Line
Count
Source (jump to first uncovered line)
1
/* Generic COFF swapping routines, for BFD.
2
   Copyright (C) 1990-2023 Free Software Foundation, Inc.
3
   Written by Cygnus Support.
4
5
   This file is part of BFD, the Binary File Descriptor library.
6
7
   This program is free software; you can redistribute it and/or modify
8
   it under the terms of the GNU General Public License as published by
9
   the Free Software Foundation; either version 3 of the License, or
10
   (at your option) any later version.
11
12
   This program is distributed in the hope that it will be useful,
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
   GNU General Public License for more details.
16
17
   You should have received a copy of the GNU General Public License
18
   along with this program; if not, write to the Free Software
19
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20
   MA 02110-1301, USA.  */
21
22
/* This file contains routines used to swap COFF data.  It is a header
23
   file because the details of swapping depend on the details of the
24
   structures used by each COFF implementation.  This is included by
25
   coffcode.h, as well as by the ECOFF backend.
26
27
   Any file which uses this must first include "coff/internal.h" and
28
   "coff/CPU.h".  The functions will then be correct for that CPU.  */
29
30
#ifndef GET_FCN_LNNOPTR
31
#define GET_FCN_LNNOPTR(abfd, ext) \
32
351k
  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
351k
  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
2.13M
  H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
51
#endif
52
#ifndef GET_LNSZ_SIZE
53
#define GET_LNSZ_SIZE(abfd, ext) \
54
1.20M
  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
3.65k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
4.96k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
4.96k
  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
222k
  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
5.40M
#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
29.3k
#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
29.3k
#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
29.3k
#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
29.3k
#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
29.3k
#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
29.3k
#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
18.0M
#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
18.0M
#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
15.3M
#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
18.0M
#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
18.0M
#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
18.0M
#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
15.3M
#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
15.3M
#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
16.2M
#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
19.5k
#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
19.5k
{
217
19.5k
  RELOC *reloc_src = (RELOC *) src;
218
19.5k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
19.5k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
19.5k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
19.5k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
784
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
19.5k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
44
{
217
44
  RELOC *reloc_src = (RELOC *) src;
218
44
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
44
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
44
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
44
  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
44
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
17.7k
{
217
17.7k
  RELOC *reloc_src = (RELOC *) src;
218
17.7k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
17.7k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
17.7k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
17.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
17.7k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
580
{
217
580
  RELOC *reloc_src = (RELOC *) src;
218
580
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
580
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
580
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
580
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
580
#ifdef SWAP_IN_RELOC_OFFSET
225
580
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
580
#endif
227
580
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
919
{
217
919
  RELOC *reloc_src = (RELOC *) src;
218
919
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
919
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
919
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
919
  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
919
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
200
{
217
200
  RELOC *reloc_src = (RELOC *) src;
218
200
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
200
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
200
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
200
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
200
#ifdef SWAP_IN_RELOC_OFFSET
225
200
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
200
#endif
227
200
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_in
coff-z80.c:coff_swap_reloc_in
Line
Count
Source
216
3
{
217
3
  RELOC *reloc_src = (RELOC *) src;
218
3
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
3
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
3
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
3
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
3
#ifdef SWAP_IN_RELOC_OFFSET
225
3
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
3
#endif
227
3
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
1
{
217
1
  RELOC *reloc_src = (RELOC *) src;
218
1
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
1
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
1
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
1
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
1
#ifdef SWAP_IN_RELOC_OFFSET
225
1
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
1
#endif
227
1
}
228
229
static unsigned int
230
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
231
0
{
232
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
0
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
0
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
0
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
0
  return bfd_coff_relsz (abfd);
247
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out
Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out
248
249
#ifdef TICOFF
250
static void
251
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
252
0
{
253
0
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
0
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
0
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
0
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
0
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_in
260
261
static unsigned int
262
coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst)
263
0
{
264
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
265
0
  struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst;
266
267
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
268
0
  H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
269
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
270
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
271
272
0
  return bfd_coff_relsz (abfd);
273
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out
274
#endif
275
276
#endif /* NO_COFF_RELOCS */
277
278
static void
279
coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
280
6.17M
{
281
6.17M
  FILHDR *filehdr_src = (FILHDR *) src;
282
6.17M
  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.17M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
6.17M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
6.17M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
6.17M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
6.17M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
6.17M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
6.17M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
1.54M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
6.17M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
257k
{
281
257k
  FILHDR *filehdr_src = (FILHDR *) src;
282
257k
  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
257k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
257k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
257k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
257k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
257k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
257k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
257k
  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
257k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
514k
{
281
514k
  FILHDR *filehdr_src = (FILHDR *) src;
282
514k
  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
514k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
514k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
514k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
514k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
514k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
514k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
514k
  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
514k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
776k
{
281
776k
  FILHDR *filehdr_src = (FILHDR *) src;
282
776k
  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
776k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
776k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
776k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
776k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
776k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
776k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
776k
  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
776k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
1.00M
{
281
1.00M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.00M
  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.00M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.00M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.00M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.00M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.00M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.00M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.00M
  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.00M
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
347
{
281
347
  FILHDR *filehdr_src = (FILHDR *) src;
282
347
  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
347
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
347
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
347
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
347
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
347
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
347
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
347
  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
347
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
1.54M
{
281
1.54M
  FILHDR *filehdr_src = (FILHDR *) src;
282
1.54M
  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.54M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
1.54M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
1.54M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
1.54M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
1.54M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
1.54M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
1.54M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
1.54M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
1.54M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
1.54M
#endif
298
1.54M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
258k
{
281
258k
  FILHDR *filehdr_src = (FILHDR *) src;
282
258k
  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
258k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
258k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
258k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
258k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
258k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
258k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
258k
  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
258k
}
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
367k
{
328
367k
  SYMENT *ext = (SYMENT *) ext1;
329
367k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
367k
  if (ext->e.e_name[0] == 0)
332
240k
    {
333
240k
      in->_n._n_n._n_zeroes = 0;
334
240k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
240k
    }
336
126k
  else
337
126k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
126k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
126k
#endif
343
126k
    }
344
345
367k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
367k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
367k
  if (sizeof (ext->e_type) == 2)
348
367k
    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
367k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
367k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
115k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
367k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
29.1k
{
328
29.1k
  SYMENT *ext = (SYMENT *) ext1;
329
29.1k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
29.1k
  if (ext->e.e_name[0] == 0)
332
18.1k
    {
333
18.1k
      in->_n._n_n._n_zeroes = 0;
334
18.1k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
18.1k
    }
336
11.0k
  else
337
11.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
11.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
11.0k
#endif
343
11.0k
    }
344
345
29.1k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
29.1k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
29.1k
  if (sizeof (ext->e_type) == 2)
348
29.1k
    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
29.1k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
29.1k
  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
29.1k
}
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
50.9k
{
328
50.9k
  SYMENT *ext = (SYMENT *) ext1;
329
50.9k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
50.9k
  if (ext->e.e_name[0] == 0)
332
31.3k
    {
333
31.3k
      in->_n._n_n._n_zeroes = 0;
334
31.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
31.3k
    }
336
19.5k
  else
337
19.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
19.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
19.5k
#endif
343
19.5k
    }
344
345
50.9k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
50.9k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
50.9k
  if (sizeof (ext->e_type) == 2)
348
50.9k
    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
50.9k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
50.9k
  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
50.9k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
43.5k
{
328
43.5k
  SYMENT *ext = (SYMENT *) ext1;
329
43.5k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
43.5k
  if (ext->e.e_name[0] == 0)
332
29.6k
    {
333
29.6k
      in->_n._n_n._n_zeroes = 0;
334
29.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
29.6k
    }
336
13.8k
  else
337
13.8k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
13.8k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
13.8k
#endif
343
13.8k
    }
344
345
43.5k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
43.5k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
43.5k
  if (sizeof (ext->e_type) == 2)
348
43.5k
    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
43.5k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
43.5k
  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
43.5k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
115k
{
328
115k
  SYMENT *ext = (SYMENT *) ext1;
329
115k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
115k
  if (ext->e.e_name[0] == 0)
332
75.2k
    {
333
75.2k
      in->_n._n_n._n_zeroes = 0;
334
75.2k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
75.2k
    }
336
40.6k
  else
337
40.6k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
40.6k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
40.6k
#endif
343
40.6k
    }
344
345
115k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
115k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
115k
  if (sizeof (ext->e_type) == 2)
348
115k
    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
115k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
115k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
115k
#ifdef COFF_ADJUST_SYM_IN_POST
354
115k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
115k
#endif
356
115k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
31.5k
{
328
31.5k
  SYMENT *ext = (SYMENT *) ext1;
329
31.5k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
31.5k
  if (ext->e.e_name[0] == 0)
332
20.9k
    {
333
20.9k
      in->_n._n_n._n_zeroes = 0;
334
20.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
20.9k
    }
336
10.5k
  else
337
10.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
10.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
10.5k
#endif
343
10.5k
    }
344
345
31.5k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
31.5k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
31.5k
  if (sizeof (ext->e_type) == 2)
348
31.5k
    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
31.5k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
31.5k
  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
31.5k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
96.3k
{
328
96.3k
  SYMENT *ext = (SYMENT *) ext1;
329
96.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
96.3k
  if (ext->e.e_name[0] == 0)
332
64.9k
    {
333
64.9k
      in->_n._n_n._n_zeroes = 0;
334
64.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
64.9k
    }
336
31.4k
  else
337
31.4k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
31.4k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
31.4k
#endif
343
31.4k
    }
344
345
96.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
96.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
96.3k
  if (sizeof (ext->e_type) == 2)
348
96.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
96.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
96.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
96.3k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
0
{
361
0
  struct internal_syment *in = (struct internal_syment *) inp;
362
0
  SYMENT *ext =(SYMENT *) extp;
363
364
#ifdef COFF_ADJUST_SYM_OUT_PRE
365
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
366
#endif
367
368
0
  if (in->_n._n_name[0] == 0)
369
0
    {
370
0
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
0
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
0
    }
373
0
  else
374
0
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
0
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
0
#endif
380
0
    }
381
382
0
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
0
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
0
  if (sizeof (ext->e_type) == 2)
386
0
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
0
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
0
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
0
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
0
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
0
  return SYMESZ;
398
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_sym_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out
Unexecuted instantiation: coff-go32.c:coff_swap_sym_out
Unexecuted instantiation: coff-i386.c:coff_swap_sym_out
Unexecuted instantiation: coff-sh.c:coff_swap_sym_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic30.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_sym_out
Unexecuted instantiation: coff-z80.c:coff_swap_sym_out
Unexecuted instantiation: coff-z8k.c:coff_swap_sym_out
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx,
406
      int numaux,
407
      void * in1)
408
2.49M
{
409
2.49M
  AUXENT *ext = (AUXENT *) ext1;
410
2.49M
  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.49M
  switch (in_class)
417
2.49M
    {
418
52.8k
    case C_FILE:
419
52.8k
      if (ext->x_file.x_fname[0] == 0)
420
22.8k
  {
421
22.8k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
22.8k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
22.8k
  }
424
30.0k
      else
425
30.0k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
30.0k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
30.0k
    else
436
30.0k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
30.0k
#endif
438
30.0k
  }
439
52.8k
      goto end;
440
441
23.0k
    case C_STAT:
442
23.0k
#ifdef C_LEAFSTAT
443
25.8k
    case C_LEAFSTAT:
444
25.8k
#endif
445
29.6k
    case C_HIDDEN:
446
29.6k
      if (type == T_NULL)
447
4.96k
  {
448
4.96k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
4.96k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
4.96k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
4.96k
    in->x_scn.x_checksum = 0;
455
4.96k
    in->x_scn.x_associated = 0;
456
4.96k
    in->x_scn.x_comdat = 0;
457
458
4.96k
    goto end;
459
4.96k
  }
460
24.6k
      break;
461
2.49M
    }
462
463
2.44M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
2.44M
#ifndef NO_TVNDX
465
2.44M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
2.44M
#endif
467
468
2.44M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
2.44M
      || ISTAG (in_class))
470
351k
    {
471
351k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
351k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
351k
    }
474
2.08M
  else
475
2.08M
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
2.08M
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
2.08M
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
2.08M
    }
488
489
2.44M
  if (ISFCN (type))
490
303k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
2.13M
  else
492
2.13M
    {
493
2.13M
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
2.13M
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
2.13M
    }
496
497
2.49M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
2.49M
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
173k
{
409
173k
  AUXENT *ext = (AUXENT *) ext1;
410
173k
  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
173k
  switch (in_class)
417
173k
    {
418
6.64k
    case C_FILE:
419
6.64k
      if (ext->x_file.x_fname[0] == 0)
420
3.15k
  {
421
3.15k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.15k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.15k
  }
424
3.49k
      else
425
3.49k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
3.49k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
3.49k
    else
436
3.49k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
3.49k
#endif
438
3.49k
  }
439
6.64k
      goto end;
440
441
965
    case C_STAT:
442
965
#ifdef C_LEAFSTAT
443
1.25k
    case C_LEAFSTAT:
444
1.25k
#endif
445
1.75k
    case C_HIDDEN:
446
1.75k
      if (type == T_NULL)
447
547
  {
448
547
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
547
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
547
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
547
    in->x_scn.x_checksum = 0;
455
547
    in->x_scn.x_associated = 0;
456
547
    in->x_scn.x_comdat = 0;
457
458
547
    goto end;
459
547
  }
460
1.20k
      break;
461
173k
    }
462
463
166k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
166k
#ifndef NO_TVNDX
465
166k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
166k
#endif
467
468
166k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
166k
      || ISTAG (in_class))
470
29.6k
    {
471
29.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
29.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
29.6k
    }
474
136k
  else
475
136k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
136k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
136k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
136k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
136k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
136k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
136k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
136k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
136k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
136k
    }
488
489
166k
  if (ISFCN (type))
490
25.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
141k
  else
492
141k
    {
493
141k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
141k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
141k
    }
496
497
173k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
173k
}
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
252k
{
409
252k
  AUXENT *ext = (AUXENT *) ext1;
410
252k
  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
252k
  switch (in_class)
417
252k
    {
418
6.59k
    case C_FILE:
419
6.59k
      if (ext->x_file.x_fname[0] == 0)
420
2.90k
  {
421
2.90k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.90k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.90k
  }
424
3.69k
      else
425
3.69k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
3.69k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
3.69k
    else
436
3.69k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
3.69k
#endif
438
3.69k
  }
439
6.59k
      goto end;
440
441
2.88k
    case C_STAT:
442
2.88k
#ifdef C_LEAFSTAT
443
3.27k
    case C_LEAFSTAT:
444
3.27k
#endif
445
3.71k
    case C_HIDDEN:
446
3.71k
      if (type == T_NULL)
447
483
  {
448
483
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
483
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
483
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
483
    in->x_scn.x_checksum = 0;
455
483
    in->x_scn.x_associated = 0;
456
483
    in->x_scn.x_comdat = 0;
457
458
483
    goto end;
459
483
  }
460
3.23k
      break;
461
252k
    }
462
463
245k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
245k
#ifndef NO_TVNDX
465
245k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
245k
#endif
467
468
245k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
245k
      || ISTAG (in_class))
470
34.6k
    {
471
34.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
34.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
34.6k
    }
474
210k
  else
475
210k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
210k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
210k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
210k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
210k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
210k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
210k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
210k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
210k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
210k
    }
488
489
245k
  if (ISFCN (type))
490
30.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
214k
  else
492
214k
    {
493
214k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
214k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
214k
    }
496
497
252k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
252k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
275k
{
409
275k
  AUXENT *ext = (AUXENT *) ext1;
410
275k
  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
275k
  switch (in_class)
417
275k
    {
418
6.81k
    case C_FILE:
419
6.81k
      if (ext->x_file.x_fname[0] == 0)
420
3.25k
  {
421
3.25k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.25k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.25k
  }
424
3.56k
      else
425
3.56k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
3.56k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
3.56k
    else
436
3.56k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
3.56k
#endif
438
3.56k
  }
439
6.81k
      goto end;
440
441
2.69k
    case C_STAT:
442
2.69k
#ifdef C_LEAFSTAT
443
3.20k
    case C_LEAFSTAT:
444
3.20k
#endif
445
3.64k
    case C_HIDDEN:
446
3.64k
      if (type == T_NULL)
447
1.01k
  {
448
1.01k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
1.01k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
1.01k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
1.01k
    in->x_scn.x_checksum = 0;
455
1.01k
    in->x_scn.x_associated = 0;
456
1.01k
    in->x_scn.x_comdat = 0;
457
458
1.01k
    goto end;
459
1.01k
  }
460
2.63k
      break;
461
275k
    }
462
463
267k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
267k
#ifndef NO_TVNDX
465
267k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
267k
#endif
467
468
267k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
267k
      || ISTAG (in_class))
470
37.0k
    {
471
37.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
37.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
37.0k
    }
474
230k
  else
475
230k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
230k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
230k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
230k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
230k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
230k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
230k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
230k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
230k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
230k
    }
488
489
267k
  if (ISFCN (type))
490
31.8k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
235k
  else
492
235k
    {
493
235k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
235k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
235k
    }
496
497
275k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
275k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
1.09M
{
409
1.09M
  AUXENT *ext = (AUXENT *) ext1;
410
1.09M
  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.09M
  switch (in_class)
417
1.09M
    {
418
25.3k
    case C_FILE:
419
25.3k
      if (ext->x_file.x_fname[0] == 0)
420
9.91k
  {
421
9.91k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
9.91k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
9.91k
  }
424
15.4k
      else
425
15.4k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
15.4k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
15.4k
    else
436
15.4k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
15.4k
#endif
438
15.4k
  }
439
25.3k
      goto end;
440
441
10.4k
    case C_STAT:
442
10.4k
#ifdef C_LEAFSTAT
443
11.2k
    case C_LEAFSTAT:
444
11.2k
#endif
445
12.8k
    case C_HIDDEN:
446
12.8k
      if (type == T_NULL)
447
1.31k
  {
448
1.31k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
1.31k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
1.31k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
1.31k
    in->x_scn.x_checksum = 0;
455
1.31k
    in->x_scn.x_associated = 0;
456
1.31k
    in->x_scn.x_comdat = 0;
457
458
1.31k
    goto end;
459
1.31k
  }
460
11.4k
      break;
461
1.09M
    }
462
463
1.07M
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
1.07M
#ifndef NO_TVNDX
465
1.07M
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
1.07M
#endif
467
468
1.07M
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
1.07M
      || ISTAG (in_class))
470
157k
    {
471
157k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
157k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
157k
    }
474
915k
  else
475
915k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
915k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
915k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
915k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
915k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
915k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
915k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
915k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
915k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
915k
    }
488
489
1.07M
  if (ISFCN (type))
490
136k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
936k
  else
492
936k
    {
493
936k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
936k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
936k
    }
496
497
1.09M
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
1.09M
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
213k
{
409
213k
  AUXENT *ext = (AUXENT *) ext1;
410
213k
  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
213k
  switch (in_class)
417
213k
    {
418
3.99k
    case C_FILE:
419
3.99k
      if (ext->x_file.x_fname[0] == 0)
420
1.84k
  {
421
1.84k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.84k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.84k
  }
424
2.14k
      else
425
2.14k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
2.14k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
2.14k
    else
436
2.14k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
2.14k
#endif
438
2.14k
  }
439
3.99k
      goto end;
440
441
2.28k
    case C_STAT:
442
2.28k
#ifdef C_LEAFSTAT
443
2.67k
    case C_LEAFSTAT:
444
2.67k
#endif
445
3.08k
    case C_HIDDEN:
446
3.08k
      if (type == T_NULL)
447
569
  {
448
569
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
569
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
569
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
569
    in->x_scn.x_checksum = 0;
455
569
    in->x_scn.x_associated = 0;
456
569
    in->x_scn.x_comdat = 0;
457
458
569
    goto end;
459
569
  }
460
2.52k
      break;
461
213k
    }
462
463
208k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
208k
#ifndef NO_TVNDX
465
208k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
208k
#endif
467
468
208k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
208k
      || ISTAG (in_class))
470
35.1k
    {
471
35.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
35.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
35.1k
    }
474
173k
  else
475
173k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
173k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
173k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
173k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
173k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
173k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
173k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
173k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
173k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
173k
    }
488
489
208k
  if (ISFCN (type))
490
30.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
178k
  else
492
178k
    {
493
178k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
178k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
178k
    }
496
497
213k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
213k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
484k
{
409
484k
  AUXENT *ext = (AUXENT *) ext1;
410
484k
  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
484k
  switch (in_class)
417
484k
    {
418
3.41k
    case C_FILE:
419
3.41k
      if (ext->x_file.x_fname[0] == 0)
420
1.77k
  {
421
1.77k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.77k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.77k
  }
424
1.64k
      else
425
1.64k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
1.64k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
1.64k
    else
436
1.64k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
1.64k
#endif
438
1.64k
  }
439
3.41k
      goto end;
440
441
3.76k
    case C_STAT:
442
3.76k
#ifdef C_LEAFSTAT
443
4.14k
    case C_LEAFSTAT:
444
4.14k
#endif
445
4.61k
    case C_HIDDEN:
446
4.61k
      if (type == T_NULL)
447
1.03k
  {
448
1.03k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
1.03k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
1.03k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
1.03k
    in->x_scn.x_checksum = 0;
455
1.03k
    in->x_scn.x_associated = 0;
456
1.03k
    in->x_scn.x_comdat = 0;
457
458
1.03k
    goto end;
459
1.03k
  }
460
3.57k
      break;
461
484k
    }
462
463
479k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
479k
#ifndef NO_TVNDX
465
479k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
479k
#endif
467
468
479k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
479k
      || ISTAG (in_class))
470
57.5k
    {
471
57.5k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
57.5k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
57.5k
    }
474
422k
  else
475
422k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
422k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
422k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
422k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
422k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
422k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
422k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
422k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
422k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
422k
    }
488
489
479k
  if (ISFCN (type))
490
50.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
429k
  else
492
429k
    {
493
429k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
429k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
429k
    }
496
497
484k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
484k
}
503
504
static unsigned int
505
coff_swap_aux_out (bfd * abfd,
506
       void * inp,
507
       int type,
508
       int in_class,
509
       int indx ATTRIBUTE_UNUSED,
510
       int numaux ATTRIBUTE_UNUSED,
511
       void * extp)
512
0
{
513
0
  union internal_auxent * in = (union internal_auxent *) inp;
514
0
  AUXENT *ext = (AUXENT *) extp;
515
516
#ifdef COFF_ADJUST_AUX_OUT_PRE
517
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
518
#endif
519
520
0
  memset (ext, 0, AUXESZ);
521
522
0
  switch (in_class)
523
0
    {
524
0
    case C_FILE:
525
0
      if (in->x_file.x_n.x_fname[0] == 0)
526
0
  {
527
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
528
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
529
0
  }
530
0
      else
531
0
  {
532
#if FILNMLEN != E_FILNMLEN
533
#error we need to cope with truncating or extending FILNMLEN
534
#else
535
0
    memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
536
0
#endif
537
0
  }
538
0
      goto end;
539
540
0
    case C_STAT:
541
0
#ifdef C_LEAFSTAT
542
0
    case C_LEAFSTAT:
543
0
#endif
544
0
    case C_HIDDEN:
545
0
      if (type == T_NULL)
546
0
  {
547
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
548
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
549
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
550
0
    goto end;
551
0
  }
552
0
      break;
553
0
    }
554
555
0
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
556
0
#ifndef NO_TVNDX
557
0
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
558
0
#endif
559
560
0
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
561
0
      || ISTAG (in_class))
562
0
    {
563
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
564
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
565
0
    }
566
0
  else
567
0
    {
568
#if DIMNUM != E_DIMNUM
569
#error we need to cope with truncating or extending DIMNUM
570
#endif
571
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
572
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
573
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
574
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
575
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
576
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
577
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
578
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
579
0
    }
580
581
0
  if (ISFCN (type))
582
0
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
583
0
  else
584
0
    {
585
0
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
586
0
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
587
0
    }
588
589
0
 end:
590
#ifdef COFF_ADJUST_AUX_OUT_POST
591
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
592
#endif
593
0
  return AUXESZ;
594
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
Unexecuted instantiation: coff-sh.c:coff_swap_aux_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aux_out
Unexecuted instantiation: coff-z80.c:coff_swap_aux_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aux_out
595
596
#endif /* NO_COFF_SYMBOLS */
597
598
#ifndef NO_COFF_LINENOS
599
600
static void
601
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
602
1.09M
{
603
1.09M
  LINENO *ext = (LINENO *) ext1;
604
1.09M
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
1.09M
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
1.09M
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
1.09M
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
602
49.8k
{
603
49.8k
  LINENO *ext = (LINENO *) ext1;
604
49.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
49.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
49.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
49.8k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_in
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_in
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_in
coff-rs6000.c:coff_swap_lineno_in
Line
Count
Source
602
71.9k
{
603
71.9k
  LINENO *ext = (LINENO *) ext1;
604
71.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
71.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
71.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
71.9k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
602
186k
{
603
186k
  LINENO *ext = (LINENO *) ext1;
604
186k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
186k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
186k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
186k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
602
115k
{
603
115k
  LINENO *ext = (LINENO *) ext1;
604
115k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
115k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
115k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
115k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
602
150k
{
603
150k
  LINENO *ext = (LINENO *) ext1;
604
150k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
150k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
150k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
150k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
602
165k
{
603
165k
  LINENO *ext = (LINENO *) ext1;
604
165k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
165k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
165k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
165k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
602
356k
{
603
356k
  LINENO *ext = (LINENO *) ext1;
604
356k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
356k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
356k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
356k
}
609
610
static unsigned int
611
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
612
0
{
613
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
614
0
  struct external_lineno *ext = (struct external_lineno *) outp;
615
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
616
617
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
618
0
  return LINESZ;
619
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z80.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out
620
621
#endif /* NO_COFF_LINENOS */
622
623
static void
624
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
625
35.3k
{
626
35.3k
  AOUTHDR *aouthdr_ext;
627
35.3k
  struct internal_aouthdr *aouthdr_int;
628
629
35.3k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
35.3k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
35.3k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
35.3k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
35.3k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
35.3k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
35.3k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
35.3k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
35.3k
  aouthdr_int->text_start =
638
35.3k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
35.3k
  aouthdr_int->data_start =
640
35.3k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
5.82k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
2.89k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
8.71k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
8.71k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
8.71k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
8.71k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
8.71k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
8.71k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
8.71k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
8.71k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
8.71k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
8.71k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
5.82k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
5.82k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
2.89k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
2.89k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
1.32k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
1.32k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
1.32k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
1.32k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
1.32k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
1.32k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
1.32k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
132
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
132
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
132
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
132
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
35.3k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
625
132
{
626
132
  AOUTHDR *aouthdr_ext;
627
132
  struct internal_aouthdr *aouthdr_int;
628
629
132
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
132
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
132
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
132
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
132
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
132
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
132
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
132
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
132
  aouthdr_int->text_start =
638
132
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
132
  aouthdr_int->data_start =
640
132
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
132
#ifdef ALPHAECOFF
678
132
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
132
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
132
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
132
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
132
#endif
683
132
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
625
2.37k
{
626
2.37k
  AOUTHDR *aouthdr_ext;
627
2.37k
  struct internal_aouthdr *aouthdr_int;
628
629
2.37k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2.37k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2.37k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2.37k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2.37k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2.37k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2.37k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2.37k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2.37k
  aouthdr_int->text_start =
638
2.37k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2.37k
  aouthdr_int->data_start =
640
2.37k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2.37k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
5.82k
{
626
5.82k
  AOUTHDR *aouthdr_ext;
627
5.82k
  struct internal_aouthdr *aouthdr_int;
628
629
5.82k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
5.82k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
5.82k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
5.82k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
5.82k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
5.82k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
5.82k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
5.82k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
5.82k
  aouthdr_int->text_start =
638
5.82k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
5.82k
  aouthdr_int->data_start =
640
5.82k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
5.82k
#ifdef RS6000COFF_C
643
5.82k
#ifdef XCOFF64
644
5.82k
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
5.82k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
5.82k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
5.82k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
5.82k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
5.82k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
5.82k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
5.82k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
5.82k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
5.82k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
5.82k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
5.82k
#ifdef XCOFF64
659
5.82k
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
5.82k
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
5.82k
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
5.82k
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
625
3.56k
{
626
3.56k
  AOUTHDR *aouthdr_ext;
627
3.56k
  struct internal_aouthdr *aouthdr_int;
628
629
3.56k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
3.56k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
3.56k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
3.56k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
3.56k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
3.56k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
3.56k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
3.56k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
3.56k
  aouthdr_int->text_start =
638
3.56k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
3.56k
  aouthdr_int->data_start =
640
3.56k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
3.56k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
625
3.55k
{
626
3.55k
  AOUTHDR *aouthdr_ext;
627
3.55k
  struct internal_aouthdr *aouthdr_int;
628
629
3.55k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
3.55k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
3.55k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
3.55k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
3.55k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
3.55k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
3.55k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
3.55k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
3.55k
  aouthdr_int->text_start =
638
3.55k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
3.55k
  aouthdr_int->data_start =
640
3.55k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
3.55k
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
625
3.55k
{
626
3.55k
  AOUTHDR *aouthdr_ext;
627
3.55k
  struct internal_aouthdr *aouthdr_int;
628
629
3.55k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
3.55k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
3.55k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
3.55k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
3.55k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
3.55k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
3.55k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
3.55k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
3.55k
  aouthdr_int->text_start =
638
3.55k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
3.55k
  aouthdr_int->data_start =
640
3.55k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
3.55k
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
625
1.32k
{
626
1.32k
  AOUTHDR *aouthdr_ext;
627
1.32k
  struct internal_aouthdr *aouthdr_int;
628
629
1.32k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1.32k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1.32k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1.32k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1.32k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1.32k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1.32k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1.32k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1.32k
  aouthdr_int->text_start =
638
1.32k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1.32k
  aouthdr_int->data_start =
640
1.32k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
1.32k
#ifdef MIPSECOFF
668
1.32k
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
1.32k
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
1.32k
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
1.32k
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
1.32k
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
1.32k
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
1.32k
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
1.32k
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
1.32k
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
2.89k
{
626
2.89k
  AOUTHDR *aouthdr_ext;
627
2.89k
  struct internal_aouthdr *aouthdr_int;
628
629
2.89k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2.89k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2.89k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2.89k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2.89k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2.89k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2.89k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2.89k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2.89k
  aouthdr_int->text_start =
638
2.89k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2.89k
  aouthdr_int->data_start =
640
2.89k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
2.89k
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
2.89k
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
2.89k
#endif
648
2.89k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
2.89k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
2.89k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
2.89k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
2.89k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
2.89k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
2.89k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
2.89k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
2.89k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
2.89k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
2.89k
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
2.89k
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
2.89k
#endif
665
2.89k
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2.89k
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
625
889
{
626
889
  AOUTHDR *aouthdr_ext;
627
889
  struct internal_aouthdr *aouthdr_int;
628
629
889
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
889
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
889
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
889
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
889
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
889
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
889
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
889
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
889
  aouthdr_int->text_start =
638
889
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
889
  aouthdr_int->data_start =
640
889
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
889
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
625
14
{
626
14
  AOUTHDR *aouthdr_ext;
627
14
  struct internal_aouthdr *aouthdr_int;
628
629
14
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
14
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
14
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
14
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
14
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
14
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
14
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
14
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
14
  aouthdr_int->text_start =
638
14
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
14
  aouthdr_int->data_start =
640
14
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
14
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
625
368
{
626
368
  AOUTHDR *aouthdr_ext;
627
368
  struct internal_aouthdr *aouthdr_int;
628
629
368
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
368
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
368
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
368
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
368
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
368
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
368
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
368
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
368
  aouthdr_int->text_start =
638
368
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
368
  aouthdr_int->data_start =
640
368
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
368
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
625
7.78k
{
626
7.78k
  AOUTHDR *aouthdr_ext;
627
7.78k
  struct internal_aouthdr *aouthdr_int;
628
629
7.78k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
7.78k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
7.78k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
7.78k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
7.78k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
7.78k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
7.78k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
7.78k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
7.78k
  aouthdr_int->text_start =
638
7.78k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
7.78k
  aouthdr_int->data_start =
640
7.78k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
7.78k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
625
737
{
626
737
  AOUTHDR *aouthdr_ext;
627
737
  struct internal_aouthdr *aouthdr_int;
628
629
737
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
737
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
737
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
737
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
737
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
737
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
737
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
737
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
737
  aouthdr_int->text_start =
638
737
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
737
  aouthdr_int->data_start =
640
737
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
737
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
625
2.30k
{
626
2.30k
  AOUTHDR *aouthdr_ext;
627
2.30k
  struct internal_aouthdr *aouthdr_int;
628
629
2.30k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2.30k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2.30k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2.30k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2.30k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2.30k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2.30k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2.30k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2.30k
  aouthdr_int->text_start =
638
2.30k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2.30k
  aouthdr_int->data_start =
640
2.30k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2.30k
}
684
685
static unsigned int
686
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
687
0
{
688
0
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
0
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
0
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
0
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
0
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
0
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
0
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
0
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
0
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
0
        aouthdr_out->text_start);
699
0
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
0
        aouthdr_out->data_start);
701
702
#ifdef RS6000COFF_C
703
#ifdef XCOFF64
704
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
705
#else
706
0
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
707
#endif
708
0
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
709
0
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
710
0
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
711
0
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
712
0
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
713
0
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
714
0
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
715
0
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
716
0
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
717
0
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
718
#ifdef XCOFF64
719
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
720
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
721
#else
722
0
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
723
0
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
724
#endif
725
  /* TODO: set o_*psize dynamically */
726
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
727
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
728
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
729
0
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
730
0
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
731
0
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
732
0
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
733
#ifdef XCOFF64
734
0
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
735
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
736
#endif
737
#endif
738
739
#ifdef MIPSECOFF
740
0
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
0
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
#endif
748
749
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
0
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
0
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
0
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
0
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
0
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
0
  return AOUTSZ;
760
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
761
762
ATTRIBUTE_UNUSED
763
static void
764
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
765
18.5M
{
766
18.5M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
18.5M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
18.5M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
18.5M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
18.5M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
18.5M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
18.5M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
18.5M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
18.5M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
18.5M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
18.5M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
18.5M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
2.71M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
18.5M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
765
49.3k
{
766
49.3k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
49.3k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
49.3k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
49.3k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
49.3k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
49.3k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
49.3k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
49.3k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
49.3k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
49.3k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
49.3k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
49.3k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
49.3k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
765
3.19M
{
766
3.19M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
3.19M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
3.19M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
3.19M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
3.19M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
3.19M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
3.19M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
3.19M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
3.19M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
3.19M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
3.19M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
3.19M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
3.19M
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
871k
{
766
871k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
871k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
871k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
871k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
871k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
871k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
871k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
871k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
871k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
871k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
871k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
871k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
871k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
765
400k
{
766
400k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
400k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
400k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
400k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
400k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
400k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
400k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
400k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
400k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
400k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
400k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
400k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
400k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
765
386k
{
766
386k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
386k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
386k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
386k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
386k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
386k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
386k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
386k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
386k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
386k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
386k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
386k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
386k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
765
2.70M
{
766
2.70M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.70M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.70M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.70M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.70M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.70M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.70M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.70M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.70M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.70M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.70M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.70M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
2.70M
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
3.72M
{
766
3.72M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
3.72M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
3.72M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
3.72M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
3.72M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
3.72M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
3.72M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
3.72M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
3.72M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
3.72M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
3.72M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
3.72M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
3.72M
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
765
2.81M
{
766
2.81M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.81M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.81M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.81M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.81M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.81M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.81M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.81M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.81M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.81M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.81M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.81M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
2.81M
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
765
1.22M
{
766
1.22M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
1.22M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
1.22M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
1.22M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
1.22M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
1.22M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
1.22M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
1.22M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
1.22M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
1.22M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
1.22M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
1.22M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
1.22M
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
765
2.71M
{
766
2.71M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.71M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.71M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.71M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.71M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.71M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.71M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.71M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.71M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.71M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.71M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.71M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
2.71M
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
2.71M
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
2.71M
#endif
787
2.71M
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
765
142k
{
766
142k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
142k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
142k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
142k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
142k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
142k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
142k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
142k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
142k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
142k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
142k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
142k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
142k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
765
365k
{
766
365k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
365k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
365k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
365k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
365k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
365k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
365k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
365k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
365k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
365k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
365k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
365k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
365k
}
788
789
ATTRIBUTE_UNUSED
790
static unsigned int
791
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
792
0
{
793
0
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
0
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
0
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
0
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
0
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
0
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
0
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
0
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
0
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
0
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
0
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
0
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
0
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
0
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
811
0
  else
812
0
    {
813
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
814
815
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
816
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
817
0
      _bfd_error_handler
818
  /* xgettext:c-format */
819
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
820
0
   abfd, buf, scnhdr_int->s_nlnno);
821
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
822
0
    }
823
824
0
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
0
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
826
0
  else
827
0
    {
828
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
829
830
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
831
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
832
      /* xgettext:c-format */
833
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
834
0
        abfd, buf, scnhdr_int->s_nreloc);
835
0
      bfd_set_error (bfd_error_file_truncated);
836
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
837
0
      ret = 0;
838
0
    }
839
840
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
841
0
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
0
  return ret;
844
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