Coverage Report

Created: 2026-05-11 07:54

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
189k
  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
189k
  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
931
  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
931
  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
533k
  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
473k
  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
773
  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
616
  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
7.71k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
9.94k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
9.94k
  H_GET_16 (abfd, ext->x_scn.x_nlinno)
75
#endif
76
#ifndef PUT_SCN_SCNLEN
77
#define PUT_SCN_SCNLEN(abfd, in, ext) \
78
0
  H_PUT_32 (abfd, in, ext->x_scn.x_scnlen)
79
#endif
80
#ifndef PUT_SCN_NRELOC
81
#define PUT_SCN_NRELOC(abfd, in, ext) \
82
0
  H_PUT_16 (abfd, in, ext->x_scn.x_nreloc)
83
#endif
84
#ifndef PUT_SCN_NLINNO
85
#define PUT_SCN_NLINNO(abfd, in, ext) \
86
0
  H_PUT_16 (abfd, in, ext->x_scn.x_nlinno)
87
#endif
88
#ifndef GET_LINENO_LNNO
89
#define GET_LINENO_LNNO(abfd, ext) \
90
154k
  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.63M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
66
#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.33k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
41
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
9.33k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
41
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
9.33k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
41
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
9.33k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
41
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
9.33k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
41
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
9.33k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
41
#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.38M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
247
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.38M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
247
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.29M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
229
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.38M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
247
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.38M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
247
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.38M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
247
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.30M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
248
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
230
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.30M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
248
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
230
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.35M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
300
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
11.7k
#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
11.4k
{
217
11.4k
  RELOC *reloc_src = (RELOC *) src;
218
11.4k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
11.4k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
11.4k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
11.4k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
1.60k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
11.4k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
531
{
217
531
  RELOC *reloc_src = (RELOC *) src;
218
531
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
531
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
531
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
531
  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
531
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
3.94k
{
217
3.94k
  RELOC *reloc_src = (RELOC *) src;
218
3.94k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
3.94k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
3.94k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
3.94k
  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
3.94k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
355
{
217
355
  RELOC *reloc_src = (RELOC *) src;
218
355
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
355
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
355
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
355
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
355
#ifdef SWAP_IN_RELOC_OFFSET
225
355
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
355
#endif
227
355
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
5.41k
{
217
5.41k
  RELOC *reloc_src = (RELOC *) src;
218
5.41k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
5.41k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
5.41k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
5.41k
  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
5.41k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
468
{
217
468
  RELOC *reloc_src = (RELOC *) src;
218
468
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
468
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
468
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
468
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
468
#ifdef SWAP_IN_RELOC_OFFSET
225
468
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
468
#endif
227
468
}
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
635
{
217
635
  RELOC *reloc_src = (RELOC *) src;
218
635
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
635
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
635
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
635
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
635
#ifdef SWAP_IN_RELOC_OFFSET
225
635
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
635
#endif
227
635
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
145
{
217
145
  RELOC *reloc_src = (RELOC *) src;
218
145
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
145
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
145
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
145
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
145
#ifdef SWAP_IN_RELOC_OFFSET
225
145
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
145
#endif
227
145
}
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
208
{
253
208
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
208
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
208
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
208
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
208
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
208
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
208
{
253
208
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
208
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
208
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
208
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
208
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
208
}
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.95M
{
281
2.95M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.95M
  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.95M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.95M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.95M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.95M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.95M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.95M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.95M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
796k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.95M
}
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
146k
{
281
146k
  FILHDR *filehdr_src = (FILHDR *) src;
282
146k
  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
146k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
146k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
146k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
146k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
146k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
146k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
146k
  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
146k
}
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
145k
{
281
145k
  FILHDR *filehdr_src = (FILHDR *) src;
282
145k
  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
145k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
145k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
145k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
145k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
145k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
145k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
145k
  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
145k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
145k
{
281
145k
  FILHDR *filehdr_src = (FILHDR *) src;
282
145k
  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
145k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
145k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
145k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
145k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
145k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
145k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
145k
  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
145k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
145k
{
281
145k
  FILHDR *filehdr_src = (FILHDR *) src;
282
145k
  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
145k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
145k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
145k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
145k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
145k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
145k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
145k
  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
145k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
408k
{
281
408k
  FILHDR *filehdr_src = (FILHDR *) src;
282
408k
  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
408k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
408k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
408k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
408k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
408k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
408k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
408k
  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
408k
}
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
343k
{
281
343k
  FILHDR *filehdr_src = (FILHDR *) src;
282
343k
  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
343k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
343k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
343k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
343k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
343k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
343k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
343k
  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
343k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
3.08k
{
281
3.08k
  FILHDR *filehdr_src = (FILHDR *) src;
282
3.08k
  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.08k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
3.08k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
3.08k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
3.08k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
3.08k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
3.08k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
3.08k
  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.08k
}
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
796k
{
281
796k
  FILHDR *filehdr_src = (FILHDR *) src;
282
796k
  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
796k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
796k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
796k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
796k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
796k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
796k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
796k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
796k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
796k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
796k
#endif
298
796k
}
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
132k
{
281
132k
  FILHDR *filehdr_src = (FILHDR *) src;
282
132k
  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
132k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
132k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
132k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
132k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
132k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
132k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
132k
  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
132k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
89
{
303
89
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
89
  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
89
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
89
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
89
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
89
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
89
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
89
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
89
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
3
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
89
  return bfd_coff_filhsz (abfd);
321
89
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
13
{
303
13
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
13
  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
13
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
13
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
13
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
13
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
13
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
13
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
13
  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
13
  return bfd_coff_filhsz (abfd);
321
13
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
302
5
{
303
5
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
5
  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
5
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
5
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
5
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
5
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
5
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
5
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
5
  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
5
  return bfd_coff_filhsz (abfd);
321
5
}
coff64-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
302
10
{
303
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
10
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
10
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
10
  return bfd_coff_filhsz (abfd);
321
10
}
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
31
{
303
31
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
31
  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
31
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
31
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
31
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
31
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
31
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
31
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
31
  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
31
  return bfd_coff_filhsz (abfd);
321
31
}
coff-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
302
3
{
303
3
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
3
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
3
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
3
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
3
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
3
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
3
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
3
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
3
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
3
  return bfd_coff_filhsz (abfd);
321
3
}
coff-sh.c:coff_swap_filehdr_out
Line
Count
Source
302
2
{
303
2
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
2
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
2
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
2
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
2
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
2
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
2
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
2
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
2
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
2
  return bfd_coff_filhsz (abfd);
321
2
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.c:coff_swap_filehdr_out
Line
Count
Source
302
9
{
303
9
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
9
  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
9
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
9
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
9
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
9
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
9
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
9
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
9
  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
9
  return bfd_coff_filhsz (abfd);
321
9
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
302
3
{
303
3
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
3
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
3
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
3
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
3
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
3
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
3
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
3
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
3
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
3
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
3
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
3
#endif
320
3
  return bfd_coff_filhsz (abfd);
321
3
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
302
13
{
303
13
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
13
  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
13
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
13
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
13
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
13
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
13
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
13
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
13
  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
13
  return bfd_coff_filhsz (abfd);
321
13
}
Unexecuted instantiation: coff-z8k.c:coff_swap_filehdr_out
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
151k
{
328
151k
  SYMENT *ext = (SYMENT *) ext1;
329
151k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
151k
  if (ext->e.e_name[0] == 0)
332
92.3k
    {
333
92.3k
      in->_n._n_n._n_zeroes = 0;
334
92.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
92.3k
    }
336
59.2k
  else
337
59.2k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
59.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
59.2k
#endif
343
59.2k
    }
344
345
151k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
151k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
151k
  if (sizeof (ext->e_type) == 2)
348
151k
    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
151k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
151k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
18.5k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
151k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
34.2k
{
328
34.2k
  SYMENT *ext = (SYMENT *) ext1;
329
34.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
34.2k
  if (ext->e.e_name[0] == 0)
332
21.6k
    {
333
21.6k
      in->_n._n_n._n_zeroes = 0;
334
21.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
21.6k
    }
336
12.6k
  else
337
12.6k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
12.6k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
12.6k
#endif
343
12.6k
    }
344
345
34.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
34.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
34.2k
  if (sizeof (ext->e_type) == 2)
348
34.2k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
34.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
34.2k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
34.2k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_in
Unexecuted instantiation: coff-go32.c:coff_swap_sym_in
Unexecuted instantiation: coff-i386.c:coff_swap_sym_in
coff-sh.c:coff_swap_sym_in
Line
Count
Source
327
25.1k
{
328
25.1k
  SYMENT *ext = (SYMENT *) ext1;
329
25.1k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
25.1k
  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
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
25.1k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
25.1k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
25.1k
  if (sizeof (ext->e_type) == 2)
348
25.1k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
25.1k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
25.1k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
25.1k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
28.6k
{
328
28.6k
  SYMENT *ext = (SYMENT *) ext1;
329
28.6k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
28.6k
  if (ext->e.e_name[0] == 0)
332
18.1k
    {
333
18.1k
      in->_n._n_n._n_zeroes = 0;
334
18.1k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
18.1k
    }
336
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
28.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
28.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
28.6k
  if (sizeof (ext->e_type) == 2)
348
28.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
28.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
28.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
28.6k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
18.5k
{
328
18.5k
  SYMENT *ext = (SYMENT *) ext1;
329
18.5k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
18.5k
  if (ext->e.e_name[0] == 0)
332
11.0k
    {
333
11.0k
      in->_n._n_n._n_zeroes = 0;
334
11.0k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
11.0k
    }
336
7.50k
  else
337
7.50k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
7.50k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
7.50k
#endif
343
7.50k
    }
344
345
18.5k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
18.5k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
18.5k
  if (sizeof (ext->e_type) == 2)
348
18.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
18.5k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
18.5k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
18.5k
#ifdef COFF_ADJUST_SYM_IN_POST
354
18.5k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
18.5k
#endif
356
18.5k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
31.6k
{
328
31.6k
  SYMENT *ext = (SYMENT *) ext1;
329
31.6k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
31.6k
  if (ext->e.e_name[0] == 0)
332
18.4k
    {
333
18.4k
      in->_n._n_n._n_zeroes = 0;
334
18.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
18.4k
    }
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
31.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
31.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
31.6k
  if (sizeof (ext->e_type) == 2)
348
31.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
31.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
31.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
31.6k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
13.2k
{
328
13.2k
  SYMENT *ext = (SYMENT *) ext1;
329
13.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
13.2k
  if (ext->e.e_name[0] == 0)
332
8.47k
    {
333
8.47k
      in->_n._n_n._n_zeroes = 0;
334
8.47k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
8.47k
    }
336
4.75k
  else
337
4.75k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
4.75k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
4.75k
#endif
343
4.75k
    }
344
345
13.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
13.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
13.2k
  if (sizeof (ext->e_type) == 2)
348
13.2k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
13.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
13.2k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
13.2k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
729
{
361
729
  struct internal_syment *in = (struct internal_syment *) inp;
362
729
  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
729
  if (in->_n._n_name[0] == 0)
369
690
    {
370
690
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
690
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
690
    }
373
39
  else
374
39
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
39
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
39
#endif
380
39
    }
381
382
729
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
729
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
729
  if (sizeof (ext->e_type) == 2)
386
729
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
729
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
729
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
729
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
62
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
729
  return SYMESZ;
398
729
}
coff-x86_64.c:coff_swap_sym_out
Line
Count
Source
360
37
{
361
37
  struct internal_syment *in = (struct internal_syment *) inp;
362
37
  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
37
  if (in->_n._n_name[0] == 0)
369
33
    {
370
33
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
33
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
33
    }
373
4
  else
374
4
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
4
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
4
#endif
380
4
    }
381
382
37
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
37
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
37
  if (sizeof (ext->e_type) == 2)
386
37
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
37
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
37
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
37
  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
37
  return SYMESZ;
398
37
}
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
18
{
361
18
  struct internal_syment *in = (struct internal_syment *) inp;
362
18
  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
18
  if (in->_n._n_name[0] == 0)
369
0
    {
370
0
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
0
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
0
    }
373
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
18
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
18
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
18
  if (sizeof (ext->e_type) == 2)
386
18
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
18
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
18
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
18
  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
18
  return SYMESZ;
398
18
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
360
12
{
361
12
  struct internal_syment *in = (struct internal_syment *) inp;
362
12
  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
12
  if (in->_n._n_name[0] == 0)
369
8
    {
370
8
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
8
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
8
    }
373
4
  else
374
4
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
4
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
4
#endif
380
4
    }
381
382
12
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
12
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
12
  if (sizeof (ext->e_type) == 2)
386
12
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
12
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
12
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
12
  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
12
  return SYMESZ;
398
12
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
360
62
{
361
62
  struct internal_syment *in = (struct internal_syment *) inp;
362
62
  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
62
  if (in->_n._n_name[0] == 0)
369
60
    {
370
60
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
60
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
60
    }
373
2
  else
374
2
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
2
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
2
#endif
380
2
    }
381
382
62
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
62
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
62
  if (sizeof (ext->e_type) == 2)
386
62
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
62
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
62
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
62
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
62
#ifdef COFF_ADJUST_SYM_OUT_POST
394
62
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
62
#endif
396
397
62
  return SYMESZ;
398
62
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
360
600
{
361
600
  struct internal_syment *in = (struct internal_syment *) inp;
362
600
  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
600
  if (in->_n._n_name[0] == 0)
369
589
    {
370
589
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
589
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
589
    }
373
11
  else
374
11
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
11
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
11
#endif
380
11
    }
381
382
600
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
600
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
600
  if (sizeof (ext->e_type) == 2)
386
600
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
600
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
600
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
600
  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
600
  return SYMESZ;
398
600
}
Unexecuted instantiation: coff-z8k.c:coff_swap_sym_out
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx ATTRIBUTE_UNUSED,
406
      int numaux ATTRIBUTE_UNUSED,
407
      void * in1)
408
713k
{
409
713k
  AUXENT *ext = (AUXENT *) ext1;
410
713k
  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
713k
  switch (in_class)
417
713k
    {
418
43.3k
    case C_FILE:
419
43.3k
      if (ext->x_file.x_fname[0] == 0)
420
18.4k
  {
421
18.4k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
18.4k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
18.4k
  }
424
24.8k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
24.8k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
43.3k
      goto end;
430
431
19.6k
    case C_STAT:
432
19.6k
#ifdef C_LEAFSTAT
433
28.5k
    case C_LEAFSTAT:
434
28.5k
#endif
435
38.5k
    case C_HIDDEN:
436
38.5k
      if (type == T_NULL)
437
9.94k
  {
438
9.94k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
9.94k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
9.94k
    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
9.94k
    in->x_scn.x_checksum = 0;
445
9.94k
    in->x_scn.x_associated = 0;
446
9.94k
    in->x_scn.x_comdat = 0;
447
448
9.94k
    goto end;
449
9.94k
  }
450
28.5k
      break;
451
713k
    }
452
453
659k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
659k
#ifndef NO_TVNDX
455
659k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
659k
#endif
457
458
659k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
515k
      || ISTAG (in_class))
460
189k
    {
461
189k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
189k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
189k
    }
464
470k
  else
465
470k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
470k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
470k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
470k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
470k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
470k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
470k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
470k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
470k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
470k
    }
478
479
659k
  if (ISFCN (type))
480
126k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
533k
  else
482
533k
    {
483
533k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
533k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
533k
    }
486
487
713k
 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
713k
}
coff-x86_64.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
7.42k
    case C_FILE:
419
7.42k
      if (ext->x_file.x_fname[0] == 0)
420
3.78k
  {
421
3.78k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.78k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.78k
  }
424
3.64k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.64k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.42k
      goto end;
430
431
3.52k
    case C_STAT:
432
3.52k
#ifdef C_LEAFSTAT
433
4.64k
    case C_LEAFSTAT:
434
4.64k
#endif
435
6.05k
    case C_HIDDEN:
436
6.05k
      if (type == T_NULL)
437
2.39k
  {
438
2.39k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
2.39k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
2.39k
    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.39k
    in->x_scn.x_checksum = 0;
445
2.39k
    in->x_scn.x_associated = 0;
446
2.39k
    in->x_scn.x_comdat = 0;
447
448
2.39k
    goto end;
449
2.39k
  }
450
3.66k
      break;
451
108k
    }
452
453
98.8k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
98.8k
#ifndef NO_TVNDX
455
98.8k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
98.8k
#endif
457
458
98.8k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
79.6k
      || ISTAG (in_class))
460
26.9k
    {
461
26.9k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
26.9k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
26.9k
    }
464
71.9k
  else
465
71.9k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
71.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
71.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
71.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
71.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
71.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
71.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
71.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
71.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
71.9k
    }
478
479
98.8k
  if (ISFCN (type))
480
17.5k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
81.3k
  else
482
81.3k
    {
483
81.3k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
81.3k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
81.3k
    }
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
}
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
107k
{
409
107k
  AUXENT *ext = (AUXENT *) ext1;
410
107k
  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
107k
  switch (in_class)
417
107k
    {
418
13.3k
    case C_FILE:
419
13.3k
      if (ext->x_file.x_fname[0] == 0)
420
5.37k
  {
421
5.37k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
5.37k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
5.37k
  }
424
8.00k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
8.00k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
13.3k
      goto end;
430
431
2.44k
    case C_STAT:
432
2.44k
#ifdef C_LEAFSTAT
433
3.67k
    case C_LEAFSTAT:
434
3.67k
#endif
435
5.01k
    case C_HIDDEN:
436
5.01k
      if (type == T_NULL)
437
1.05k
  {
438
1.05k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.05k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.05k
    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.05k
    in->x_scn.x_checksum = 0;
445
1.05k
    in->x_scn.x_associated = 0;
446
1.05k
    in->x_scn.x_comdat = 0;
447
448
1.05k
    goto end;
449
1.05k
  }
450
3.95k
      break;
451
107k
    }
452
453
92.9k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
92.9k
#ifndef NO_TVNDX
455
92.9k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
92.9k
#endif
457
458
92.9k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
70.3k
      || ISTAG (in_class))
460
28.0k
    {
461
28.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
28.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
28.0k
    }
464
64.8k
  else
465
64.8k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
64.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
64.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
64.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
64.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
64.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
64.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
64.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
64.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
64.8k
    }
478
479
92.9k
  if (ISFCN (type))
480
21.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
71.4k
  else
482
71.4k
    {
483
71.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
71.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
71.4k
    }
486
487
107k
 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
107k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
128k
{
409
128k
  AUXENT *ext = (AUXENT *) ext1;
410
128k
  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
128k
  switch (in_class)
417
128k
    {
418
5.35k
    case C_FILE:
419
5.35k
      if (ext->x_file.x_fname[0] == 0)
420
2.35k
  {
421
2.35k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.35k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.35k
  }
424
2.99k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.99k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
5.35k
      goto end;
430
431
4.35k
    case C_STAT:
432
4.35k
#ifdef C_LEAFSTAT
433
5.67k
    case C_LEAFSTAT:
434
5.67k
#endif
435
7.89k
    case C_HIDDEN:
436
7.89k
      if (type == T_NULL)
437
2.45k
  {
438
2.45k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
2.45k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
2.45k
    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.45k
    in->x_scn.x_checksum = 0;
445
2.45k
    in->x_scn.x_associated = 0;
446
2.45k
    in->x_scn.x_comdat = 0;
447
448
2.45k
    goto end;
449
2.45k
  }
450
5.43k
      break;
451
128k
    }
452
453
120k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
120k
#ifndef NO_TVNDX
455
120k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
120k
#endif
457
458
120k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
101k
      || ISTAG (in_class))
460
25.6k
    {
461
25.6k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
25.6k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
25.6k
    }
464
95.0k
  else
465
95.0k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
95.0k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
95.0k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
95.0k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
95.0k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
95.0k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
95.0k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
95.0k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
95.0k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
95.0k
    }
478
479
120k
  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
106k
  else
482
106k
    {
483
106k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
106k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
106k
    }
486
487
128k
 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
128k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
83.2k
{
409
83.2k
  AUXENT *ext = (AUXENT *) ext1;
410
83.2k
  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
83.2k
  switch (in_class)
417
83.2k
    {
418
3.98k
    case C_FILE:
419
3.98k
      if (ext->x_file.x_fname[0] == 0)
420
1.43k
  {
421
1.43k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.43k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.43k
  }
424
2.55k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.55k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
3.98k
      goto end;
430
431
3.90k
    case C_STAT:
432
3.90k
#ifdef C_LEAFSTAT
433
4.67k
    case C_LEAFSTAT:
434
4.67k
#endif
435
5.40k
    case C_HIDDEN:
436
5.40k
      if (type == T_NULL)
437
2.23k
  {
438
2.23k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
2.23k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
2.23k
    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.23k
    in->x_scn.x_checksum = 0;
445
2.23k
    in->x_scn.x_associated = 0;
446
2.23k
    in->x_scn.x_comdat = 0;
447
448
2.23k
    goto end;
449
2.23k
  }
450
3.16k
      break;
451
83.2k
    }
452
453
76.9k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
76.9k
#ifndef NO_TVNDX
455
76.9k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
76.9k
#endif
457
458
76.9k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
58.8k
      || ISTAG (in_class))
460
24.4k
    {
461
24.4k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
24.4k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
24.4k
    }
464
52.5k
  else
465
52.5k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
52.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
52.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
52.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
52.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
52.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
52.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
52.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
52.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
52.5k
    }
478
479
76.9k
  if (ISFCN (type))
480
16.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
60.5k
  else
482
60.5k
    {
483
60.5k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
60.5k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
60.5k
    }
486
487
83.2k
 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
83.2k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
216k
{
409
216k
  AUXENT *ext = (AUXENT *) ext1;
410
216k
  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
216k
  switch (in_class)
417
216k
    {
418
7.94k
    case C_FILE:
419
7.94k
      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
5.36k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
5.36k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.94k
      goto end;
430
431
3.75k
    case C_STAT:
432
3.75k
#ifdef C_LEAFSTAT
433
7.03k
    case C_LEAFSTAT:
434
7.03k
#endif
435
10.6k
    case C_HIDDEN:
436
10.6k
      if (type == T_NULL)
437
1.26k
  {
438
1.26k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.26k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.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
1.26k
    in->x_scn.x_checksum = 0;
445
1.26k
    in->x_scn.x_associated = 0;
446
1.26k
    in->x_scn.x_comdat = 0;
447
448
1.26k
    goto end;
449
1.26k
  }
450
9.41k
      break;
451
216k
    }
452
453
206k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
206k
#ifndef NO_TVNDX
455
206k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
206k
#endif
457
458
206k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
153k
      || ISTAG (in_class))
460
68.2k
    {
461
68.2k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
68.2k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
68.2k
    }
464
138k
  else
465
138k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
138k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
138k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
138k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
138k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
138k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
138k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
138k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
138k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
138k
    }
478
479
206k
  if (ISFCN (type))
480
46.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
160k
  else
482
160k
    {
483
160k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
160k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
160k
    }
486
487
216k
 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
216k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
69.1k
{
409
69.1k
  AUXENT *ext = (AUXENT *) ext1;
410
69.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
69.1k
  switch (in_class)
417
69.1k
    {
418
5.25k
    case C_FILE:
419
5.25k
      if (ext->x_file.x_fname[0] == 0)
420
2.91k
  {
421
2.91k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.91k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.91k
  }
424
2.33k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.33k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
5.25k
      goto end;
430
431
1.64k
    case C_STAT:
432
1.64k
#ifdef C_LEAFSTAT
433
2.83k
    case C_LEAFSTAT:
434
2.83k
#endif
435
3.47k
    case C_HIDDEN:
436
3.47k
      if (type == T_NULL)
437
547
  {
438
547
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
547
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
547
    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
547
    in->x_scn.x_checksum = 0;
445
547
    in->x_scn.x_associated = 0;
446
547
    in->x_scn.x_comdat = 0;
447
448
547
    goto end;
449
547
  }
450
2.93k
      break;
451
69.1k
    }
452
453
63.3k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
63.3k
#ifndef NO_TVNDX
455
63.3k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
63.3k
#endif
457
458
63.3k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
51.1k
      || ISTAG (in_class))
460
16.1k
    {
461
16.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
16.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
16.1k
    }
464
47.2k
  else
465
47.2k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
47.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
47.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
47.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
47.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
47.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
47.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
47.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
47.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
47.2k
    }
478
479
63.3k
  if (ISFCN (type))
480
10.6k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
52.7k
  else
482
52.7k
    {
483
52.7k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
52.7k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
52.7k
    }
486
487
69.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
69.1k
}
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.60k
{
503
1.60k
  union internal_auxent * in = (union internal_auxent *) inp;
504
1.60k
  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.60k
  memset (ext, 0, AUXESZ);
511
512
1.60k
  switch (in_class)
513
1.60k
    {
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
54
    case C_STAT:
528
54
#ifdef C_LEAFSTAT
529
54
    case C_LEAFSTAT:
530
54
#endif
531
166
    case C_HIDDEN:
532
166
      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
166
      break;
540
1.60k
    }
541
542
1.60k
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
1.60k
#ifndef NO_TVNDX
544
1.60k
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
1.60k
#endif
546
547
1.60k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
674
      || ISTAG (in_class))
549
931
    {
550
931
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
931
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
931
    }
553
674
  else
554
674
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
674
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
674
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
674
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
674
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
674
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
674
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
674
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
674
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
674
    }
567
568
1.60k
  if (ISFCN (type))
569
1.60k
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
773
  else
571
773
    {
572
773
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
773
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
773
    }
575
576
1.60k
 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.60k
  return AUXESZ;
581
1.60k
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
coff-sh.c:coff_swap_aux_out
Line
Count
Source
502
54
{
503
54
  union internal_auxent * in = (union internal_auxent *) inp;
504
54
  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
54
  memset (ext, 0, AUXESZ);
511
512
54
  switch (in_class)
513
54
    {
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
54
    case C_STAT:
528
54
#ifdef C_LEAFSTAT
529
54
    case C_LEAFSTAT:
530
54
#endif
531
54
    case C_HIDDEN:
532
54
      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
54
      break;
540
54
    }
541
542
54
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
54
#ifndef NO_TVNDX
544
54
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
54
#endif
546
547
54
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
51
      || ISTAG (in_class))
549
3
    {
550
3
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
3
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
3
    }
553
51
  else
554
51
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
51
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
51
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
51
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
51
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
51
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
51
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
51
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
51
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
51
    }
567
568
54
  if (ISFCN (type))
569
54
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
51
  else
571
51
    {
572
51
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
51
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
51
    }
575
576
54
 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
54
  return AUXESZ;
581
54
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
502
244
{
503
244
  union internal_auxent * in = (union internal_auxent *) inp;
504
244
  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
244
  memset (ext, 0, AUXESZ);
511
512
244
  switch (in_class)
513
244
    {
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
244
    }
541
542
244
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
244
#ifndef NO_TVNDX
544
244
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
244
#endif
546
547
244
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
224
      || ISTAG (in_class))
549
20
    {
550
20
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
20
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
20
    }
553
224
  else
554
224
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
224
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
224
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
224
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
224
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
224
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
224
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
224
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
224
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
224
    }
567
568
244
  if (ISFCN (type))
569
244
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
224
  else
571
224
    {
572
224
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
224
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
224
    }
575
576
244
 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
244
  return AUXESZ;
581
244
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
502
157
{
503
157
  union internal_auxent * in = (union internal_auxent *) inp;
504
157
  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
157
  memset (ext, 0, AUXESZ);
511
512
157
  switch (in_class)
513
157
    {
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
157
    }
541
542
157
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
157
#ifndef NO_TVNDX
544
157
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
157
#endif
546
547
157
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
157
      || ISTAG (in_class))
549
0
    {
550
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
0
    }
553
157
  else
554
157
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
157
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
157
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
157
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
157
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
157
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
157
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
157
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
157
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
157
    }
567
568
157
  if (ISFCN (type))
569
157
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
157
  else
571
157
    {
572
157
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
157
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
157
    }
575
576
157
 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
157
  return AUXESZ;
581
157
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
502
1.15k
{
503
1.15k
  union internal_auxent * in = (union internal_auxent *) inp;
504
1.15k
  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.15k
  memset (ext, 0, AUXESZ);
511
512
1.15k
  switch (in_class)
513
1.15k
    {
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
112
    case C_HIDDEN:
532
112
      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
112
      break;
540
1.15k
    }
541
542
1.15k
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
1.15k
#ifndef NO_TVNDX
544
1.15k
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
1.15k
#endif
546
547
1.15k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
242
      || ISTAG (in_class))
549
908
    {
550
908
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
908
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
908
    }
553
242
  else
554
242
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
242
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
242
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
242
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
242
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
242
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
242
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
242
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
242
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
242
    }
