Coverage Report

Created: 2026-07-12 09:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/binutils-gdb/bfd/coffswap.h
Line
Count
Source
1
/* Generic COFF swapping routines, for BFD.
2
   Copyright (C) 1990-2026 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
195k
  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
195k
  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
500
  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
500
  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
596k
  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
541k
  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
1.32k
  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
1.14k
  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
16.1k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
17.8k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
17.8k
  H_GET_16 (abfd, ext->x_scn.x_nlinno)
75
#endif
76
#ifndef PUT_SCN_SCNLEN
77
#define PUT_SCN_SCNLEN(abfd, in, ext) \
78
79
  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
86
  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
86
  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
128k
  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
3.31M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
621
#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
10.7k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
308
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
10.7k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
308
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
10.7k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
308
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
10.7k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
308
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
10.7k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
308
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
10.7k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
308
#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
1.46M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
1.00k
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.46M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
1.00k
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.37M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
881
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.46M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
1.00k
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.46M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
1.00k
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.46M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
1.00k
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.39M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
1.03k
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
912
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.39M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
1.03k
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
912
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.44M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
976
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
15.2k
#define GET_RELOC_VADDR H_GET_32
207
#endif
208
#ifndef PUT_RELOC_VADDR
209
6
#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
15.0k
{
217
15.0k
  RELOC *reloc_src = (RELOC *) src;
218
15.0k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
15.0k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
15.0k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
15.0k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
2.68k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
15.0k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
973
{
217
973
  RELOC *reloc_src = (RELOC *) src;
218
973
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
973
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
973
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
973
  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
973
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
4.95k
{
217
4.95k
  RELOC *reloc_src = (RELOC *) src;
218
4.95k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
4.95k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
4.95k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
4.95k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
4.95k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
609
{
217
609
  RELOC *reloc_src = (RELOC *) src;
218
609
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
609
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
609
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
609
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
609
#ifdef SWAP_IN_RELOC_OFFSET
225
609
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
609
#endif
227
609
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
6.42k
{
217
6.42k
  RELOC *reloc_src = (RELOC *) src;
218
6.42k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
6.42k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
6.42k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
6.42k
  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
6.42k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
981
{
217
981
  RELOC *reloc_src = (RELOC *) src;
218
981
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
981
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
981
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
981
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
981
#ifdef SWAP_IN_RELOC_OFFSET
225
981
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
981
#endif
227
981
}
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
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
919
#ifdef SWAP_IN_RELOC_OFFSET
225
919
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
919
#endif
227
919
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
174
{
217
174
  RELOC *reloc_src = (RELOC *) src;
218
174
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
174
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
174
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
174
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
174
#ifdef SWAP_IN_RELOC_OFFSET
225
174
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
174
#endif
227
174
}
228
229
static unsigned int
230
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
231
6
{
232
6
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
6
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
6
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
6
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
6
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
2
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
2
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
6
  return bfd_coff_relsz (abfd);
247
6
}
coff-x86_64.c:coff_swap_reloc_out
Line
Count
Source
231
4
{
232
4
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
4
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
4
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
4
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
4
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
4
  return bfd_coff_relsz (abfd);
247
4
}
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
coff-z8k.c:coff_swap_reloc_out
Line
Count
Source
231
2
{
232
2
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
2
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
2
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
2
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
2
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
2
#ifdef SWAP_OUT_RELOC_OFFSET
240
2
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
2
#endif
242
2
#ifdef SWAP_OUT_RELOC_EXTRA
243
2
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
2
#endif
245
246
2
  return bfd_coff_relsz (abfd);
247
2
}
248
249
#ifdef TICOFF
250
static void
251
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
252
250
{
253
250
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
250
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
250
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
250
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
250
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
250
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
250
{
253
250
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
250
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
250
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
250
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
250
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
250
}
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
3.72M
{
281
3.72M
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.72M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
3.72M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.72M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.72M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.72M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.72M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.72M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.72M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
993k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
3.72M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
166k
{
281
166k
  FILHDR *filehdr_src = (FILHDR *) src;
282
166k
  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
166k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
166k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
166k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
166k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
166k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
166k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
166k
  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
166k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
190k
{
281
190k
  FILHDR *filehdr_src = (FILHDR *) src;
282
190k
  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
190k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
190k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
190k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
190k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
190k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
190k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
190k
  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
190k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
250k
{
281
250k
  FILHDR *filehdr_src = (FILHDR *) src;
282
250k
  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
250k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
250k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
250k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
250k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
250k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
250k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
250k
  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
250k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
189k
{
281
189k
  FILHDR *filehdr_src = (FILHDR *) src;
282
189k
  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
189k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
189k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
189k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
189k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
189k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
189k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
189k
  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
189k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
189k
{
281
189k
  FILHDR *filehdr_src = (FILHDR *) src;
282
189k
  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
189k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
189k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
189k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
189k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
189k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
189k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
189k
  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
189k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
189k
{
281
189k
  FILHDR *filehdr_src = (FILHDR *) src;
282
189k
  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
189k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
189k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
189k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
189k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
189k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
189k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
189k
  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
189k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
509k
{
281
509k
  FILHDR *filehdr_src = (FILHDR *) src;
282
509k
  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
509k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
509k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
509k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
509k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
509k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
509k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
509k
  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
509k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
127k
{
281
127k
  FILHDR *filehdr_src = (FILHDR *) src;
282
127k
  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
127k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
127k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
127k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
127k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
127k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
127k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
127k
  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
127k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
413k
{
281
413k
  FILHDR *filehdr_src = (FILHDR *) src;
282
413k
  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
413k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
413k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
413k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
413k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
413k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
413k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
413k
  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
413k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
3.55k
{
281
3.55k
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.55k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
3.55k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.55k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.55k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.55k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.55k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.55k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.55k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
3.55k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
169k
{
281
169k
  FILHDR *filehdr_src = (FILHDR *) src;
282
169k
  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
169k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
169k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
169k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
169k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
169k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
169k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
169k
  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
169k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
993k
{
281
993k
  FILHDR *filehdr_src = (FILHDR *) src;
282
993k
  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
993k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
993k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
993k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
993k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
993k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
993k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
993k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
993k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
993k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
993k
#endif
298
993k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
169k
{
281
169k
  FILHDR *filehdr_src = (FILHDR *) src;
282
169k
  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
169k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
169k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
169k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
169k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
169k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
169k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
169k
  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
169k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
166k
{
281
166k
  FILHDR *filehdr_src = (FILHDR *) src;
282
166k
  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
166k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
166k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
166k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
166k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
166k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
166k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
166k
  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
166k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
734
{
303
734
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
734
  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
734
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
734
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
734
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
734
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
734
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
734
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
734
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
68
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
734
  return bfd_coff_filhsz (abfd);
321
734
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
60
{
303
60
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
60
  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
60
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
60
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
60
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
60
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
60
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
60
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
60
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
60
  return bfd_coff_filhsz (abfd);
321
60
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
123
{
303
123
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
123
  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
123
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
123
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
123
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
123
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
123
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
123
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
123
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
123
  return bfd_coff_filhsz (abfd);
321
123
}
coff64-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
302
53
{
303
53
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
53
  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
53
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
53
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
53
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
53
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
53
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
53
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
53
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
53
  return bfd_coff_filhsz (abfd);
321
53
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_filehdr_out
coff-mips.c:mips_ecoff_swap_filehdr_out
Line
Count
Source
302
73
{
303
73
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
73
  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
73
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
73
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
73
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
73
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
73
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
73
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
73
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
73
  return bfd_coff_filhsz (abfd);
321
73
}
coff-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
302
92
{
303
92
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
92
  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
92
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
92
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
92
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
92
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
92
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
92
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
92
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
92
  return bfd_coff_filhsz (abfd);
321
92
}
coff-sh.c:coff_swap_filehdr_out
Line
Count
Source
302
62
{
303
62
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
62
  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
62
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
62
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
62
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
62
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
62
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
62
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
62
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
62
  return bfd_coff_filhsz (abfd);
321
62
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.c:coff_swap_filehdr_out
Line
Count
Source
302
85
{
303
85
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
85
  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
85
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
85
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
85
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
85
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
85
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
85
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
85
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
85
  return bfd_coff_filhsz (abfd);
321
85
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
302
68
{
303
68
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
68
  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
68
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
68
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
68
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
68
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
68
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
68
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
68
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
68
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
68
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
68
#endif
320
68
  return bfd_coff_filhsz (abfd);
321
68
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
302
59
{
303
59
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
59
  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
59
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
59
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
59
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
59
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
59
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
59
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
59
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
59
  return bfd_coff_filhsz (abfd);
321
59
}
coff-z8k.c:coff_swap_filehdr_out
Line
Count
Source
302
59
{
303
59
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
59
  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
59
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
59
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
59
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
59
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
59
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
59
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
59
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
59
  return bfd_coff_filhsz (abfd);
321
59
}
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
172k
{
328
172k
  SYMENT *ext = (SYMENT *) ext1;
329
172k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
172k
  if (ext->e.e_name[0] == 0)
332
105k
    {
333
105k
      in->_n._n_n._n_zeroes = 0;
334
105k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
105k
    }
336
67.4k
  else
337
67.4k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
67.4k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
67.4k
#endif
343
67.4k
    }
344
345
172k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
172k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
172k
  if (sizeof (ext->e_type) == 2)
348
172k
    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
172k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
172k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
18.6k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
172k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
36.0k
{
328
36.0k
  SYMENT *ext = (SYMENT *) ext1;
329
36.0k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
36.0k
  if (ext->e.e_name[0] == 0)
332
22.8k
    {
333
22.8k
      in->_n._n_n._n_zeroes = 0;
334
22.8k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
22.8k
    }
336
13.2k
  else
337
13.2k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
13.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
13.2k
#endif
343
13.2k
    }
344
345
36.0k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
36.0k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
36.0k
  if (sizeof (ext->e_type) == 2)
348
36.0k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
36.0k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
36.0k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
36.0k
}
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
29.8k
{
328
29.8k
  SYMENT *ext = (SYMENT *) ext1;
329
29.8k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
29.8k
  if (ext->e.e_name[0] == 0)
332
17.9k
    {
333
17.9k
      in->_n._n_n._n_zeroes = 0;
334
17.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
17.9k
    }
336
11.9k
  else
337
11.9k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
11.9k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
11.9k
#endif
343
11.9k
    }
344
345
29.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
29.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
29.8k
  if (sizeof (ext->e_type) == 2)
348
29.8k
    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.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
29.8k
  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.8k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
37.2k
{
328
37.2k
  SYMENT *ext = (SYMENT *) ext1;
329
37.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
37.2k
  if (ext->e.e_name[0] == 0)
332
23.2k
    {
333
23.2k
      in->_n._n_n._n_zeroes = 0;
334
23.2k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
23.2k
    }
336
14.0k
  else
337
14.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
14.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
14.0k
#endif
343
14.0k
    }
344
345
37.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
37.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
37.2k
  if (sizeof (ext->e_type) == 2)
348
37.2k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
37.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
37.2k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
37.2k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
18.6k
{
328
18.6k
  SYMENT *ext = (SYMENT *) ext1;
329
18.6k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
18.6k
  if (ext->e.e_name[0] == 0)
332
11.2k
    {
333
11.2k
      in->_n._n_n._n_zeroes = 0;
334
11.2k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
11.2k
    }
336
7.38k
  else
337
7.38k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
7.38k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
7.38k
#endif
343
7.38k
    }
344
345
18.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
18.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
18.6k
  if (sizeof (ext->e_type) == 2)
348
18.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
18.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
18.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
18.6k
#ifdef COFF_ADJUST_SYM_IN_POST
354
18.6k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
18.6k
#endif
356
18.6k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
34.5k
{
328
34.5k
  SYMENT *ext = (SYMENT *) ext1;
329
34.5k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
34.5k
  if (ext->e.e_name[0] == 0)
332
20.3k
    {
333
20.3k
      in->_n._n_n._n_zeroes = 0;
334
20.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
20.3k
    }
336
14.2k
  else
337
14.2k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
14.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
14.2k
#endif
343
14.2k
    }
344
345
34.5k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
34.5k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
34.5k
  if (sizeof (ext->e_type) == 2)
348
34.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
34.5k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
34.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
34.5k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
16.2k
{
328
16.2k
  SYMENT *ext = (SYMENT *) ext1;
329
16.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
16.2k
  if (ext->e.e_name[0] == 0)
332
9.66k
    {
333
9.66k
      in->_n._n_n._n_zeroes = 0;
334
9.66k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
9.66k
    }
336
6.57k
  else
337
6.57k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
6.57k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
6.57k
#endif
343
6.57k
    }
344
345
16.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
16.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
16.2k
  if (sizeof (ext->e_type) == 2)
348
16.2k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
16.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
16.2k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
16.2k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
1.19k
{
361
1.19k
  struct internal_syment *in = (struct internal_syment *) inp;
362
1.19k
  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
1.19k
  if (in->_n._n_name[0] == 0)
369
878
    {
370
878
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
878
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
878
    }
373
320
  else
374
320
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
320
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
320
#endif
380
320
    }
381
382
1.19k
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
1.19k
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
1.19k
  if (sizeof (ext->e_type) == 2)
386
1.19k
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
1.19k
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
1.19k
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
1.19k
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
339
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
1.19k
  return SYMESZ;
398
1.19k
}
coff-x86_64.c:coff_swap_sym_out
Line
Count
Source
360
142
{
361
142
  struct internal_syment *in = (struct internal_syment *) inp;
362
142
  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
142
  if (in->_n._n_name[0] == 0)
369
45
    {
370
45
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
45
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
45
    }
373
97
  else
374
97
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
97
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
97
#endif
380
97
    }
381
382
142
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
142
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
142
  if (sizeof (ext->e_type) == 2)
386
142
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
142
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
142
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
142
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
142
  return SYMESZ;
398
142
}
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
coff-sh.c:coff_swap_sym_out
Line
Count
Source
360
108
{
361
108
  struct internal_syment *in = (struct internal_syment *) inp;
362
108
  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
108
  if (in->_n._n_name[0] == 0)
369
29
    {
370
29
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
29
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
29
    }
373
79
  else
374
79
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
79
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
79
#endif
380
79
    }
381
382
108
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
108
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
108
  if (sizeof (ext->e_type) == 2)
386
108
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
108
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
108
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
108
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
108
  return SYMESZ;
398
108
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
360
48
{
361
48
  struct internal_syment *in = (struct internal_syment *) inp;
362
48
  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
48
  if (in->_n._n_name[0] == 0)
369
26
    {
370
26
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
26
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
26
    }
373
22
  else
374
22
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
22
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
22
#endif
380
22
    }
381
382
48
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
48
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
48
  if (sizeof (ext->e_type) == 2)
386
48
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
48
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
48
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
48
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
48
  return SYMESZ;
398
48
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
360
339
{
361
339
  struct internal_syment *in = (struct internal_syment *) inp;
362
339
  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
339
  if (in->_n._n_name[0] == 0)
369
320
    {
370
320
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
320
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
320
    }
373
19
  else
374
19
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
19
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
19
#endif
380
19
    }
381
382
339
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
339
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
339
  if (sizeof (ext->e_type) == 2)
386
339
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
339
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
339
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
339
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
339
#ifdef COFF_ADJUST_SYM_OUT_POST
394
339
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
339
#endif
396
397
339
  return SYMESZ;
398
339
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
360
217
{
361
217
  struct internal_syment *in = (struct internal_syment *) inp;
362
217
  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
217
  if (in->_n._n_name[0] == 0)
369
135
    {
370
135
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
135
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
135
    }
373
82
  else
374
82
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
82
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
82
#endif
380
82
    }
381
382
217
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
217
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
217
  if (sizeof (ext->e_type) == 2)
386
217
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
217
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
217
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
217
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
217
  return SYMESZ;
398
217
}
coff-z8k.c:coff_swap_sym_out
Line
Count
Source
360
344
{
361
344
  struct internal_syment *in = (struct internal_syment *) inp;
362
344
  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
344
  if (in->_n._n_name[0] == 0)
369
323
    {
370
323
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
323
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
323
    }
373
21
  else
374
21
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
21
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
21
#endif
380
21
    }
381
382
344
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
344
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
344
  if (sizeof (ext->e_type) == 2)
386
344
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
344
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
344
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
344
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
344
  return SYMESZ;
398
344
}
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx ATTRIBUTE_UNUSED,
406
      int numaux ATTRIBUTE_UNUSED,
407
      void * in1)
408
793k
{
409
793k
  AUXENT *ext = (AUXENT *) ext1;
410
793k
  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
793k
  switch (in_class)
417
793k
    {
418
46.1k
    case C_FILE:
419
46.1k
      if (ext->x_file.x_fname[0] == 0)
420
20.6k
  {
421
20.6k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
20.6k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
20.6k
  }
424
25.5k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
25.5k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
46.1k
      goto end;
430
431
53.5k
    case C_STAT:
432
53.5k
#ifdef C_LEAFSTAT
433
68.2k
    case C_LEAFSTAT:
434
68.2k
#endif
435
80.3k
    case C_HIDDEN:
436
80.3k
      if (type == T_NULL)
437
17.8k
  {
438
17.8k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
17.8k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
17.8k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
17.8k
    in->x_scn.x_checksum = 0;
445
17.8k
    in->x_scn.x_associated = 0;
446
17.8k
    in->x_scn.x_comdat = 0;
447
448
17.8k
    goto end;
449
17.8k
  }
450
62.5k
      break;
451
793k
    }
452
453
729k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
729k
#ifndef NO_TVNDX
455
729k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
729k
#endif
457
458
729k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
577k
      || ISTAG (in_class))
460
195k
    {
461
195k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
195k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
195k
    }
464
533k
  else
465
533k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
533k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
533k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
533k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
533k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
533k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
533k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
533k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
533k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
533k
    }
478
479
729k
  if (ISFCN (type))
480
133k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
596k
  else
482
596k
    {
483
596k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
596k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
596k
    }
486
487
793k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
793k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
110k
{
409
110k
  AUXENT *ext = (AUXENT *) ext1;
410
110k
  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
110k
  switch (in_class)
417
110k
    {
418
6.78k
    case C_FILE:
419
6.78k
      if (ext->x_file.x_fname[0] == 0)
420
3.45k
  {
421
3.45k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.45k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.45k
  }
424
3.33k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.33k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
6.78k
      goto end;
430
431
3.01k
    case C_STAT:
432
3.01k
#ifdef C_LEAFSTAT
433
4.52k
    case C_LEAFSTAT:
434
4.52k
#endif
435
5.99k
    case C_HIDDEN:
436
5.99k
      if (type == T_NULL)
437
2.27k
  {
438
2.27k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
2.27k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
2.27k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
2.27k
    in->x_scn.x_checksum = 0;
445
2.27k
    in->x_scn.x_associated = 0;
446
2.27k
    in->x_scn.x_comdat = 0;
447
448
2.27k
    goto end;
449
2.27k
  }
450
3.72k
      break;
451
110k
    }
452
453
101k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
101k
#ifndef NO_TVNDX
455
101k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
101k
#endif
457
458
101k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
84.3k
      || ISTAG (in_class))
460
23.2k
    {
461
23.2k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
23.2k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
23.2k
    }
464
77.9k
  else
465
77.9k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
77.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
77.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
77.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
77.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
77.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
77.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
77.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
77.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
77.9k
    }
478
479
101k
  if (ISFCN (type))
480
15.6k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
85.6k
  else
482
85.6k
    {
483
85.6k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
85.6k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
85.6k
    }
486
487
110k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
110k
}
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
112k
{
409
112k
  AUXENT *ext = (AUXENT *) ext1;
410
112k
  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
112k
  switch (in_class)
417
112k
    {
418
18.0k
    case C_FILE:
419
18.0k
      if (ext->x_file.x_fname[0] == 0)
420
6.34k
  {
421
6.34k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
6.34k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
6.34k
  }
424
11.7k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
11.7k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
18.0k
      goto end;
430
431
2.48k
    case C_STAT:
432
2.48k
#ifdef C_LEAFSTAT
433
3.75k
    case C_LEAFSTAT:
434
3.75k
#endif
435
6.37k
    case C_HIDDEN:
436
6.37k
      if (type == T_NULL)
437
1.21k
  {
438
1.21k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.21k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.21k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
1.21k
    in->x_scn.x_checksum = 0;
445
1.21k
    in->x_scn.x_associated = 0;
446
1.21k
    in->x_scn.x_comdat = 0;
447
448
1.21k
    goto end;
449
1.21k
  }
450
5.16k
      break;
451
112k
    }
452
453
93.3k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
93.3k
#ifndef NO_TVNDX
455
93.3k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
93.3k
#endif
457
458
93.3k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
69.7k
      || ISTAG (in_class))
460
30.8k
    {
461
30.8k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
30.8k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
30.8k
    }
464
62.4k
  else
465
62.4k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
62.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
62.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
62.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
62.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
62.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
62.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
62.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
62.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
62.4k
    }
478
479
93.3k
  if (ISFCN (type))
480
21.8k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
71.4k
  else
482
71.4k
    {
483
71.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
71.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
71.4k
    }
486
487
112k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
112k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
144k
{
409
144k
  AUXENT *ext = (AUXENT *) ext1;
410
144k
  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
144k
  switch (in_class)
417
144k
    {
418
3.59k
    case C_FILE:
419
3.59k
      if (ext->x_file.x_fname[0] == 0)
420
1.64k
  {
421
1.64k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.64k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.64k
  }
424
1.95k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
1.95k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
3.59k
      goto end;
430
431
11.8k
    case C_STAT:
432
11.8k
#ifdef C_LEAFSTAT
433
18.6k
    case C_LEAFSTAT:
434
18.6k
#endif
435
20.0k
    case C_HIDDEN:
436
20.0k
      if (type == T_NULL)
437
10.0k
  {
438
10.0k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
10.0k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
10.0k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
10.0k
    in->x_scn.x_checksum = 0;
445
10.0k
    in->x_scn.x_associated = 0;
446
10.0k
    in->x_scn.x_comdat = 0;
447
448
10.0k
    goto end;
449
10.0k
  }
450
10.0k
      break;
451
144k
    }
452
453
131k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
131k
#ifndef NO_TVNDX
455
131k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
131k
#endif
457
458
131k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
112k
      || ISTAG (in_class))
460
26.1k
    {
461
26.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
26.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
26.1k
    }
464
104k
  else
465
104k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
104k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
104k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
104k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
104k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
104k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
104k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
104k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
104k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
104k
    }
478
479
131k
  if (ISFCN (type))
480
14.7k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
116k
  else
482
116k
    {
483
116k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
116k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
116k
    }
486
487
144k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
144k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
72.0k
{
409
72.0k
  AUXENT *ext = (AUXENT *) ext1;
410
72.0k
  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
72.0k
  switch (in_class)
417
72.0k
    {
418
2.49k
    case C_FILE:
419
2.49k
      if (ext->x_file.x_fname[0] == 0)
420
883
  {
421
883
    in->x_file.x_n.x_n.x_zeroes = 0;
422
883
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
883
  }
424
1.61k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
1.61k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
2.49k
      goto end;
430
431
2.97k
    case C_STAT:
432
2.97k
#ifdef C_LEAFSTAT
433
3.65k
    case C_LEAFSTAT:
434
3.65k
#endif
435
4.62k
    case C_HIDDEN:
436
4.62k
      if (type == T_NULL)
437
1.65k
  {
438
1.65k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.65k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.65k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
1.65k
    in->x_scn.x_checksum = 0;
445
1.65k
    in->x_scn.x_associated = 0;
446
1.65k
    in->x_scn.x_comdat = 0;
447
448
1.65k
    goto end;
449
1.65k
  }
450
2.96k
      break;
451
72.0k
    }
452
453
67.9k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
67.9k
#ifndef NO_TVNDX
455
67.9k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
67.9k
#endif
457
458
67.9k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
53.4k
      || ISTAG (in_class))
460
19.6k
    {
461
19.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
19.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
19.6k
    }
464
48.2k
  else
465
48.2k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
48.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
48.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
48.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
48.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
48.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
48.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
48.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
48.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
48.2k
    }
478
479
67.9k
  if (ISFCN (type))
480
13.6k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
54.3k
  else
482
54.3k
    {
483
54.3k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
54.3k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
54.3k
    }
486
487
72.0k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
72.0k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
258k
{
409
258k
  AUXENT *ext = (AUXENT *) ext1;
410
258k
  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
258k
  switch (in_class)
417
258k
    {
418
6.94k
    case C_FILE:
419
6.94k
      if (ext->x_file.x_fname[0] == 0)
420
4.12k
  {
421
4.12k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
4.12k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
4.12k
  }
424
2.81k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.81k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
6.94k
      goto end;
430
431
30.5k
    case C_STAT:
432
30.5k
#ifdef C_LEAFSTAT
433
34.0k
    case C_LEAFSTAT:
434
34.0k
#endif
435
38.2k
    case C_HIDDEN:
436
38.2k
      if (type == T_NULL)
437
1.55k
  {
438
1.55k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.55k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.55k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
1.55k
    in->x_scn.x_checksum = 0;
445
1.55k
    in->x_scn.x_associated = 0;
446
1.55k
    in->x_scn.x_comdat = 0;
447
448
1.55k
    goto end;
449
1.55k
  }
450
36.7k
      break;
451
258k
    }
452
453
249k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
249k
#ifndef NO_TVNDX
455
249k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
249k
#endif
457
458
249k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
193k
      || ISTAG (in_class))
460
70.1k
    {
461
70.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
70.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
70.1k
    }
464
179k
  else
465
179k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
179k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
179k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
179k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
179k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
179k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
179k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
179k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
179k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
179k
    }
478
479
249k
  if (ISFCN (type))
480
48.5k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
201k
  else
482
201k
    {
483
201k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
201k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
201k
    }
486
487
258k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
258k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
95.3k
{
409
95.3k
  AUXENT *ext = (AUXENT *) ext1;
410
95.3k
  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
95.3k
  switch (in_class)
417
95.3k
    {
418
8.22k
    case C_FILE:
419
8.22k
      if (ext->x_file.x_fname[0] == 0)
420
4.16k
  {
421
4.16k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
4.16k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
4.16k
  }
424
4.06k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
4.06k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
8.22k
      goto end;
430
431
2.76k
    case C_STAT:
432
2.76k
#ifdef C_LEAFSTAT
433
3.68k
    case C_LEAFSTAT:
434
3.68k
#endif
435
4.97k
    case C_HIDDEN:
436
4.97k
      if (type == T_NULL)
437
1.09k
  {
438
1.09k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.09k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.09k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
1.09k
    in->x_scn.x_checksum = 0;
445
1.09k
    in->x_scn.x_associated = 0;
446
1.09k
    in->x_scn.x_comdat = 0;
447
448
1.09k
    goto end;
449
1.09k
  }
450
3.88k
      break;
451
95.3k
    }
452
453
86.0k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
86.0k
#ifndef NO_TVNDX
455
86.0k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
86.0k
#endif
457
458
86.0k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
63.8k
      || ISTAG (in_class))
460
25.7k
    {
461
25.7k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
25.7k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
25.7k
    }
464
60.2k
  else
465
60.2k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
60.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
60.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
60.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
60.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
60.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
60.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
60.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
60.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
60.2k
    }
478
479
86.0k
  if (ISFCN (type))
480
18.7k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
67.2k
  else
482
67.2k
    {
483
67.2k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
67.2k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
67.2k
    }
486
487
95.3k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
95.3k
}
493
494
static unsigned int
495
coff_swap_aux_out (bfd * abfd,
496
       void * inp,
497
       int type,
498
       int in_class,
499
       int indx ATTRIBUTE_UNUSED,
500
       int numaux ATTRIBUTE_UNUSED,
501
       void * extp)
502
1.79k
{
503
1.79k
  union internal_auxent * in = (union internal_auxent *) inp;
504
1.79k
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
1.79k
  memset (ext, 0, AUXESZ);
511
512
1.79k
  switch (in_class)
513
1.79k
    {
514
119
    case C_FILE:
515
119
      if (in->x_file.x_n.x_fname[0] == 0)
516
60
  {
517
60
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
60
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
60
  }
520
59
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
59
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
119
      goto end;
526
527
159
    case C_STAT:
528
159
#ifdef C_LEAFSTAT
529
159
    case C_LEAFSTAT:
530
159
#endif
531
187
    case C_HIDDEN:
532
187
      if (type == T_NULL)
533
86
  {
534
86
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
86
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
86
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
86
    goto end;
538
86
  }
539
101
      break;
540
1.79k
    }
541
542
1.58k
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
1.58k
#ifndef NO_TVNDX
544
1.58k
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
1.58k
#endif
546
547
1.58k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
1.29k
      || ISTAG (in_class))
549
500
    {
550
500
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
500
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
500
    }
553
1.08k
  else
554
1.08k
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
1.08k
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
1.08k
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
1.08k
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
1.08k
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
1.08k
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
1.08k
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
1.08k
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
1.08k
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
1.08k
    }
567
568
1.58k
  if (ISFCN (type))
569
1.58k
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
1.32k
  else
571
1.32k
    {
572
1.32k
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
1.32k
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
1.32k
    }
575
576
1.79k
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
1.79k
  return AUXESZ;
581
1.58k
}
coff-x86_64.c:coff_swap_aux_out
Line
Count
Source
502
409
{
503
409
  union internal_auxent * in = (union internal_auxent *) inp;
504
409
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
409
  memset (ext, 0, AUXESZ);
511
512
409
  switch (in_class)
513
409
    {
514
41
    case C_FILE:
515
41
      if (in->x_file.x_n.x_fname[0] == 0)
516
20
  {
517
20
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
20
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
20
  }
520
21
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
21
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
41
      goto end;
526
527
79
    case C_STAT:
528
79
#ifdef C_LEAFSTAT
529
79
    case C_LEAFSTAT:
530
79
#endif
531
81
    case C_HIDDEN:
532
81
      if (type == T_NULL)
533
66
  {
534
66
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
66
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
66
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
66
    goto end;
538
66
  }
539
15
      break;
540
409
    }
541
542
302
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
302
#ifndef NO_TVNDX
544
302
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
302
#endif
546
547
302
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
265
      || ISTAG (in_class))
549
39
    {
550
39
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
39
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
39
    }
553
263
  else
554
263
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
263
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
263
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
263
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
263
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
263
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
263
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
263
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
263
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
263
    }
567
568
302
  if (ISFCN (type))
569
302
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
286
  else
571
286
    {
572
286
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
286
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
286
    }
575
576
409
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
409
  return AUXESZ;
581
302
}
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
coff-sh.c:coff_swap_aux_out
Line
Count
Source
502
260
{
503
260
  union internal_auxent * in = (union internal_auxent *) inp;
504
260
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
260
  memset (ext, 0, AUXESZ);
511
512
260
  switch (in_class)
513
260
    {
514
38
    case C_FILE:
515
38
      if (in->x_file.x_n.x_fname[0] == 0)
516
12
  {
517
12
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
12
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
12
  }
520
26
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
26
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
38
      goto end;
526
527
29
    case C_STAT:
528
29
#ifdef C_LEAFSTAT
529
29
    case C_LEAFSTAT:
530
29
#endif
531
41
    case C_HIDDEN:
532
41
      if (type == T_NULL)
533
5
  {
534
5
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
5
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
5
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
5
    goto end;
538
5
  }
539
36
      break;
540
260
    }
541
542
217
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
217
#ifndef NO_TVNDX
544
217
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
217
#endif
546
547
217
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
202
      || ISTAG (in_class))
549
79
    {
550
79
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
79
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
79
    }
553
138
  else
554
138
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
138
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
138
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
138
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
138
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
138
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
138
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
138
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
138
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
138
    }
567
568
217
  if (ISFCN (type))
569
217
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
202
  else
571
202
    {
572
202
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
202
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
202
    }
575
576
260
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
260
  return AUXESZ;
581
217
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
502
169
{
503
169
  union internal_auxent * in = (union internal_auxent *) inp;
504
169
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
169
  memset (ext, 0, AUXESZ);
511
512
169
  switch (in_class)
513
169
    {
514
9
    case C_FILE:
515
9
      if (in->x_file.x_n.x_fname[0] == 0)
516
4
  {
517
4
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
4
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
4
  }
520
5
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
5
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
9
      goto end;
526
527
9
    case C_STAT:
528
9
#ifdef C_LEAFSTAT
529
9
    case C_LEAFSTAT:
530
9
#endif
531
9
    case C_HIDDEN:
532
9
      if (type == T_NULL)
533
0
  {
534
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
0
    goto end;
538
0
  }
539
9
      break;
540
169
    }
541
542
160
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
160
#ifndef NO_TVNDX
544
160
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
160
#endif
546
547
160
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
150
      || ISTAG (in_class))
549
10
    {
550
10
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
10
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
10
    }
553
150
  else
554
150
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
150
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
150
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
150
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
150
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
150
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
150
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
150
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
150
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
150
    }
567
568
160
  if (ISFCN (type))
569
160
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
150
  else
571
150
    {
572
150
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
150
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
150
    }
575
576
169
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
169
  return AUXESZ;
581
160
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
502
199
{
503
199
  union internal_auxent * in = (union internal_auxent *) inp;
504
199
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
199
  memset (ext, 0, AUXESZ);
511
512
199
  switch (in_class)
513
199
    {
514
7
    case C_FILE:
515
7
      if (in->x_file.x_n.x_fname[0] == 0)
516
1
  {
517
1
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
1
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
1
  }
520
6
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
6
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
7
      goto end;
526
527
8
    case C_STAT:
528
8
#ifdef C_LEAFSTAT
529
8
    case C_LEAFSTAT:
530
8
#endif
531
22
    case C_HIDDEN:
532
22
      if (type == T_NULL)
533
7
  {
534
7
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
7
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
7
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
7
    goto end;
538
7
  }
539
15
      break;
540
199
    }
541
542
185
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
185
#ifndef NO_TVNDX
544
185
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
185
#endif
546
547
185
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
178
      || ISTAG (in_class))
549
14
    {
550
14
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
14
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
14
    }
553
171
  else
554
171
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
171
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
171
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
171
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
171
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
171
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
171
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
171
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
171
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
171
    }
567
568
185
  if (ISFCN (type))
569
185
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
178
  else
571
178
    {
572
178
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
178
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
178
    }
575
576
199
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
199
  return AUXESZ;
581
185
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
502
634
{
503
634
  union internal_auxent * in = (union internal_auxent *) inp;
504
634
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
634
  memset (ext, 0, AUXESZ);
511
512
634
  switch (in_class)
513
634
    {
514
0
    case C_FILE:
515
0
      if (in->x_file.x_n.x_fname[0] == 0)
516
0
  {
517
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
0
  }
520
0
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
0
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
0
      goto end;
526
527
32
    case C_STAT:
528
32
#ifdef C_LEAFSTAT
529
32
    case C_LEAFSTAT:
530
32
#endif
531
32
    case C_HIDDEN:
532
32
      if (type == T_NULL)
533
6
  {
534
6
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
6
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
6
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
6
    goto end;
538
6
  }
539
26
      break;
540
634
    }
541
542
628
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
628
#ifndef NO_TVNDX
544
628
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
628
#endif
546
547
628
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
471
      || ISTAG (in_class))
549
277
    {
550
277
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
277
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
277
    }
553
351
  else
554
351
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
351
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
351
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
351
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
351
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
351
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
351
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
351
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
351
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
351
    }
567
568
628
  if (ISFCN (type))
569
628
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
475
  else
571
475
    {
572
475
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
475
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
475
    }
575
576
634
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
634
  return AUXESZ;
581
628
}
coff-z8k.c:coff_swap_aux_out
Line
Count
Source
502
119
{
503
119
  union internal_auxent * in = (union internal_auxent *) inp;
504
119
  AUXENT *ext = (AUXENT *) extp;
505
506
#ifdef COFF_ADJUST_AUX_OUT_PRE
507
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
508
#endif
509
510
119
  memset (ext, 0, AUXESZ);
511
512
119
  switch (in_class)
513
119
    {
514
24
    case C_FILE:
515
24
      if (in->x_file.x_n.x_fname[0] == 0)
516
23
  {
517
23
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
23
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
23
  }
520
1
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
1
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
24
      goto end;
526
527
2
    case C_STAT:
528
2
#ifdef C_LEAFSTAT
529
2
    case C_LEAFSTAT:
530
2
#endif
531
2
    case C_HIDDEN:
532
2
      if (type == T_NULL)
533
2
  {
534
2
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
2
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
2
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
2
    goto end;
538
2
  }
539
0
      break;
540
119
    }
541
542
93
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
93
#ifndef NO_TVNDX
544
93
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
93
#endif
546
547
93
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
32
      || ISTAG (in_class))
549
81
    {
550
81
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
81
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
81
    }
553
12
  else
554
12
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
12
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
12
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
12
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
12
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
12
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
12
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
12
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
12
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
12
    }
567
568
93
  if (ISFCN (type))
569
93
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
32
  else
571
32
    {
572
32
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
32
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
32
    }
575
576
119
 end:
577
#ifdef COFF_ADJUST_AUX_OUT_POST
578
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
579
#endif
580
119
  return AUXESZ;
581
93
}
582
583
#endif /* NO_COFF_SYMBOLS */
584
585
#ifndef NO_COFF_LINENOS
586
587
static void
588
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
589
435k
{
590
435k
  LINENO *ext = (LINENO *) ext1;
591
435k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
435k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
435k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
435k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
589
87.2k
{
590
87.2k
  LINENO *ext = (LINENO *) ext1;
591
87.2k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
87.2k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
87.2k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
87.2k
}
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
589
69.5k
{
590
69.5k
  LINENO *ext = (LINENO *) ext1;
591
69.5k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
69.5k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
69.5k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
69.5k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
589
54.2k
{
590
54.2k
  LINENO *ext = (LINENO *) ext1;
591
54.2k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
54.2k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
54.2k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
54.2k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
589
75.8k
{
590
75.8k
  LINENO *ext = (LINENO *) ext1;
591
75.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
75.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
75.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
75.8k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
589
58.4k
{
590
58.4k
  LINENO *ext = (LINENO *) ext1;
591
58.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
58.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
58.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
58.4k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
589
43.7k
{
590
43.7k
  LINENO *ext = (LINENO *) ext1;
591
43.7k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
43.7k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
43.7k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
43.7k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
589
46.4k
{
590
46.4k
  LINENO *ext = (LINENO *) ext1;
591
46.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
46.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
46.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
46.4k
}
596
597
static unsigned int
598
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
599
19
{
600
19
  struct internal_lineno *in = (struct internal_lineno *) inp;
601
19
  struct external_lineno *ext = (struct external_lineno *) outp;
602
19
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
603
604
19
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
605
19
  return LINESZ;
606
19
}
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
coff-sh.c:coff_swap_lineno_out
Line
Count
Source
599
9
{
600
9
  struct internal_lineno *in = (struct internal_lineno *) inp;
601
9
  struct external_lineno *ext = (struct external_lineno *) outp;
602
9
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
603
604
9
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
605
9
  return LINESZ;
606
9
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
coff-tic30.c:coff_swap_lineno_out
Line
Count
Source
599
6
{
600
6
  struct internal_lineno *in = (struct internal_lineno *) inp;
601
6
  struct external_lineno *ext = (struct external_lineno *) outp;
602
6
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
603
604
6
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
605
6
  return LINESZ;
606
6
}
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
coff-z8k.c:coff_swap_lineno_out
Line
Count
Source
599
4
{
600
4
  struct internal_lineno *in = (struct internal_lineno *) inp;
601
4
  struct external_lineno *ext = (struct external_lineno *) outp;
602
4
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
603
604
4
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
605
4
  return LINESZ;
606
4
}
607
608
#endif /* NO_COFF_LINENOS */
609
610
static void
611
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
612
12.2k
{
613
12.2k
  AOUTHDR *aouthdr_ext;
614
12.2k
  struct internal_aouthdr *aouthdr_int;
615
616
12.2k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
12.2k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
12.2k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
12.2k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
12.2k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
12.2k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
12.2k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
12.2k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
12.2k
  aouthdr_int->text_start =
625
12.2k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
12.2k
  aouthdr_int->data_start =
627
12.2k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
851
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
887
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
1.73k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
1.73k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
1.73k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
1.73k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
1.73k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
1.73k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
1.73k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
1.73k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
1.73k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
1.73k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
851
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
851
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
887
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
887
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
946
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
946
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
946
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
946
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
946
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
946
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
946
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
645
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
645
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
645
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
645
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
12.2k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
612
645
{
613
645
  AOUTHDR *aouthdr_ext;
614
645
  struct internal_aouthdr *aouthdr_int;
615
616
645
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
645
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
645
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
645
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
645
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
645
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
645
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
645
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
645
  aouthdr_int->text_start =
625
645
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
645
  aouthdr_int->data_start =
627
645
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
645
#ifdef ALPHAECOFF
665
645
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
645
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
645
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
645
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
645
#endif
670
645
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.29k
{
613
1.29k
  AOUTHDR *aouthdr_ext;
614
1.29k
  struct internal_aouthdr *aouthdr_int;
615
616
1.29k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.29k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.29k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.29k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.29k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.29k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.29k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.29k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.29k
  aouthdr_int->text_start =
625
1.29k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.29k
  aouthdr_int->data_start =
627
1.29k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
1.29k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
851
{
613
851
  AOUTHDR *aouthdr_ext;
614
851
  struct internal_aouthdr *aouthdr_int;
615
616
851
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
851
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
851
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
851
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
851
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
851
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
851
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
851
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
851
  aouthdr_int->text_start =
625
851
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
851
  aouthdr_int->data_start =
627
851
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
851
#ifdef RS6000COFF_C
630
851
#ifdef XCOFF64
631
851
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
851
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
851
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
851
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
851
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
851
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
851
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
851
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
851
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
851
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
851
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
851
#ifdef XCOFF64
646
851
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
851
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
851
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
851
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.10k
{
613
1.10k
  AOUTHDR *aouthdr_ext;
614
1.10k
  struct internal_aouthdr *aouthdr_int;
615
616
1.10k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.10k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.10k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.10k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.10k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.10k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.10k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.10k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.10k
  aouthdr_int->text_start =
625
1.10k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.10k
  aouthdr_int->data_start =
627
1.10k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
1.10k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
612
731
{
613
731
  AOUTHDR *aouthdr_ext;
614
731
  struct internal_aouthdr *aouthdr_int;
615
616
731
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
731
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
731
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
731
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
731
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
731
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
731
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
731
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
731
  aouthdr_int->text_start =
625
731
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
731
  aouthdr_int->data_start =
627
731
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
731
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
612
731
{
613
731
  AOUTHDR *aouthdr_ext;
614
731
  struct internal_aouthdr *aouthdr_int;
615
616
731
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
731
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
731
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
731
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
731
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
731
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
731
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
731
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
731
  aouthdr_int->text_start =
625
731
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
731
  aouthdr_int->data_start =
627
731
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
731
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
612
946
{
613
946
  AOUTHDR *aouthdr_ext;
614
946
  struct internal_aouthdr *aouthdr_int;
615
616
946
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
946
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
946
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
946
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
946
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
946
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
946
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
946
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
946
  aouthdr_int->text_start =
625
946
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
946
  aouthdr_int->data_start =
627
946
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
946
#ifdef MIPSECOFF
655
946
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
946
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
946
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
946
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
946
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
946
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
946
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
946
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
946
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
887
{
613
887
  AOUTHDR *aouthdr_ext;
614
887
  struct internal_aouthdr *aouthdr_int;
615
616
887
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
887
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
887
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
887
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
887
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
887
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
887
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
887
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
887
  aouthdr_int->text_start =
625
887
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
887
  aouthdr_int->data_start =
627
887
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
887
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
887
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
887
#endif
635
887
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
887
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
887
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
887
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
887
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
887
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
887
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
887
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
887
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
887
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
887
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
887
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
887
#endif
652
887
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
887
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.00k
{
613
1.00k
  AOUTHDR *aouthdr_ext;
614
1.00k
  struct internal_aouthdr *aouthdr_int;
615
616
1.00k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.00k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.00k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.00k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.00k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.00k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.00k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.00k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.00k
  aouthdr_int->text_start =
625
1.00k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.00k
  aouthdr_int->data_start =
627
1.00k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
1.00k
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
612
406
{
613
406
  AOUTHDR *aouthdr_ext;
614
406
  struct internal_aouthdr *aouthdr_int;
615
616
406
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
406
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
406
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
406
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
406
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
406
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
406
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
406
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
406
  aouthdr_int->text_start =
625
406
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
406
  aouthdr_int->data_start =
627
406
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
406
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
612
769
{
613
769
  AOUTHDR *aouthdr_ext;
614
769
  struct internal_aouthdr *aouthdr_int;
615
616
769
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
769
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
769
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
769
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
769
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
769
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
769
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
769
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
769
  aouthdr_int->text_start =
625
769
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
769
  aouthdr_int->data_start =
627
769
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
769
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
612
965
{
613
965
  AOUTHDR *aouthdr_ext;
614
965
  struct internal_aouthdr *aouthdr_int;
615
616
965
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
965
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
965
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
965
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
965
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
965
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
965
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
965
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
965
  aouthdr_int->text_start =
625
965
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
965
  aouthdr_int->data_start =
627
965
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
965
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
612
683
{
613
683
  AOUTHDR *aouthdr_ext;
614
683
  struct internal_aouthdr *aouthdr_int;
615
616
683
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
683
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
683
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
683
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
683
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
683
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
683
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
683
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
683
  aouthdr_int->text_start =
625
683
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
683
  aouthdr_int->data_start =
627
683
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
683
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.21k
{
613
1.21k
  AOUTHDR *aouthdr_ext;
614
1.21k
  struct internal_aouthdr *aouthdr_int;
615
616
1.21k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.21k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.21k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.21k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.21k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.21k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.21k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.21k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.21k
  aouthdr_int->text_start =
625
1.21k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.21k
  aouthdr_int->data_start =
627
1.21k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
1.21k
}
671
672
static unsigned int
673
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
674
385
{
675
385
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
385
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
385
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
385
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
385
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
385
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
385
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
385
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
385
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
385
        aouthdr_out->text_start);
686
385
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
385
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
17
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
92
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
109
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
109
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
109
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
109
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
109
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
109
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
109
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
109
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
109
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
109
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
17
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
17
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
92
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
92
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
109
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
109
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
109
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
109
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
109
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
109
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
109
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
17
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
73
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
73
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
73
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
60
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
60
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
60
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
60
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
60
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
60
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
385
  return AOUTSZ;
747
385
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
674
60
{
675
60
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
60
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
60
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
60
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
60
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
60
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
60
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
60
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
60
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
60
        aouthdr_out->text_start);
686
60
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
60
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
60
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
60
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
60
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
60
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
60
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
60
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
60
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
60
#endif
745
746
60
  return AOUTSZ;
747
60
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
674
33
{
675
33
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
33
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
33
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
33
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
33
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
33
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
33
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
33
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
33
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
33
        aouthdr_out->text_start);
686
33
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
33
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
33
  return AOUTSZ;
747
33
}
coff64-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
674
17
{
675
17
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
17
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
17
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
17
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
17
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
17
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
17
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
17
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
17
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
17
        aouthdr_out->text_start);
686
17
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
17
        aouthdr_out->data_start);
688
689
17
#ifdef RS6000COFF_C
690
17
#ifdef XCOFF64
691
17
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
17
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
17
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
17
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
17
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
17
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
17
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
17
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
17
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
17
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
17
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
17
#ifdef XCOFF64
706
17
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
17
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
17
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
17
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
17
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
17
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
17
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
17
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
17
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
17
#ifdef XCOFF64
721
17
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
17
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
17
#endif
724
17
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
17
  return AOUTSZ;
747
17
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_aouthdr_out
coff-mips.c:mips_ecoff_swap_aouthdr_out
Line
Count
Source
674
73
{
675
73
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
73
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
73
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
73
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
73
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
73
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
73
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
73
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
73
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
73
        aouthdr_out->text_start);
686
73
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
73
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
73
#ifdef MIPSECOFF
727
73
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
73
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
73
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
73
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
73
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
73
  return AOUTSZ;
747
73
}
coff-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
674
92
{
675
92
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
92
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
92
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
92
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
92
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
92
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
92
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
92
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
92
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
92
        aouthdr_out->text_start);
686
92
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
92
        aouthdr_out->data_start);
688
689
92
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
92
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
92
#endif
695
92
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
92
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
92
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
92
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
92
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
92
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
92
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
92
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
92
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
92
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
92
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
92
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
92
#endif
712
  /* TODO: set o_*psize dynamically */
713
92
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
92
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
92
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
92
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
92
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
92
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
92
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
92
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
92
  return AOUTSZ;
747
92
}
coff-sh.c:coff_swap_aouthdr_out
Line
Count
Source
674
21
{
675
21
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
21
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
21
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
21
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
21
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
21
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
21
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
21
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
21
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
21
        aouthdr_out->text_start);
686
21
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
21
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
21
  return AOUTSZ;
747
21
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
coff-tic30.c:coff_swap_aouthdr_out
Line
Count
Source
674
23
{
675
23
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
23
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
23
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
23
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
23
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
23
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
23
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
23
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
23
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
23
        aouthdr_out->text_start);
686
23
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
23
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
23
  return AOUTSZ;
747
23
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
coff-tic54x.c:coff_swap_aouthdr_out
Line
Count
Source
674
12
{
675
12
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
12
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
12
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
12
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
12
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
12
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
12
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
12
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
12
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
12
        aouthdr_out->text_start);
686
12
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
12
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
12
  return AOUTSZ;
747
12
}
coff-z80.c:coff_swap_aouthdr_out
Line
Count
Source
674
32
{
675
32
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
32
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
32
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
32
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
32
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
32
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
32
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
32
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
32
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
32
        aouthdr_out->text_start);
686
32
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
32
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
32
  return AOUTSZ;
747
32
}
coff-z8k.c:coff_swap_aouthdr_out
Line
Count
Source
674
22
{
675
22
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
22
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
22
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
22
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
22
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
22
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
22
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
22
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
22
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
22
        aouthdr_out->text_start);
686
22
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
22
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
#ifdef MIPSECOFF
727
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
22
  return AOUTSZ;
747
22
}
748
749
ATTRIBUTE_UNUSED
750
static void
751
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
752
1.33M
{
753
1.33M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
1.33M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
1.33M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
1.33M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
1.33M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
1.33M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
1.33M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
1.33M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
1.33M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
1.33M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
1.33M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
1.33M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
88.0k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
1.33M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
752
15.6k
{
753
15.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
15.6k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
15.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
15.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
15.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
15.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
15.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
15.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
15.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
15.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
15.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
15.6k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
15.6k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
752
132k
{
753
132k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
132k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
132k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
132k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
132k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
132k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
132k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
132k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
132k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
132k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
132k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
132k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
132k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
48.1k
{
753
48.1k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
48.1k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
48.1k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
48.1k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
48.1k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
48.1k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
48.1k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
48.1k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
48.1k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
48.1k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
48.1k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
48.1k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
48.1k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
752
196k
{
753
196k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
196k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
196k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
196k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
196k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
196k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
196k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
196k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
196k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
196k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
196k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
196k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
196k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
752
112k
{
753
112k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
112k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
112k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
112k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
112k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
112k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
112k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
112k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
112k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
112k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
112k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
112k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
112k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
752
148k
{
753
148k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
148k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
148k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
148k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
148k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
148k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
148k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
148k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
148k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
148k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
148k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
148k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
148k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
82.6k
{
753
82.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
82.6k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
82.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
82.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
82.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
82.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
82.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
82.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
82.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
82.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
82.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
82.6k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
82.6k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
752
131k
{
753
131k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
131k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
131k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
131k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
131k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
131k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
131k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
131k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
131k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
131k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
131k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
131k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
131k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
752
97.0k
{
753
97.0k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
97.0k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
97.0k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
97.0k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
97.0k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
97.0k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
97.0k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
97.0k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
97.0k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
97.0k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
97.0k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
97.0k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
97.0k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
752
88.0k
{
753
88.0k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
88.0k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
88.0k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
88.0k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
88.0k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
88.0k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
88.0k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
88.0k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
88.0k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
88.0k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
88.0k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
88.0k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
88.0k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
88.0k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
88.0k
#endif
774
88.0k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
752
146k
{
753
146k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
146k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
146k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
146k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
146k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
146k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
146k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
146k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
146k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
146k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
146k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
146k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
146k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
752
131k
{
753
131k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
131k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
131k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
131k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
131k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
131k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
131k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
131k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
131k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
131k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
131k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
131k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
131k
}
775
776
ATTRIBUTE_UNUSED
777
static unsigned int
778
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out,
779
          const asection *section ATTRIBUTE_UNUSED)
780
1.09k
{
781
1.09k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
1.09k
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
1.09k
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
120
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
1.09k
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
1.09k
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
1.09k
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
1.09k
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
1.09k
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
1.09k
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
1.09k
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
1.09k
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
1.09k
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
1.09k
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
1.09k
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
1.09k
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
184
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
1.09k
  return ret;
832
1.09k
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Line
Count
Source
780
31
{
781
31
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
31
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
31
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
31
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
31
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
31
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
31
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
31
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
31
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
31
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
31
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
31
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
31
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
31
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
31
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
31
  return ret;
832
31
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
780
197
{
781
197
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
197
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
197
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
197
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
197
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
197
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
197
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
197
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
197
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
197
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
197
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
197
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
197
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
197
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
197
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
197
  return ret;
832
197
}
coff64-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
64
{
781
64
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
64
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
64
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
64
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
64
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
64
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
64
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
64
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
64
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
64
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
64
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
64
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
64
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
64
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
64
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
64
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
64
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
64
#endif
831
64
  return ret;
832
64
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_scnhdr_out
coff-mips.c:mips_ecoff_swap_scnhdr_out
Line
Count
Source
780
68
{
781
68
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
68
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
68
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
68
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
68
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
68
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
68
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
68
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
68
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
68
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
68
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
68
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
68
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
68
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
68
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
68
  return ret;
832
68
}
coff-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
67
{
781
67
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
67
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
67
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
67
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
67
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
67
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
67
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
67
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
67
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
67
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
67
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
67
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
67
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
67
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
67
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
67
  return ret;
832
67
}
coff-sh.c:coff_swap_scnhdr_out
Line
Count
Source
780
103
{
781
103
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
103
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
103
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
103
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
103
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
103
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
103
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
103
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
103
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
103
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
103
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
103
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
103
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
103
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
103
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
103
  return ret;
832
103
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
780
152
{
781
152
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
152
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
152
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
152
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
152
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
152
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
152
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
152
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
152
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
152
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
152
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
152
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
152
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
152
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
152
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
152
  return ret;
832
152
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
780
120
{
781
120
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
120
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
120
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
120
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
120
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
120
#endif
788
120
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
120
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
120
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
120
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
120
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
120
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
120
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
120
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
120
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
120
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
120
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
120
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
120
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
120
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
120
#endif
831
120
  return ret;
832
120
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
780
120
{
781
120
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
120
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
120
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
120
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
120
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
120
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
120
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
120
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
120
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
120
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
120
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
120
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
120
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
120
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
120
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
120
  return ret;
832
120
}
coff-z8k.c:coff_swap_scnhdr_out
Line
Count
Source
780
174
{
781
174
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
174
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
174
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
174
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
174
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
174
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
174
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
174
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
174
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
174
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
174
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
174
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
174
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
174
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
174
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
174
  return ret;
832
174
}