Coverage Report

Created: 2026-03-10 08:46

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
172k
  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
172k
  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
576
  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
576
  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
519k
  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
440k
  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.22k
  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.18k
  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
10.4k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
11.9k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
11.9k
  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
11
  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
11
  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
11
  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
145k
  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
2.65M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
499
#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
9.90k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
228
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
9.90k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
228
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
9.90k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
228
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
9.90k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
228
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
9.90k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
228
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
9.90k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
228
#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.49M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
952
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.49M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
952
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.38M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
864
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.49M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
952
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.49M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
952
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.49M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
952
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.40M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
957
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
869
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.40M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
957
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
869
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.45M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
904
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
13.0k
#define GET_RELOC_VADDR H_GET_32
207
#endif
208
#ifndef PUT_RELOC_VADDR
209
0
#define PUT_RELOC_VADDR H_PUT_32
210
#endif
211
212
#ifndef NO_COFF_RELOCS
213
214
static void
215
coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
216
12.8k
{
217
12.8k
  RELOC *reloc_src = (RELOC *) src;
218
12.8k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
12.8k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
12.8k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
12.8k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
1.00k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
12.8k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
439
{
217
439
  RELOC *reloc_src = (RELOC *) src;
218
439
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
439
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
439
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
439
  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
439
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
4.77k
{
217
4.77k
  RELOC *reloc_src = (RELOC *) src;
218
4.77k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
4.77k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
4.77k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
4.77k
  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.77k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
123
{
217
123
  RELOC *reloc_src = (RELOC *) src;
218
123
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
123
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
123
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
123
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
123
#ifdef SWAP_IN_RELOC_OFFSET
225
123
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
123
#endif
227
123
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
6.66k
{
217
6.66k
  RELOC *reloc_src = (RELOC *) src;
218
6.66k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
6.66k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
6.66k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
6.66k
  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.66k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
425
{
217
425
  RELOC *reloc_src = (RELOC *) src;
218
425
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
425
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
425
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
425
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
425
#ifdef SWAP_IN_RELOC_OFFSET
225
425
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
425
#endif
227
425
}
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
439
{
217
439
  RELOC *reloc_src = (RELOC *) src;
218
439
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
439
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
439
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
439
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
439
#ifdef SWAP_IN_RELOC_OFFSET
225
439
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
439
#endif
227
439
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
17
{
217
17
  RELOC *reloc_src = (RELOC *) src;
218
17
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
17
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
17
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
17
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
17
#ifdef SWAP_IN_RELOC_OFFSET
225
17
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
17
#endif
227
17
}
228
229
static unsigned int
230
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
231
0
{
232
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
0
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
0
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
0
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
0
  return bfd_coff_relsz (abfd);
247
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out
Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out
248
249
#ifdef TICOFF
250
static void
251
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
252
144
{
253
144
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
144
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
144
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
144
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
144
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
144
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
144
{
253
144
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
144
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
144
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
144
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
144
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
144
}
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
2.98M
{
281
2.98M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.98M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.98M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.98M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.98M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.98M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.98M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.98M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.98M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
791k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.98M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
133k
{
281
133k
  FILHDR *filehdr_src = (FILHDR *) src;
282
133k
  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
133k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
133k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
133k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
133k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
133k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
133k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
133k
  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
133k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
156k
{
281
156k
  FILHDR *filehdr_src = (FILHDR *) src;
282
156k
  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
156k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
156k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
156k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
156k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
156k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
156k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
156k
  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
156k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
188k
{
281
188k
  FILHDR *filehdr_src = (FILHDR *) src;
282
188k
  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
188k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
188k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
188k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
188k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
188k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
188k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
188k
  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
188k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
155k
{
281
155k
  FILHDR *filehdr_src = (FILHDR *) src;
282
155k
  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
155k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
155k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
155k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
155k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
155k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
155k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
155k
  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
155k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
155k
{
281
155k
  FILHDR *filehdr_src = (FILHDR *) src;
282
155k
  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
155k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
155k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
155k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
155k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
155k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
155k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
155k
  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
155k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
155k
{
281
155k
  FILHDR *filehdr_src = (FILHDR *) src;
282
155k
  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
155k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
155k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
155k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
155k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
155k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
155k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
155k
  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
155k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
407k
{
281
407k
  FILHDR *filehdr_src = (FILHDR *) src;
282
407k
  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
407k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
407k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
407k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
407k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
407k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
407k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
407k
  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
407k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
95.1k
{
281
95.1k
  FILHDR *filehdr_src = (FILHDR *) src;
282
95.1k
  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
95.1k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
95.1k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
95.1k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
95.1k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
95.1k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
95.1k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
95.1k
  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
95.1k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
339k
{
281
339k
  FILHDR *filehdr_src = (FILHDR *) src;
282
339k
  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
339k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
339k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
339k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
339k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
339k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
339k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
339k
  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
339k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
3.27k
{
281
3.27k
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.27k
  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.27k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.27k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.27k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.27k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.27k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.27k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.27k
  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.27k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
135k
{
281
135k
  FILHDR *filehdr_src = (FILHDR *) src;
282
135k
  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
135k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
135k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
135k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
135k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
135k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
135k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
135k
  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
135k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
791k
{
281
791k
  FILHDR *filehdr_src = (FILHDR *) src;
282
791k
  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
791k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
791k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
791k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
791k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
791k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
791k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
791k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
791k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
791k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
791k
#endif
298
791k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
135k
{
281
135k
  FILHDR *filehdr_src = (FILHDR *) src;
282
135k
  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
135k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
135k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
135k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
135k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
135k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
135k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
135k
  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
135k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
130k
{
281
130k
  FILHDR *filehdr_src = (FILHDR *) src;
282
130k
  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
130k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
130k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
130k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
130k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
130k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
130k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
130k
  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
130k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
606
{
303
606
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
606
  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
606
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
606
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
606
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
606
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
606
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
606
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
606
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
52
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
606
  return bfd_coff_filhsz (abfd);
321
606
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
56
{
303
56
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
56
  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
56
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
56
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
56
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
56
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
56
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
56
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
56
  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
56
  return bfd_coff_filhsz (abfd);
321
56
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
130
{
303
130
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
130
  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
130
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
130
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
130
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
130
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
130
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
130
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
130
  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
130
  return bfd_coff_filhsz (abfd);
321
130
}
coff64-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
302
51
{
303
51
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
51
  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
51
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
51
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
51
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
51
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
51
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
51
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
51
  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
51
  return bfd_coff_filhsz (abfd);
321
51
}
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
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
}
coff-rs6000.c:coff_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-sh.c:coff_swap_filehdr_out
Line
Count
Source
302
47
{
303
47
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
47
  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
47
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
47
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
47
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
47
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
47
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
47
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
47
  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
47
  return bfd_coff_filhsz (abfd);
321
47
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.c:coff_swap_filehdr_out
Line
Count
Source
302
71
{
303
71
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
71
  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
71
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
71
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
71
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
71
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
71
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
71
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
71
  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
71
  return bfd_coff_filhsz (abfd);
321
71
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
302
52
{
303
52
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
52
  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
52
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
52
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
52
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
52
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
52
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
52
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
52
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
52
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
52
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
52
#endif
320
52
  return bfd_coff_filhsz (abfd);
321
52
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
302
51
{
303
51
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
51
  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
51
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
51
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
51
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
51
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
51
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
51
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
51
  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
51
  return bfd_coff_filhsz (abfd);
321
51
}
coff-z8k.c:coff_swap_filehdr_out
Line
Count
Source
302
35
{
303
35
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
35
  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
35
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
35
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
35
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
35
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
35
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
35
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
35
  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
35
  return bfd_coff_filhsz (abfd);
321
35
}
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
145k
{
328
145k
  SYMENT *ext = (SYMENT *) ext1;
329
145k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
145k
  if (ext->e.e_name[0] == 0)
332
90.4k
    {
333
90.4k
      in->_n._n_n._n_zeroes = 0;
334
90.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
90.4k
    }
336
55.5k
  else
337
55.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
55.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
55.5k
#endif
343
55.5k
    }
344
345
145k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
145k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
145k
  if (sizeof (ext->e_type) == 2)
348
145k
    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
145k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
145k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
20.7k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
145k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
30.5k
{
328
30.5k
  SYMENT *ext = (SYMENT *) ext1;
329
30.5k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
30.5k
  if (ext->e.e_name[0] == 0)
332
19.9k
    {
333
19.9k
      in->_n._n_n._n_zeroes = 0;
334
19.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
19.9k
    }
336
10.5k
  else
337
10.5k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
10.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
10.5k
#endif
343
10.5k
    }
344
345
30.5k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
30.5k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
30.5k
  if (sizeof (ext->e_type) == 2)
348
30.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
30.5k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
30.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
30.5k
}
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
25.9k
{
328
25.9k
  SYMENT *ext = (SYMENT *) ext1;
329
25.9k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
25.9k
  if (ext->e.e_name[0] == 0)
332
15.9k
    {
333
15.9k
      in->_n._n_n._n_zeroes = 0;
334
15.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
15.9k
    }
336
10.0k
  else
337
10.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
10.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
10.0k
#endif
343
10.0k
    }
344
345
25.9k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
25.9k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
25.9k
  if (sizeof (ext->e_type) == 2)
348
25.9k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
25.9k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
25.9k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
25.9k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
23.4k
{
328
23.4k
  SYMENT *ext = (SYMENT *) ext1;
329
23.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
23.4k
  if (ext->e.e_name[0] == 0)
332
14.6k
    {
333
14.6k
      in->_n._n_n._n_zeroes = 0;
334
14.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
14.6k
    }
336
8.81k
  else
337
8.81k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
8.81k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
8.81k
#endif
343
8.81k
    }
344
345
23.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
23.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
23.4k
  if (sizeof (ext->e_type) == 2)
348
23.4k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
23.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
23.4k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
23.4k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
20.7k
{
328
20.7k
  SYMENT *ext = (SYMENT *) ext1;
329
20.7k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
20.7k
  if (ext->e.e_name[0] == 0)
332
12.1k
    {
333
12.1k
      in->_n._n_n._n_zeroes = 0;
334
12.1k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
12.1k
    }
336
8.65k
  else
337
8.65k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
8.65k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
8.65k
#endif
343
8.65k
    }
344
345
20.7k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
20.7k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
20.7k
  if (sizeof (ext->e_type) == 2)
348
20.7k
    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
20.7k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
20.7k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
20.7k
#ifdef COFF_ADJUST_SYM_IN_POST
354
20.7k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
20.7k
#endif
356
20.7k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
33.3k
{
328
33.3k
  SYMENT *ext = (SYMENT *) ext1;
329
33.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
33.3k
  if (ext->e.e_name[0] == 0)
332
20.0k
    {
333
20.0k
      in->_n._n_n._n_zeroes = 0;
334
20.0k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
20.0k
    }
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
33.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
33.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
33.3k
  if (sizeof (ext->e_type) == 2)
348
33.3k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
33.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
33.3k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
33.3k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
11.9k
{
328
11.9k
  SYMENT *ext = (SYMENT *) ext1;
329
11.9k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
11.9k
  if (ext->e.e_name[0] == 0)
332
7.74k
    {
333
7.74k
      in->_n._n_n._n_zeroes = 0;
334
7.74k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
7.74k
    }
336
4.15k
  else
337
4.15k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
4.15k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
4.15k
#endif
343
4.15k
    }
344
345
11.9k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
11.9k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
11.9k
  if (sizeof (ext->e_type) == 2)
348
11.9k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
11.9k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
11.9k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
11.9k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
1.18k
{
361
1.18k
  struct internal_syment *in = (struct internal_syment *) inp;
362
1.18k
  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.18k
  if (in->_n._n_name[0] == 0)
369
951
    {
370
951
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
951
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
951
    }
373
235
  else
374
235
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
235
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
235
#endif
380
235
    }
381
382
1.18k
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
1.18k
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
1.18k
  if (sizeof (ext->e_type) == 2)
386
1.18k
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
1.18k
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
1.18k
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
1.18k
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
202
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
1.18k
  return SYMESZ;
398
1.18k
}
coff-x86_64.c:coff_swap_sym_out
Line
Count
Source
360
82
{
361
82
  struct internal_syment *in = (struct internal_syment *) inp;
362
82
  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
82
  if (in->_n._n_name[0] == 0)
369
54
    {
370
54
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
54
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
54
    }
373
28
  else
374
28
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
28
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
28
#endif
380
28
    }
381
382
82
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
82
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
82
  if (sizeof (ext->e_type) == 2)
386
82
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
82
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
82
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
82
  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
82
  return SYMESZ;
398
82
}
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
84
{
361
84
  struct internal_syment *in = (struct internal_syment *) inp;
362
84
  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
84
  if (in->_n._n_name[0] == 0)
369
66
    {
370
66
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
66
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
66
    }
373
18
  else
374
18
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
18
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
18
#endif
380
18
    }
381
382
84
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
84
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
84
  if (sizeof (ext->e_type) == 2)
386
84
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
84
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
84
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
84
  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
84
  return SYMESZ;
398
84
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
360
286
{
361
286
  struct internal_syment *in = (struct internal_syment *) inp;
362
286
  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
286
  if (in->_n._n_name[0] == 0)
369
203
    {
370
203
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
203
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
203
    }
373
83
  else
374
83
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
83
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
83
#endif
380
83
    }
381
382
286
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
286
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
286
  if (sizeof (ext->e_type) == 2)
386
286
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
286
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
286
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
286
  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
286
  return SYMESZ;
398
286
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
360
202
{
361
202
  struct internal_syment *in = (struct internal_syment *) inp;
362
202
  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
202
  if (in->_n._n_name[0] == 0)
369
171
    {
370
171
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
171
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
171
    }
373
31
  else
374
31
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
31
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
31
#endif
380
31
    }
381
382
202
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
202
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
202
  if (sizeof (ext->e_type) == 2)
386
202
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
202
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
202
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
202
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
202
#ifdef COFF_ADJUST_SYM_OUT_POST
394
202
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
202
#endif
396
397
202
  return SYMESZ;
398
202
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
360
412
{
361
412
  struct internal_syment *in = (struct internal_syment *) inp;
362
412
  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
412
  if (in->_n._n_name[0] == 0)
369
352
    {
370
352
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
352
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
352
    }
373
60
  else
374
60
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
60
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
60
#endif
380
60
    }
381
382
412
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
412
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
412
  if (sizeof (ext->e_type) == 2)
386
412
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
412
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
412
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
412
  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
412
  return SYMESZ;
398
412
}
coff-z8k.c:coff_swap_sym_out
Line
Count
Source
360
120
{
361
120
  struct internal_syment *in = (struct internal_syment *) inp;
362
120
  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
120
  if (in->_n._n_name[0] == 0)
369
105
    {
370
105
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
105
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
105
    }
373
15
  else
374
15
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
15
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
15
#endif
380
15
    }
381
382
120
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
120
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
120
  if (sizeof (ext->e_type) == 2)
386
120
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
120
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
120
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
120
  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
120
  return SYMESZ;
398
120
}
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
685k
{
409
685k
  AUXENT *ext = (AUXENT *) ext1;
410
685k
  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
685k
  switch (in_class)
417
685k
    {
418
33.7k
    case C_FILE:
419
33.7k
      if (ext->x_file.x_fname[0] == 0)
420
13.6k
  {
421
13.6k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
13.6k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
13.6k
  }
424
20.1k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
20.1k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
33.7k
      goto end;
430
431
21.4k
    case C_STAT:
432
21.4k
#ifdef C_LEAFSTAT
433
34.1k
    case C_LEAFSTAT:
434
34.1k
#endif
435
44.1k
    case C_HIDDEN:
436
44.1k
      if (type == T_NULL)
437
11.9k
  {
438
11.9k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
11.9k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
11.9k
    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
11.9k
    in->x_scn.x_checksum = 0;
445
11.9k
    in->x_scn.x_associated = 0;
446
11.9k
    in->x_scn.x_comdat = 0;
447
448
11.9k
    goto end;
449
11.9k
  }
450
32.2k
      break;
451
685k
    }
452
453
639k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
639k
#ifndef NO_TVNDX
455
639k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
639k
#endif
457
458
639k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
503k
      || ISTAG (in_class))
460
172k
    {
461
172k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
172k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
172k
    }
464
467k
  else
465
467k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
467k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
467k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
467k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
467k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
467k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
467k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
467k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
467k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
467k
    }
478
479
639k
  if (ISFCN (type))
480
120k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
519k
  else
482
519k
    {
483
519k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
519k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
519k
    }
486
487
685k
 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
685k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
99.9k
{
409
99.9k
  AUXENT *ext = (AUXENT *) ext1;
410
99.9k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
99.9k
  switch (in_class)
417
99.9k
    {
418
7.14k
    case C_FILE:
419
7.14k
      if (ext->x_file.x_fname[0] == 0)
420
3.34k
  {
421
3.34k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.34k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.34k
  }
424
3.79k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.79k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.14k
      goto end;
430
431
3.36k
    case C_STAT:
432
3.36k
#ifdef C_LEAFSTAT
433
4.59k
    case C_LEAFSTAT:
434
4.59k
#endif
435
6.32k
    case C_HIDDEN:
436
6.32k
      if (type == T_NULL)
437
2.26k
  {
438
2.26k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
2.26k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
2.26k
    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.26k
    in->x_scn.x_checksum = 0;
445
2.26k
    in->x_scn.x_associated = 0;
446
2.26k
    in->x_scn.x_comdat = 0;
447
448
2.26k
    goto end;
449
2.26k
  }
450
4.06k
      break;
451
99.9k
    }
452
453
90.5k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
90.5k
#ifndef NO_TVNDX
455
90.5k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
90.5k
#endif
457
458
90.5k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
75.3k
      || ISTAG (in_class))
460
23.0k
    {
461
23.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
23.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
23.0k
    }
464
67.5k
  else
465
67.5k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
67.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
67.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
67.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
67.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
67.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
67.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
67.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
67.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
67.5k
    }
478
479
90.5k
  if (ISFCN (type))
480
14.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
76.4k
  else
482
76.4k
    {
483
76.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
76.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
76.4k
    }
486
487
99.9k
 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
99.9k
}
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
88.1k
{
409
88.1k
  AUXENT *ext = (AUXENT *) ext1;
410
88.1k
  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
88.1k
  switch (in_class)
417
88.1k
    {
418
7.84k
    case C_FILE:
419
7.84k
      if (ext->x_file.x_fname[0] == 0)
420
2.78k
  {
421
2.78k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.78k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.78k
  }
424
5.06k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
5.06k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.84k
      goto end;
430
431
2.38k
    case C_STAT:
432
2.38k
#ifdef C_LEAFSTAT
433
3.39k
    case C_LEAFSTAT:
434
3.39k
#endif
435
4.79k
    case C_HIDDEN:
436
4.79k
      if (type == T_NULL)
437
1.18k
  {
438
1.18k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.18k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.18k
    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.18k
    in->x_scn.x_checksum = 0;
445
1.18k
    in->x_scn.x_associated = 0;
446
1.18k
    in->x_scn.x_comdat = 0;
447
448
1.18k
    goto end;
449
1.18k
  }
450
3.61k
      break;
451
88.1k
    }
452
453
79.1k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
79.1k
#ifndef NO_TVNDX
455
79.1k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
79.1k
#endif
457
458
79.1k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
62.3k
      || ISTAG (in_class))
460
21.9k
    {
461
21.9k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
21.9k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
21.9k
    }
464
57.2k
  else
465
57.2k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
57.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
57.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
57.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
57.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
57.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
57.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
57.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
57.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
57.2k
    }
478
479
79.1k
  if (ISFCN (type))
480
15.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
63.9k
  else
482
63.9k
    {
483
63.9k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
63.9k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
63.9k
    }
486
487
88.1k
 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
88.1k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
119k
{
409
119k
  AUXENT *ext = (AUXENT *) ext1;
410
119k
  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
119k
  switch (in_class)
417
119k
    {
418
4.86k
    case C_FILE:
419
4.86k
      if (ext->x_file.x_fname[0] == 0)
420
2.16k
  {
421
2.16k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.16k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.16k
  }
424
2.70k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.70k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
4.86k
      goto end;
430
431
6.04k
    case C_STAT:
432
6.04k
#ifdef C_LEAFSTAT
433
7.73k
    case C_LEAFSTAT:
434
7.73k
#endif
435
10.0k
    case C_HIDDEN:
436
10.0k
      if (type == T_NULL)
437
4.82k
  {
438
4.82k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
4.82k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
4.82k
    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
4.82k
    in->x_scn.x_checksum = 0;
445
4.82k
    in->x_scn.x_associated = 0;
446
4.82k
    in->x_scn.x_comdat = 0;
447
448
4.82k
    goto end;
449
4.82k
  }
450
5.21k
      break;
451
119k
    }
452
453
109k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
109k
#ifndef NO_TVNDX
455
109k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
109k
#endif
457
458
109k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
92.1k
      || ISTAG (in_class))
460
23.7k
    {
461
23.7k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
23.7k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
23.7k
    }
464
85.9k
  else
465
85.9k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
85.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
85.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
85.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
85.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
85.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
85.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
85.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
85.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
85.9k
    }
478
479
109k
  if (ISFCN (type))
480
14.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
95.6k
  else
482
95.6k
    {
483
95.6k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
95.6k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
95.6k
    }
486
487
119k
 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
119k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
108k
{
409
108k
  AUXENT *ext = (AUXENT *) ext1;
410
108k
  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
108k
  switch (in_class)
417
108k
    {
418
4.90k
    case C_FILE:
419
4.90k
      if (ext->x_file.x_fname[0] == 0)
420
1.98k
  {
421
1.98k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.98k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.98k
  }
424
2.92k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.92k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
4.90k
      goto end;
430
431
3.70k
    case C_STAT:
432
3.70k
#ifdef C_LEAFSTAT
433
4.55k
    case C_LEAFSTAT:
434
4.55k
#endif
435
5.56k
    case C_HIDDEN:
436
5.56k
      if (type == T_NULL)
437
1.42k
  {
438
1.42k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.42k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.42k
    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.42k
    in->x_scn.x_checksum = 0;
445
1.42k
    in->x_scn.x_associated = 0;
446
1.42k
    in->x_scn.x_comdat = 0;
447
448
1.42k
    goto end;
449
1.42k
  }
450
4.14k
      break;
451
108k
    }
452
453
102k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
102k
#ifndef NO_TVNDX
455
102k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
102k
#endif
457
458
102k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
77.4k
      || ISTAG (in_class))
460
30.6k
    {
461
30.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
30.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
30.6k
    }
464
71.5k
  else
465
71.5k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
71.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
71.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
71.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
71.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
71.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
71.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
71.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
71.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
71.5k
    }
478
479
102k
  if (ISFCN (type))
480
23.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
79.0k
  else
482
79.0k
    {
483
79.0k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
79.0k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
79.0k
    }
486
487
108k
 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
108k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
210k
{
409
210k
  AUXENT *ext = (AUXENT *) ext1;
410
210k
  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
210k
  switch (in_class)
417
210k
    {
418
7.09k
    case C_FILE:
419
7.09k
      if (ext->x_file.x_fname[0] == 0)
420
2.57k
  {
421
2.57k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.57k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.57k
  }
424
4.51k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
4.51k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.09k
      goto end;
430
431
3.77k
    case C_STAT:
432
3.77k
#ifdef C_LEAFSTAT
433
10.7k
    case C_LEAFSTAT:
434
10.7k
#endif
435
13.2k
    case C_HIDDEN:
436
13.2k
      if (type == T_NULL)
437
1.66k
  {
438
1.66k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.66k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.66k
    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.66k
    in->x_scn.x_checksum = 0;
445
1.66k
    in->x_scn.x_associated = 0;
446
1.66k
    in->x_scn.x_comdat = 0;
447
448
1.66k
    goto end;
449
1.66k
  }
450
11.5k
      break;
451
210k
    }
452
453
201k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
201k
#ifndef NO_TVNDX
455
201k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
201k
#endif
457
458
201k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
152k
      || ISTAG (in_class))
460
55.5k
    {
461
55.5k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
55.5k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
55.5k
    }
464
146k
  else
465
146k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
146k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
146k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
146k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
146k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
146k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
146k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
146k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
146k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
146k
    }
478
479
201k
  if (ISFCN (type))
480
42.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
159k
  else
482
159k
    {
483
159k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
159k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
159k
    }
486
487
210k
 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
210k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
58.7k
{
409
58.7k
  AUXENT *ext = (AUXENT *) ext1;
410
58.7k
  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
58.7k
  switch (in_class)
417
58.7k
    {
418
1.91k
    case C_FILE:
419
1.91k
      if (ext->x_file.x_fname[0] == 0)
420
812
  {
421
812
    in->x_file.x_n.x_n.x_zeroes = 0;
422
812
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
812
  }
424
1.10k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
1.10k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
1.91k
      goto end;
430
431
2.16k
    case C_STAT:
432
2.16k
#ifdef C_LEAFSTAT
433
3.09k
    case C_LEAFSTAT:
434
3.09k
#endif
435
4.24k
    case C_HIDDEN:
436
4.24k
      if (type == T_NULL)
437
555
  {
438
555
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
555
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
555
    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
555
    in->x_scn.x_checksum = 0;
445
555
    in->x_scn.x_associated = 0;
446
555
    in->x_scn.x_comdat = 0;
447
448
555
    goto end;
449
555
  }
450
3.69k
      break;
451
58.7k
    }
452
453
56.2k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
56.2k
#ifndef NO_TVNDX
455
56.2k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
56.2k
#endif
457
458
56.2k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
43.6k
      || ISTAG (in_class))
460
17.0k
    {
461
17.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
17.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
17.0k
    }
464
39.1k
  else
465
39.1k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
39.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
39.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
39.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
39.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
39.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
39.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
39.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
39.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
39.1k
    }
478
479
56.2k
  if (ISFCN (type))
480
11.2k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
44.9k
  else
482
44.9k
    {
483
44.9k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
44.9k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
44.9k
    }
486
487
58.7k
 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
58.7k
}
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.47k
{
503
1.47k
  union internal_auxent * in = (union internal_auxent *) inp;
504
1.47k
  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.47k
  memset (ext, 0, AUXESZ);
511
512
1.47k
  switch (in_class)
513
1.47k
    {
514
31
    case C_FILE:
515
31
      if (in->x_file.x_n.x_fname[0] == 0)
516
15
  {
517
15
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
15
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
15
  }
520
16
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
16
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
31
      goto end;
526
527
94
    case C_STAT:
528
94
#ifdef C_LEAFSTAT
529
94
    case C_LEAFSTAT:
530
94
#endif
531
99
    case C_HIDDEN:
532
99
      if (type == T_NULL)
533
11
  {
534
11
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
11
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
11
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
11
    goto end;
538
11
  }
539
88
      break;
540
1.47k
    }
541
542
1.43k
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
1.43k
#ifndef NO_TVNDX
544
1.43k
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
1.43k
#endif
546
547
1.43k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
1.00k
      || ISTAG (in_class))
549
576
    {
550
576
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
576
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
576
    }
553
861
  else
554
861
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
861
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
861
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
861
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
861
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
861
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
861
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
861
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
861
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
861
    }
567
568
1.43k
  if (ISFCN (type))
569
1.43k
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
1.22k
  else
571
1.22k
    {
572
1.22k
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
1.22k
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
1.22k
    }
575
576
1.47k
 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.47k
  return AUXESZ;
581
1.43k
}
coff-x86_64.c:coff_swap_aux_out
Line
Count
Source
502
73
{
503
73
  union internal_auxent * in = (union internal_auxent *) inp;
504
73
  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
73
  memset (ext, 0, AUXESZ);
511
512
73
  switch (in_class)
513
73
    {
514
25
    case C_FILE:
515
25
      if (in->x_file.x_n.x_fname[0] == 0)
516
15
  {
517
15
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
518
15
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
519
15
  }
520
10
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
10
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
25
      goto end;
526
527
2
    case C_STAT:
528
2
#ifdef C_LEAFSTAT
529
2
    case C_LEAFSTAT:
530
2
#endif
531
6
    case C_HIDDEN:
532
6
      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
6
      break;
540
73
    }
541
542
48
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
48
#ifndef NO_TVNDX
544
48
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
48
#endif
546
547
48
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
21
      || ISTAG (in_class))
549
30
    {
550
30
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
30
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
30
    }
553
18
  else
554
18
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
18
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
18
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
18
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
18
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
18
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
18
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
18
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
18
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
18
    }
567
568
48
  if (ISFCN (type))
569
48
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
21
  else
571
21
    {
572
21
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
21
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
21
    }
575
576
73
 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
73
  return AUXESZ;
581
48
}
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
297
{
503
297
  union internal_auxent * in = (union internal_auxent *) inp;
504
297
  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
297
  memset (ext, 0, AUXESZ);
511
512
297
  switch (in_class)
513
297
    {
514
2
    case C_FILE:
515
2
      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
2
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
2
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
2
      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
297
    }
541
542
293
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
293
#ifndef NO_TVNDX
544
293
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
293
#endif
546
547
293
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
276
      || ISTAG (in_class))
549
65
    {
550
65
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
65
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
65
    }
553
228
  else
554
228
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
228
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
228
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
228
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
228
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
228
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
228
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
228
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
228
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
228
    }
567
568
293
  if (ISFCN (type))
569
293
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
276
  else
571
276
    {
572
276
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
276
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
276
    }
575
576
297
 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
297
  return AUXESZ;
581
293
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
502
280
{
503
280
  union internal_auxent * in = (union internal_auxent *) inp;
504
280
  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
280
  memset (ext, 0, AUXESZ);
511
512
280
  switch (in_class)
513
280
    {
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
50
    case C_STAT:
528
50
#ifdef C_LEAFSTAT
529
50
    case C_LEAFSTAT:
530
50
#endif
531
50
    case C_HIDDEN:
532
50
      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
50
      break;
540
280
    }
541
542
280
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
280
#ifndef NO_TVNDX
544
280
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
280
#endif
546
547
280
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
158
      || ISTAG (in_class))
549
132
    {
550
132
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
132
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
132
    }
553
148
  else
554
148
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
148
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
148
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
148
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
148
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
148
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
148
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
148
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
148
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
148
    }
567
568
280
  if (ISFCN (type))
569
280
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
273
  else
571
273
    {
572
273
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
273
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
273
    }
575
576
280
 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
280
  return AUXESZ;
581
280
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
502
91
{
503
91
  union internal_auxent * in = (union internal_auxent *) inp;
504
91
  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
91
  memset (ext, 0, AUXESZ);
511
512
91
  switch (in_class)
513
91
    {
514
4
    case C_FILE:
515
4
      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
4
      else
521
#if FILNMLEN != E_FILNMLEN
522
#error we need to cope with truncating or extending xfname
523
#endif
524
4
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
525
4
      goto end;
526
527
0
    case C_STAT:
528
0
#ifdef C_LEAFSTAT
529
0
    case C_LEAFSTAT:
530
0
#endif
531
0
    case C_HIDDEN:
532
0
      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
0
      break;
540
91
    }
541
542
87
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
87
#ifndef NO_TVNDX
544
87
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
87
#endif
546
547
87
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
36
      || ISTAG (in_class))
549
59
    {
550
59
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
59
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
59
    }
553
28
  else
554
28
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
28
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
28
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
28
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
28
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
28
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
28
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
28
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
28
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
28
    }
567
568
87
  if (ISFCN (type))
569
87
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
36
  else
571
36
    {
572
36
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
36
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
36
    }
575
576
91
 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
91
  return AUXESZ;
581
87
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
502
697
{
503
697
  union internal_auxent * in = (union internal_auxent *) inp;
504
697
  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
697
  memset (ext, 0, AUXESZ);
511
512
697
  switch (in_class)
513
697
    {
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
40
    case C_STAT:
528
40
#ifdef C_LEAFSTAT
529
40
    case C_LEAFSTAT:
530
40
#endif
531
41
    case C_HIDDEN:
532
41
      if (type == T_NULL)
533
9
  {
534
9
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
535
9
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
536
9
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
537
9
    goto end;
538
9
  }
539
32
      break;
540
697
    }
541
542
688
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
688
#ifndef NO_TVNDX
544
688
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
688
#endif
546
547
688
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
470
      || ISTAG (in_class))
549
278
    {
550
278
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
278
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
278
    }
553
410
  else
554
410
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
410
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
410
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
410
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
410
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
410
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
410
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
410
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
410
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
410
    }
567
568
688
  if (ISFCN (type))
569
688
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
578
  else
571
578
    {
572
578
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
578
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
578
    }
575
576
697
 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
697
  return AUXESZ;
581
688
}
coff-z8k.c:coff_swap_aux_out
Line
Count
Source
502
41
{
503
41
  union internal_auxent * in = (union internal_auxent *) inp;
504
41
  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
41
  memset (ext, 0, AUXESZ);
511
512
41
  switch (in_class)
513
41
    {
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
0
    case C_STAT:
528
0
#ifdef C_LEAFSTAT
529
0
    case C_LEAFSTAT:
530
0
#endif
531
0
    case C_HIDDEN:
532
0
      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
0
      break;
540
41
    }
541
542
41
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
41
#ifndef NO_TVNDX
544
41
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
41
#endif
546
547
41
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
41
      || ISTAG (in_class))
549
12
    {
550
12
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
12
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
12
    }
553
29
  else
554
29
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
29
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
29
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
29
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
29
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
29
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
29
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
29
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
29
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
29
    }
567
568
41
  if (ISFCN (type))
569
41
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
41
  else
571
41
    {
572
41
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
41
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
41
    }
575
576
41
 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
41
  return AUXESZ;
581
41
}
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
383k
{
590
383k
  LINENO *ext = (LINENO *) ext1;
591
383k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
383k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
383k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
383k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
589
72.6k
{
590
72.6k
  LINENO *ext = (LINENO *) ext1;
591
72.6k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
72.6k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
72.6k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
72.6k
}
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
85.8k
{
590
85.8k
  LINENO *ext = (LINENO *) ext1;
591
85.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
85.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
85.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
85.8k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
589
38.0k
{
590
38.0k
  LINENO *ext = (LINENO *) ext1;
591
38.0k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
38.0k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
38.0k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
38.0k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
589
47.8k
{
590
47.8k
  LINENO *ext = (LINENO *) ext1;
591
47.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
47.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
47.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
47.8k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
589
59.4k
{
590
59.4k
  LINENO *ext = (LINENO *) ext1;
591
59.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
59.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
59.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
59.4k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
589
34.4k
{
590
34.4k
  LINENO *ext = (LINENO *) ext1;
591
34.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
34.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
34.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
34.4k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
589
45.0k
{
590
45.0k
  LINENO *ext = (LINENO *) ext1;
591
45.0k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
45.0k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
45.0k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
45.0k
}
596
597
static unsigned int
598
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
599
0
{
600
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
601
0
  struct external_lineno *ext = (struct external_lineno *) outp;
602
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
603
604
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
605
0
  return LINESZ;
606
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z80.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out
607
608
#endif /* NO_COFF_LINENOS */
609
610
static void
611
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
612
11.0k
{
613
11.0k
  AOUTHDR *aouthdr_ext;
614
11.0k
  struct internal_aouthdr *aouthdr_int;
615
616
11.0k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
11.0k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
11.0k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
11.0k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
11.0k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
11.0k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
11.0k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
11.0k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
11.0k
  aouthdr_int->text_start =
625
11.0k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
11.0k
  aouthdr_int->data_start =
627
11.0k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
766
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
642
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
1.40k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
1.40k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
1.40k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
1.40k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
1.40k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
1.40k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
1.40k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
1.40k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
1.40k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
1.40k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
766
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
766
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
642
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
642
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
902
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
902
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
902
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
902
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
902
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
902
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
902
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
420
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
420
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
420
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
420
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
11.0k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
612
420
{
613
420
  AOUTHDR *aouthdr_ext;
614
420
  struct internal_aouthdr *aouthdr_int;
615
616
420
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
420
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
420
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
420
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
420
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
420
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
420
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
420
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
420
  aouthdr_int->text_start =
625
420
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
420
  aouthdr_int->data_start =
627
420
    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
420
#ifdef ALPHAECOFF
665
420
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
420
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
420
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
420
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
420
#endif
670
420
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.47k
{
613
1.47k
  AOUTHDR *aouthdr_ext;
614
1.47k
  struct internal_aouthdr *aouthdr_int;
615
616
1.47k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.47k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.47k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.47k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.47k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.47k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.47k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.47k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.47k
  aouthdr_int->text_start =
625
1.47k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.47k
  aouthdr_int->data_start =
627
1.47k
    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.47k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
766
{
613
766
  AOUTHDR *aouthdr_ext;
614
766
  struct internal_aouthdr *aouthdr_int;
615
616
766
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
766
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
766
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
766
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
766
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
766
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
766
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
766
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
766
  aouthdr_int->text_start =
625
766
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
766
  aouthdr_int->data_start =
627
766
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
766
#ifdef RS6000COFF_C
630
766
#ifdef XCOFF64
631
766
  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
766
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
766
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
766
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
766
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
766
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
766
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
766
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
766
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
766
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
766
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
766
#ifdef XCOFF64
646
766
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
766
  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
766
#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
766
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.08k
{
613
1.08k
  AOUTHDR *aouthdr_ext;
614
1.08k
  struct internal_aouthdr *aouthdr_int;
615
616
1.08k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.08k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.08k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.08k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.08k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.08k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.08k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.08k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.08k
  aouthdr_int->text_start =
625
1.08k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.08k
  aouthdr_int->data_start =
627
1.08k
    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.08k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
612
697
{
613
697
  AOUTHDR *aouthdr_ext;
614
697
  struct internal_aouthdr *aouthdr_int;
615
616
697
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
697
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
697
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
697
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
697
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
697
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
697
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
697
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
697
  aouthdr_int->text_start =
625
697
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
697
  aouthdr_int->data_start =
627
697
    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
697
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
612
697
{
613
697
  AOUTHDR *aouthdr_ext;
614
697
  struct internal_aouthdr *aouthdr_int;
615
616
697
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
697
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
697
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
697
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
697
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
697
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
697
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
697
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
697
  aouthdr_int->text_start =
625
697
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
697
  aouthdr_int->data_start =
627
697
    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
697
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
612
902
{
613
902
  AOUTHDR *aouthdr_ext;
614
902
  struct internal_aouthdr *aouthdr_int;
615
616
902
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
902
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
902
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
902
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
902
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
902
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
902
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
902
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
902
  aouthdr_int->text_start =
625
902
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
902
  aouthdr_int->data_start =
627
902
    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
902
#ifdef MIPSECOFF
655
902
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
902
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
902
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
902
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
902
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
902
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
902
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
902
#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
902
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
642
{
613
642
  AOUTHDR *aouthdr_ext;
614
642
  struct internal_aouthdr *aouthdr_int;
615
616
642
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
642
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
642
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
642
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
642
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
642
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
642
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
642
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
642
  aouthdr_int->text_start =
625
642
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
642
  aouthdr_int->data_start =
627
642
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
642
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
642
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
642
#endif
635
642
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
642
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
642
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
642
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
642
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
642
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
642
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
642
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
642
  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
642
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
642
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
642
#endif
652
642
#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
642
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
612
808
{
613
808
  AOUTHDR *aouthdr_ext;
614
808
  struct internal_aouthdr *aouthdr_int;
615
616
808
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
808
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
808
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
808
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
808
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
808
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
808
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
808
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
808
  aouthdr_int->text_start =
625
808
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
808
  aouthdr_int->data_start =
627
808
    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
808
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
612
419
{
613
419
  AOUTHDR *aouthdr_ext;
614
419
  struct internal_aouthdr *aouthdr_int;
615
616
419
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
419
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
419
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
419
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
419
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
419
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
419
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
419
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
419
  aouthdr_int->text_start =
625
419
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
419
  aouthdr_int->data_start =
627
419
    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
419
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
612
603
{
613
603
  AOUTHDR *aouthdr_ext;
614
603
  struct internal_aouthdr *aouthdr_int;
615
616
603
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
603
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
603
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
603
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
603
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
603
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
603
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
603
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
603
  aouthdr_int->text_start =
625
603
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
603
  aouthdr_int->data_start =
627
603
    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
603
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
612
990
{
613
990
  AOUTHDR *aouthdr_ext;
614
990
  struct internal_aouthdr *aouthdr_int;
615
616
990
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
990
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
990
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
990
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
990
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
990
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
990
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
990
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
990
  aouthdr_int->text_start =
625
990
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
990
  aouthdr_int->data_start =
627
990
    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
990
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
612
521
{
613
521
  AOUTHDR *aouthdr_ext;
614
521
  struct internal_aouthdr *aouthdr_int;
615
616
521
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
521
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
521
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
521
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
521
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
521
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
521
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
521
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
521
  aouthdr_int->text_start =
625
521
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
521
  aouthdr_int->data_start =
627
521
    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
521
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.06k
{
613
1.06k
  AOUTHDR *aouthdr_ext;
614
1.06k
  struct internal_aouthdr *aouthdr_int;
615
616
1.06k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.06k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.06k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.06k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.06k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.06k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.06k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.06k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.06k
  aouthdr_int->text_start =
625
1.06k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.06k
  aouthdr_int->data_start =
627
1.06k
    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.06k
}
671
672
static unsigned int
673
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
674
294
{
675
294
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
294
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
294
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
294
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
294
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
294
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
294
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
294
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
294
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
294
        aouthdr_out->text_start);
686
294
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
294
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
10
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
60
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
70
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
70
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
70
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
70
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
70
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
70
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
70
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
70
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
70
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
70
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
10
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
10
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
60
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
60
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
70
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
70
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
70
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
70
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
70
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
70
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
70
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
10
  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
53
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
53
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
53
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
53
  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
56
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
56
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
56
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
56
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
56
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
56
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
294
  return AOUTSZ;
747
294
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
674
56
{
675
56
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
56
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
56
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
56
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
56
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
56
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
56
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
56
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
56
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
56
        aouthdr_out->text_start);
686
56
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
56
        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
56
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
56
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
56
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
56
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
56
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
56
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
56
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
56
#endif
745
746
56
  return AOUTSZ;
747
56
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
674
30
{
675
30
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
30
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
30
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
30
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
30
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
30
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
30
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
30
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
30
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
30
        aouthdr_out->text_start);
686
30
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
30
        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
30
  return AOUTSZ;
747
30
}
coff64-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
674
10
{
675
10
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
10
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
10
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
10
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
10
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
10
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
10
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
10
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
10
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
10
        aouthdr_out->text_start);
686
10
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
10
        aouthdr_out->data_start);
688
689
10
#ifdef RS6000COFF_C
690
10
#ifdef XCOFF64
691
10
  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
10
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
10
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
10
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
10
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
10
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
10
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
10
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
10
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
10
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
10
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
10
#ifdef XCOFF64
706
10
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
10
  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
10
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
10
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
10
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
10
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
10
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
10
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
10
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
10
#ifdef XCOFF64
721
10
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
10
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
10
#endif
724
10
#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
10
  return AOUTSZ;
747
10
}
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
53
{
675
53
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
53
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
53
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
53
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
53
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
53
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
53
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
53
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
53
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
53
        aouthdr_out->text_start);
686
53
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
53
        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
53
#ifdef MIPSECOFF
727
53
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
53
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
53
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
53
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
53
#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
53
  return AOUTSZ;
747
53
}
coff-rs6000.c:coff_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
60
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
60
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
60
#endif
695
60
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
60
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
60
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
60
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
60
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
60
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
60
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
60
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
60
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
60
  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
60
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
60
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
60
#endif
712
  /* TODO: set o_*psize dynamically */
713
60
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
60
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
60
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
60
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
60
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
60
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
60
  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
60
#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
60
  return AOUTSZ;
747
60
}
coff-sh.c:coff_swap_aouthdr_out
Line
Count
Source
674
16
{
675
16
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
16
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
16
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
16
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
16
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
16
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
16
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
16
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
16
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
16
        aouthdr_out->text_start);
686
16
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
16
        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
16
  return AOUTSZ;
747
16
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
coff-tic30.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
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
coff-tic54x.c:coff_swap_aouthdr_out
Line
Count
Source
674
10
{
675
10
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
10
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
10
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
10
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
10
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
10
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
10
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
10
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
10
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
10
        aouthdr_out->text_start);
686
10
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
10
        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
10
  return AOUTSZ;
747
10
}
coff-z80.c:coff_swap_aouthdr_out
Line
Count
Source
674
26
{
675
26
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
26
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
26
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
26
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
26
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
26
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
26
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
26
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
26
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
26
        aouthdr_out->text_start);
686
26
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
26
        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
26
  return AOUTSZ;
747
26
}
coff-z8k.c:coff_swap_aouthdr_out
Line
Count
Source
674
11
{
675
11
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
11
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
11
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
11
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
11
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
11
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
11
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
11
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
11
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
11
        aouthdr_out->text_start);
686
11
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
11
        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
11
  return AOUTSZ;
747
11
}
748
749
ATTRIBUTE_UNUSED
750
static void
751
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
752
1.36M
{
753
1.36M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
1.36M
  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.36M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
1.36M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
1.36M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
1.36M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
1.36M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
1.36M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
1.36M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
1.36M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
1.36M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
1.36M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
106k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
1.36M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
752
17.9k
{
753
17.9k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
17.9k
  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
17.9k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
17.9k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
17.9k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
17.9k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
17.9k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
17.9k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
17.9k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
17.9k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
17.9k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
17.9k
  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
17.9k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
752
125k
{
753
125k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
125k
  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
125k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
125k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
125k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
125k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
125k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
125k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
125k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
125k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
125k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
125k
  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
125k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
50.2k
{
753
50.2k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
50.2k
  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
50.2k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
50.2k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
50.2k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
50.2k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
50.2k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
50.2k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
50.2k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
50.2k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
50.2k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
50.2k
  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
50.2k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
752
191k
{
753
191k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
191k
  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
191k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
191k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
191k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
191k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
191k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
191k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
191k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
191k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
191k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
191k
  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
191k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
752
103k
{
753
103k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
103k
  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
103k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
103k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
103k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
103k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
103k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
103k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
103k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
103k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
103k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
103k
  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
103k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
752
173k
{
753
173k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
173k
  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
173k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
173k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
173k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
173k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
173k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
173k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
173k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
173k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
173k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
173k
  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
173k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
103k
{
753
103k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
103k
  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
103k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
103k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
103k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
103k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
103k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
103k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
103k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
103k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
103k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
103k
  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
103k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
752
125k
{
753
125k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
125k
  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
125k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
125k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
125k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
125k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
125k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
125k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
125k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
125k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
125k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
125k
  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
125k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
752
90.7k
{
753
90.7k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
90.7k
  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
90.7k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
90.7k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
90.7k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
90.7k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
90.7k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
90.7k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
90.7k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
90.7k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
90.7k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
90.7k
  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
90.7k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
752
106k
{
753
106k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
106k
  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
106k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
106k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
106k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
106k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
106k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
106k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
106k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
106k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
106k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
106k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
106k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
106k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
106k
#endif
774
106k
}
coff-z80.c:coff_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-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
752
130k
{
753
130k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
130k
  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
130k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
130k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
130k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
130k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
130k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
130k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
130k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
130k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
130k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
130k
  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
130k
}
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
992
{
781
992
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
992
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
992
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
88
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
992
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
992
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
992
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
992
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
992
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
992
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
992
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
992
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
992
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
992
    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
992
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
992
    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
123
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
992
  return ret;
832
992
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Line
Count
Source
780
5
{
781
5
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
5
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
5
  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
5
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
5
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
5
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
5
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
5
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
5
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
5
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
5
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
5
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
5
    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
5
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
5
    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
5
  return ret;
832
5
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
780
297
{
781
297
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
297
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
297
  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
297
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
297
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
297
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
297
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
297
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
297
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
297
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
297
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
297
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
297
    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
297
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
297
    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
297
  return ret;
832
297
}
coff64-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
35
{
781
35
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
35
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
35
  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
35
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
35
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
35
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
35
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
35
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
35
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
35
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
35
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
35
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
35
    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
35
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
35
    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
35
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
35
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
35
#endif
831
35
  return ret;
832
35
}
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
50
{
781
50
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
50
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
50
  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
50
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
50
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
50
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
50
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
50
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
50
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
50
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
50
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
50
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
50
    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
50
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
50
    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
50
  return ret;
832
50
}
coff-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
118
{
781
118
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
118
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
118
  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
118
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
118
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
118
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
118
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
118
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
118
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
118
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
118
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
118
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
118
    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
118
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
118
    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
118
  return ret;
832
118
}
coff-sh.c:coff_swap_scnhdr_out
Line
Count
Source
780
80
{
781
80
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
80
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
80
  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
80
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
80
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
80
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
80
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
80
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
80
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
80
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
80
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
80
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
80
    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
80
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
80
    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
80
  return ret;
832
80
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
780
142
{
781
142
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
142
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
142
  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
142
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
142
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
142
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
142
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
142
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
142
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
142
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
142
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
142
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
142
    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
142
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
142
    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
142
  return ret;
832
142
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
780
88
{
781
88
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
88
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
88
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
88
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
88
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
88
#endif
788
88
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
88
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
88
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
88
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
88
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
88
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
88
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
88
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
88
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
88
    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
88
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
88
    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
88
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
88
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
88
#endif
831
88
  return ret;
832
88
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
780
114
{
781
114
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
114
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
114
  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
114
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
114
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
114
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
114
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
114
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
114
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
114
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
114
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
114
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
114
    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
114
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
114
    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
114
  return ret;
832
114
}
coff-z8k.c:coff_swap_scnhdr_out
Line
Count
Source
780
63
{
781
63
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
63
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
63
  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
63
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
63
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
63
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
63
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
63
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
63
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
63
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
63
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
63
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
63
    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
63
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
63
    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
63
  return ret;
832
63
}