567
568
1.15k
  if (ISFCN (type))
569
1.15k
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
341
  else
571
341
    {
572
341
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
341
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
341
    }
575
576
1.15k
 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.15k
  return AUXESZ;
581
1.15k
}
Unexecuted instantiation: coff-z8k.c:coff_swap_aux_out
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
414k
{
590
414k
  LINENO *ext = (LINENO *) ext1;
591
414k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
414k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
414k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
414k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
589
75.3k
{
590
75.3k
  LINENO *ext = (LINENO *) ext1;
591
75.3k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
75.3k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
75.3k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
75.3k
}
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
89.1k
{
590
89.1k
  LINENO *ext = (LINENO *) ext1;
591
89.1k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
89.1k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
89.1k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
89.1k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
589
51.9k
{
590
51.9k
  LINENO *ext = (LINENO *) ext1;
591
51.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
51.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
51.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
51.9k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
589
56.2k
{
590
56.2k
  LINENO *ext = (LINENO *) ext1;
591
56.2k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
56.2k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
56.2k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
56.2k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
589
65.1k
{
590
65.1k
  LINENO *ext = (LINENO *) ext1;
591
65.1k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
65.1k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
65.1k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
65.1k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
589
29.9k
{
590
29.9k
  LINENO *ext = (LINENO *) ext1;
591
29.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
29.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
29.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
29.9k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
589
46.9k
{
590
46.9k
  LINENO *ext = (LINENO *) ext1;
591
46.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
46.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
46.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
46.9k
}
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
10.5k
{
613
10.5k
  AOUTHDR *aouthdr_ext;
614
10.5k
  struct internal_aouthdr *aouthdr_int;
615
616
10.5k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
10.5k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
10.5k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
10.5k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
10.5k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
10.5k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
10.5k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
10.5k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
10.5k
  aouthdr_int->text_start =
625
10.5k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
10.5k
  aouthdr_int->data_start =
627
10.5k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
721
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
716
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
1.43k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
1.43k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
1.43k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
1.43k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
1.43k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
1.43k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
1.43k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
1.43k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
1.43k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
1.43k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
721
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
721
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
716
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
716
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
947
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
947
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
947
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
947
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
947
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
947
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
947
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
479
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
479
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
479
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
479
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
10.5k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
612
479
{
613
479
  AOUTHDR *aouthdr_ext;
614
479
  struct internal_aouthdr *aouthdr_int;
615
616
479
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
479
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
479
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
479
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
479
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
479
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
479
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
479
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
479
  aouthdr_int->text_start =
625
479
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
479
  aouthdr_int->data_start =
627
479
    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
479
#ifdef ALPHAECOFF
665
479
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
479
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
479
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
479
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
479
#endif
670
479
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.23k
{
613
1.23k
  AOUTHDR *aouthdr_ext;
614
1.23k
  struct internal_aouthdr *aouthdr_int;
615
616
1.23k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.23k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.23k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.23k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.23k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.23k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.23k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.23k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.23k
  aouthdr_int->text_start =
625
1.23k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.23k
  aouthdr_int->data_start =
627
1.23k
    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.23k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
721
{
613
721
  AOUTHDR *aouthdr_ext;
614
721
  struct internal_aouthdr *aouthdr_int;
615
616
721
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
721
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
721
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
721
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
721
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
721
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
721
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
721
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
721
  aouthdr_int->text_start =
625
721
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
721
  aouthdr_int->data_start =
627
721
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
721
#ifdef RS6000COFF_C
630
721
#ifdef XCOFF64
631
721
  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
721
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
721
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
721
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
721
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
721
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
721
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
721
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
721
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
721
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
721
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
721
#ifdef XCOFF64
646
721
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
721
  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
721
#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
721
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
612
1.01k
{
613
1.01k
  AOUTHDR *aouthdr_ext;
614
1.01k
  struct internal_aouthdr *aouthdr_int;
615
616
1.01k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
1.01k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
1.01k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
1.01k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
1.01k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
1.01k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
1.01k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
1.01k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
1.01k
  aouthdr_int->text_start =
625
1.01k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
1.01k
  aouthdr_int->data_start =
627
1.01k
    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.01k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
612
633
{
613
633
  AOUTHDR *aouthdr_ext;
614
633
  struct internal_aouthdr *aouthdr_int;
615
616
633
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
633
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
633
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
633
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
633
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
633
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
633
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
633
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
633
  aouthdr_int->text_start =
625
633
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
633
  aouthdr_int->data_start =
627
633
    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
633
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
612
633
{
613
633
  AOUTHDR *aouthdr_ext;
614
633
  struct internal_aouthdr *aouthdr_int;
615
616
633
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
633
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
633
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
633
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
633
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
633
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
633
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
633
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
633
  aouthdr_int->text_start =
625
633
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
633
  aouthdr_int->data_start =
627
633
    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
633
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
612
947
{
613
947
  AOUTHDR *aouthdr_ext;
614
947
  struct internal_aouthdr *aouthdr_int;
615
616
947
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
947
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
947
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
947
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
947
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
947
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
947
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
947
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
947
  aouthdr_int->text_start =
625
947
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
947
  aouthdr_int->data_start =
627
947
    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
947
#ifdef MIPSECOFF
655
947
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
947
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
947
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
947
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
947
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
947
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
947
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
947
#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
947
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
716
{
613
716
  AOUTHDR *aouthdr_ext;
614
716
  struct internal_aouthdr *aouthdr_int;
615
616
716
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
716
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
716
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
716
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
716
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
716
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
716
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
716
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
716
  aouthdr_int->text_start =
625
716
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
716
  aouthdr_int->data_start =
627
716
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
716
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
716
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
716
#endif
635
716
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
716
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
716
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
716
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
716
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
716
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
716
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
716
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
716
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
716
  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
716
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
716
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
716
#endif
652
716
#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
716
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
612
763
{
613
763
  AOUTHDR *aouthdr_ext;
614
763
  struct internal_aouthdr *aouthdr_int;
615
616
763
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
763
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
763
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
763
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
763
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
763
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
763
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
763
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
763
  aouthdr_int->text_start =
625
763
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
763
  aouthdr_int->data_start =
627
763
    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
763
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
612
411
{
613
411
  AOUTHDR *aouthdr_ext;
614
411
  struct internal_aouthdr *aouthdr_int;
615
616
411
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
411
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
411
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
411
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
411
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
411
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
411
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
411
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
411
  aouthdr_int->text_start =
625
411
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
411
  aouthdr_int->data_start =
627
411
    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
411
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
612
592
{
613
592
  AOUTHDR *aouthdr_ext;
614
592
  struct internal_aouthdr *aouthdr_int;
615
616
592
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
592
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
592
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
592
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
592
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
592
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
592
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
592
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
592
  aouthdr_int->text_start =
625
592
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
592
  aouthdr_int->data_start =
627
592
    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
592
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
612
895
{
613
895
  AOUTHDR *aouthdr_ext;
614
895
  struct internal_aouthdr *aouthdr_int;
615
616
895
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
895
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
895
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
895
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
895
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
895
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
895
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
895
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
895
  aouthdr_int->text_start =
625
895
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
895
  aouthdr_int->data_start =
627
895
    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
895
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
612
499
{
613
499
  AOUTHDR *aouthdr_ext;
614
499
  struct internal_aouthdr *aouthdr_int;
615
616
499
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
499
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
499
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
499
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
499
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
499
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
499
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
499
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
499
  aouthdr_int->text_start =
625
499
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
499
  aouthdr_int->data_start =
627
499
    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
499
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
612
992
{
613
992
  AOUTHDR *aouthdr_ext;
614
992
  struct internal_aouthdr *aouthdr_int;
615
616
992
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
992
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
992
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
992
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
992
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
992
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
992
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
992
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
992
  aouthdr_int->text_start =
625
992
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
992
  aouthdr_int->data_start =
627
992
    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
992
}
671
672
static unsigned int
673
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
674
57
{
675
57
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
57
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
57
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
57
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
57
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
57
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
57
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
57
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
57
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
57
        aouthdr_out->text_start);
686
57
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
57
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
3
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
3
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
6
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
6
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
6
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
6
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
6
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
6
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
6
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
6
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
6
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
6
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
3
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
3
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
3
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
3
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
6
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
6
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
6
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
6
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
3
  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
31
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
31
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
31
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
31
  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
13
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
13
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
13
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
13
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
13
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
13
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
57
  return AOUTSZ;
747
57
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
674
13
{
675
13
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
13
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
13
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
13
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
13
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
13
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
13
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
13
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
13
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
13
        aouthdr_out->text_start);
686
13
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
13
        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
13
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
13
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
13
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
13
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
13
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
13
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
13
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
13
#endif
745
746
13
  return AOUTSZ;
747
13
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
674
2
{
675
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
2
        aouthdr_out->text_start);
686
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
2
        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
2
  return AOUTSZ;
747
2
}
coff64-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
674
3
{
675
3
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
3
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
3
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
3
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
3
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
3
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
3
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
3
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
3
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
3
        aouthdr_out->text_start);
686
3
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
3
        aouthdr_out->data_start);
688
689
3
#ifdef RS6000COFF_C
690
3
#ifdef XCOFF64
691
3
  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
3
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
3
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
3
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
3
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
3
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
3
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
3
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
3
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
3
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
3
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
3
#ifdef XCOFF64
706
3
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
3
  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
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
3
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
3
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
3
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
3
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
3
#ifdef XCOFF64
721
3
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
3
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
3
#endif
724
3
#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
3
  return AOUTSZ;
747
3
}
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
31
{
675
31
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
31
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
31
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
31
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
31
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
31
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
31
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
31
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
31
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
31
        aouthdr_out->text_start);
686
31
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
31
        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
31
#ifdef MIPSECOFF
727
31
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
31
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
31
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
31
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
31
#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
31
  return AOUTSZ;
747
31
}
coff-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
674
3
{
675
3
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
3
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
3
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
3
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
3
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
3
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
3
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
3
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
3
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
3
        aouthdr_out->text_start);
686
3
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
3
        aouthdr_out->data_start);
688
689
3
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
3
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
3
#endif
695
3
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
3
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
3
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
3
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
3
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
3
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
3
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
3
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
3
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
3
  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
3
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
3
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
3
#endif
712
  /* TODO: set o_*psize dynamically */
713
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
3
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
3
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
3
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
3
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
3
  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
3
#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
3
  return AOUTSZ;
747
3
}
Unexecuted instantiation: coff-sh.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
coff-tic30.c:coff_swap_aouthdr_out
Line
Count
Source
674
4
{
675
4
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
4
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
4
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
4
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
4
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
4
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
4
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
4
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
4
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
4
        aouthdr_out->text_start);
686
4
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
4
        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
4
  return AOUTSZ;
747
4
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aouthdr_out
coff-z80.c:coff_swap_aouthdr_out
Line
Count
Source
674
1
{
675
1
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
1
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
1
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
1
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
1
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
1
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
1
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
1
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
1
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
1
        aouthdr_out->text_start);
686
1
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
1
        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
1
  return AOUTSZ;
747
1
}
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_out
748
749
ATTRIBUTE_UNUSED
750
static void
751
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
752
1.27M
{
753
1.27M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
1.27M
  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.27M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
1.27M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
1.27M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
1.27M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
1.27M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
1.27M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
1.27M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
1.27M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
1.27M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
1.27M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
93.5k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
1.27M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
752
15.1k
{
753
15.1k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
15.1k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
15.1k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
15.1k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
15.1k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
15.1k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
15.1k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
15.1k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
15.1k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
15.1k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
15.1k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
15.1k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
15.1k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
752
116k
{
753
116k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
116k
  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
116k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
116k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
116k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
116k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
116k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
116k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
116k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
116k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
116k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
116k
  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
116k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
47.0k
{
753
47.0k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
47.0k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
47.0k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
47.0k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
47.0k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
47.0k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
47.0k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
47.0k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
47.0k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
47.0k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
47.0k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
47.0k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
47.0k
}
cf-i386lynx.c:coff_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
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
752
95.8k
{
753
95.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
95.8k
  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
95.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
95.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
95.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
95.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
95.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
95.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
95.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
95.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
95.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
95.8k
  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
95.8k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
752
166k
{
753
166k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
166k
  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
166k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
166k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
166k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
166k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
166k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
166k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
166k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
166k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
166k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
166k
  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
166k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
97.6k
{
753
97.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
97.6k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
97.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
97.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
97.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
97.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
97.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
97.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
97.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
97.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
97.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
97.6k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
97.6k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
752
116k
{
753
116k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
116k
  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
116k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
116k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
116k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
116k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
116k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
116k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
116k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
116k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
116k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
116k
  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
116k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
752
92.3k
{
753
92.3k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
92.3k
  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
92.3k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
92.3k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
92.3k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
92.3k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
92.3k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
92.3k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
92.3k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
92.3k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
92.3k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
92.3k
  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
92.3k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
752
93.5k
{
753
93.5k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
93.5k
  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
93.5k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
93.5k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
93.5k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
93.5k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
93.5k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
93.5k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
93.5k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
93.5k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
93.5k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
93.5k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
93.5k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
93.5k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
93.5k
#endif
774
93.5k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
752
135k
{
753
135k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
135k
  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
135k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
135k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
135k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
135k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
135k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
135k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
135k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
135k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
135k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
135k
  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
135k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
752
119k
{
753
119k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
119k
  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
119k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
119k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
119k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
119k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
119k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
119k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
119k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
119k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
119k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
119k
  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
119k
}
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
318
{
781
318
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
318
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
318
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
18
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
318
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
318
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
318
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
318
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
318
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
318
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
318
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
318
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
318
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
318
    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
318
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
318
    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
88
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
318
  return ret;
832
318
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Line
Count
Source
780
1
{
781
1
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
1
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
1
  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
1
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
1
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
1
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
1
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
1
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
1
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
1
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
1
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
1
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
1
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
1
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
1
    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
1
  return ret;
832
1
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
780
134
{
781
134
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
134
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
134
  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
134
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
134
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
134
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
134
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
134
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
134
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
134
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
134
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
134
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
134
    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
134
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
134
    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
134
  return ret;
832
134
}
coff64-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
70
{
781
70
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
70
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
70
  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
70
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
70
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
70
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
70
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
70
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
70
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
70
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
70
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
70
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
70
    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
70
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
70
    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
70
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
70
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
70
#endif
831
70
  return ret;
832
70
}
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
12
{
781
12
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
12
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
12
  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
12
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
12
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
12
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
12
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
12
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
12
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
12
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
12
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
12
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
12
    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
12
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
12
    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
12
  return ret;
832
12
}
Unexecuted instantiation: coff-rs6000.c:coff_swap_scnhdr_out
coff-sh.c:coff_swap_scnhdr_out
Line
Count
Source
780
2
{
781
2
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
2
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
2
  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
2
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
2
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
2
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
2
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
2
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
2
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
2
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
2
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
2
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
2
    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
2
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
2
    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
2
  return ret;
832
2
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
780
10
{
781
10
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
10
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
10
  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
10
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
10
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
10
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
10
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
10
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
10
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
10
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
10
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
10
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
10
    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
10
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
10
    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
10
  return ret;
832
10
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
780
18
{
781
18
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
18
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
18
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
18
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
18
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
18
#endif
788
18
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
18
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
18
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
18
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
18
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
18
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
18
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
18
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
18
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
18
    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
18
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
18
    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
18
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
18
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
18
#endif
831
18
  return ret;
832
18
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
780
71
{
781
71
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
71
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
71
  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
71
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
71
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
71
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
71
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
71
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
71
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
71
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
71
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
71
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
71
    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
71
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
71
    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
71
  return ret;
832
71
}
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out