Coverage Report

Created: 2026-04-04 08:16

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
170k
  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
170k
  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
85
  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
85
  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
516k
  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
436k
  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
868
  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
511
  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
8.53k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
10.0k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
10.0k
  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
139k
  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.16M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
43
#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
7.68k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
21
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
7.68k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
21
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
7.68k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
21
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
7.68k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
21
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
7.68k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
21
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
7.68k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
21
#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.32M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
227
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.32M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
227
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.24M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
163
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.32M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
227
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.32M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
227
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.32M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
227
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.25M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
229
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
165
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.25M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
229
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
165
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.30M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
165
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
10.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
10.6k
{
217
10.6k
  RELOC *reloc_src = (RELOC *) src;
218
10.6k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
10.6k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
10.6k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
10.6k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
1.19k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
10.6k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
357
{
217
357
  RELOC *reloc_src = (RELOC *) src;
218
357
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
357
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
357
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
357
  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
357
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
3.78k
{
217
3.78k
  RELOC *reloc_src = (RELOC *) src;
218
3.78k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
3.78k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
3.78k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
3.78k
  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.78k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
211
{
217
211
  RELOC *reloc_src = (RELOC *) src;
218
211
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
211
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
211
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
211
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
211
#ifdef SWAP_IN_RELOC_OFFSET
225
211
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
211
#endif
227
211
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
5.28k
{
217
5.28k
  RELOC *reloc_src = (RELOC *) src;
218
5.28k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
5.28k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
5.28k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
5.28k
  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.28k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
444
{
217
444
  RELOC *reloc_src = (RELOC *) src;
218
444
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
444
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
444
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
444
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
444
#ifdef SWAP_IN_RELOC_OFFSET
225
444
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
444
#endif
227
444
}
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
521
{
217
521
  RELOC *reloc_src = (RELOC *) src;
218
521
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
521
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
521
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
521
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
521
#ifdef SWAP_IN_RELOC_OFFSET
225
521
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
521
#endif
227
521
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
22
{
217
22
  RELOC *reloc_src = (RELOC *) src;
218
22
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
22
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
22
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
22
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
22
#ifdef SWAP_IN_RELOC_OFFSET
225
22
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
22
#endif
227
22
}
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
152
{
253
152
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
152
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
152
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
152
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
152
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
152
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
152
{
253
152
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
152
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
152
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
152
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
152
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
152
}
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.41M
{
281
2.41M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.41M
  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.41M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.41M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.41M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.41M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.41M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.41M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.41M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
649k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.41M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
109k
{
281
109k
  FILHDR *filehdr_src = (FILHDR *) src;
282
109k
  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
109k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
109k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
109k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
109k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
109k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
109k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
109k
  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
109k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
122k
{
281
122k
  FILHDR *filehdr_src = (FILHDR *) src;
282
122k
  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
122k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
122k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
122k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
122k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
122k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
122k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
122k
  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
122k
}
coff64-rs6000.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
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
121k
{
281
121k
  FILHDR *filehdr_src = (FILHDR *) src;
282
121k
  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
121k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
121k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
121k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
121k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
121k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
121k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
121k
  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
121k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
121k
{
281
121k
  FILHDR *filehdr_src = (FILHDR *) src;
282
121k
  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
121k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
121k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
121k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
121k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
121k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
121k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
121k
  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
121k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
121k
{
281
121k
  FILHDR *filehdr_src = (FILHDR *) src;
282
121k
  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
121k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
121k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
121k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
121k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
121k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
121k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
121k
  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
121k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
333k
{
281
333k
  FILHDR *filehdr_src = (FILHDR *) src;
282
333k
  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
333k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
333k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
333k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
333k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
333k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
333k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
333k
  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
333k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
73.2k
{
281
73.2k
  FILHDR *filehdr_src = (FILHDR *) src;
282
73.2k
  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
73.2k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
73.2k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
73.2k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
73.2k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
73.2k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
73.2k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
73.2k
  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
73.2k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
287k
{
281
287k
  FILHDR *filehdr_src = (FILHDR *) src;
282
287k
  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
287k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
287k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
287k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
287k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
287k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
287k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
287k
  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
287k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
2.74k
{
281
2.74k
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.74k
  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.74k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.74k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.74k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.74k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.74k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.74k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.74k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.74k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
110k
{
281
110k
  FILHDR *filehdr_src = (FILHDR *) src;
282
110k
  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
110k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
110k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
110k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
110k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
110k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
110k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
110k
  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
110k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
649k
{
281
649k
  FILHDR *filehdr_src = (FILHDR *) src;
282
649k
  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
649k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
649k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
649k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
649k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
649k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
649k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
649k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
649k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
649k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
649k
#endif
298
649k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
110k
{
281
110k
  FILHDR *filehdr_src = (FILHDR *) src;
282
110k
  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
110k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
110k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
110k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
110k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
110k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
110k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
110k
  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
110k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
106k
{
281
106k
  FILHDR *filehdr_src = (FILHDR *) src;
282
106k
  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
106k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
106k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
106k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
106k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
106k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
106k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
106k
  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
106k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
71
{
303
71
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
71
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
71
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
71
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
71
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
71
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
71
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
71
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
71
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
6
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
71
  return bfd_coff_filhsz (abfd);
321
71
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
302
27
{
303
27
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
27
  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
27
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
27
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
27
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
27
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
27
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
27
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
27
  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
27
  return bfd_coff_filhsz (abfd);
321
27
}
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
1
{
303
1
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
1
  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
1
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
1
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
1
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
1
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
1
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
1
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
1
  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
1
  return bfd_coff_filhsz (abfd);
321
1
}
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
16
{
303
16
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
16
  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
16
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
16
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
16
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
16
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
16
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
16
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
16
  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
16
  return bfd_coff_filhsz (abfd);
321
16
}
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
}
Unexecuted instantiation: coff-sh.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.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
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
302
6
{
303
6
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
6
  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
6
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
6
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
6
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
6
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
6
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
6
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
6
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
6
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
6
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
6
#endif
320
6
  return bfd_coff_filhsz (abfd);
321
6
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
302
8
{
303
8
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
8
  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
8
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
8
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
8
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
8
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
8
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
8
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
8
  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
8
  return bfd_coff_filhsz (abfd);
321
8
}
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
132k
{
328
132k
  SYMENT *ext = (SYMENT *) ext1;
329
132k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
132k
  if (ext->e.e_name[0] == 0)
332
83.4k
    {
333
83.4k
      in->_n._n_n._n_zeroes = 0;
334
83.4k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
83.4k
    }
336
49.0k
  else
337
49.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
49.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
49.0k
#endif
343
49.0k
    }
344
345
132k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
132k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
132k
  if (sizeof (ext->e_type) == 2)
348
132k
    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
132k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
132k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
17.0k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
132k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
27.1k
{
328
27.1k
  SYMENT *ext = (SYMENT *) ext1;
329
27.1k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
27.1k
  if (ext->e.e_name[0] == 0)
332
18.0k
    {
333
18.0k
      in->_n._n_n._n_zeroes = 0;
334
18.0k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
18.0k
    }
336
9.11k
  else
337
9.11k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
9.11k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
9.11k
#endif
343
9.11k
    }
344
345
27.1k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
27.1k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
27.1k
  if (sizeof (ext->e_type) == 2)
348
27.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
27.1k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
27.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
27.1k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_in
Unexecuted instantiation: coff-go32.c:coff_swap_sym_in
Unexecuted instantiation: coff-i386.c:coff_swap_sym_in
coff-sh.c:coff_swap_sym_in
Line
Count
Source
327
22.4k
{
328
22.4k
  SYMENT *ext = (SYMENT *) ext1;
329
22.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
22.4k
  if (ext->e.e_name[0] == 0)
332
13.8k
    {
333
13.8k
      in->_n._n_n._n_zeroes = 0;
334
13.8k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
13.8k
    }
336
8.56k
  else
337
8.56k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
8.56k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
8.56k
#endif
343
8.56k
    }
344
345
22.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
22.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
22.4k
  if (sizeof (ext->e_type) == 2)
348
22.4k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
22.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
22.4k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
22.4k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
24.8k
{
328
24.8k
  SYMENT *ext = (SYMENT *) ext1;
329
24.8k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
24.8k
  if (ext->e.e_name[0] == 0)
332
16.1k
    {
333
16.1k
      in->_n._n_n._n_zeroes = 0;
334
16.1k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
16.1k
    }
336
8.74k
  else
337
8.74k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
8.74k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
8.74k
#endif
343
8.74k
    }
344
345
24.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
24.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
24.8k
  if (sizeof (ext->e_type) == 2)
348
24.8k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
24.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
24.8k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
24.8k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
17.0k
{
328
17.0k
  SYMENT *ext = (SYMENT *) ext1;
329
17.0k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
17.0k
  if (ext->e.e_name[0] == 0)
332
10.1k
    {
333
10.1k
      in->_n._n_n._n_zeroes = 0;
334
10.1k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
10.1k
    }
336
6.94k
  else
337
6.94k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
6.94k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
6.94k
#endif
343
6.94k
    }
344
345
17.0k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
17.0k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
17.0k
  if (sizeof (ext->e_type) == 2)
348
17.0k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
17.0k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
17.0k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
17.0k
#ifdef COFF_ADJUST_SYM_IN_POST
354
17.0k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
17.0k
#endif
356
17.0k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
30.2k
{
328
30.2k
  SYMENT *ext = (SYMENT *) ext1;
329
30.2k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
30.2k
  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
12.0k
  else
337
12.0k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
12.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
12.0k
#endif
343
12.0k
    }
344
345
30.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
30.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
30.2k
  if (sizeof (ext->e_type) == 2)
348
30.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
30.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
30.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
30.2k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
10.7k
{
328
10.7k
  SYMENT *ext = (SYMENT *) ext1;
329
10.7k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
10.7k
  if (ext->e.e_name[0] == 0)
332
7.18k
    {
333
7.18k
      in->_n._n_n._n_zeroes = 0;
334
7.18k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
7.18k
    }
336
3.57k
  else
337
3.57k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
3.57k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
3.57k
#endif
343
3.57k
    }
344
345
10.7k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
10.7k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
10.7k
  if (sizeof (ext->e_type) == 2)
348
10.7k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
10.7k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
10.7k
  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
10.7k
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
680
{
361
680
  struct internal_syment *in = (struct internal_syment *) inp;
362
680
  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
680
  if (in->_n._n_name[0] == 0)
369
614
    {
370
614
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
614
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
614
    }
373
66
  else
374
66
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
66
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
66
#endif
380
66
    }
381
382
680
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
680
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
680
  if (sizeof (ext->e_type) == 2)
386
680
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
680
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
680
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
680
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
474
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
680
  return SYMESZ;
398
680
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_sym_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out
Unexecuted instantiation: coff-go32.c:coff_swap_sym_out
Unexecuted instantiation: coff-i386.c:coff_swap_sym_out
Unexecuted instantiation: coff-sh.c:coff_swap_sym_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
360
171
{
361
171
  struct internal_syment *in = (struct internal_syment *) inp;
362
171
  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
171
  if (in->_n._n_name[0] == 0)
369
142
    {
370
142
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
142
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
142
    }
373
29
  else
374
29
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
29
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
29
#endif
380
29
    }
381
382
171
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
171
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
171
  if (sizeof (ext->e_type) == 2)
386
171
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
171
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
171
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
171
  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
171
  return SYMESZ;
398
171
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
360
474
{
361
474
  struct internal_syment *in = (struct internal_syment *) inp;
362
474
  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
474
  if (in->_n._n_name[0] == 0)
369
464
    {
370
464
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
464
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
464
    }
373
10
  else
374
10
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
10
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
10
#endif
380
10
    }
381
382
474
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
474
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
474
  if (sizeof (ext->e_type) == 2)
386
474
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
474
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
474
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
474
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
474
#ifdef COFF_ADJUST_SYM_OUT_POST
394
474
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
474
#endif
396
397
474
  return SYMESZ;
398
474
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
360
35
{
361
35
  struct internal_syment *in = (struct internal_syment *) inp;
362
35
  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
35
  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
27
  else
374
27
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
27
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
27
#endif
380
27
    }
381
382
35
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
35
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
35
  if (sizeof (ext->e_type) == 2)
386
35
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
35
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
35
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
35
  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
35
  return SYMESZ;
398
35
}
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
672k
{
409
672k
  AUXENT *ext = (AUXENT *) ext1;
410
672k
  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
672k
  switch (in_class)
417
672k
    {
418
31.9k
    case C_FILE:
419
31.9k
      if (ext->x_file.x_fname[0] == 0)
420
13.6k
  {
421
13.6k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
13.6k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
13.6k
  }
424
18.3k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
18.3k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
31.9k
      goto end;
430
431
17.5k
    case C_STAT:
432
17.5k
#ifdef C_LEAFSTAT
433
28.7k
    case C_LEAFSTAT:
434
28.7k
#endif
435
35.8k
    case C_HIDDEN:
436
35.8k
      if (type == T_NULL)
437
10.0k
  {
438
10.0k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
10.0k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
10.0k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
441
442
    /* PE defines some extra fields; we zero them out for
443
       safety.  */
444
10.0k
    in->x_scn.x_checksum = 0;
445
10.0k
    in->x_scn.x_associated = 0;
446
10.0k
    in->x_scn.x_comdat = 0;
447
448
10.0k
    goto end;
449
10.0k
  }
450
25.8k
      break;
451
672k
    }
452
453
630k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
630k
#ifndef NO_TVNDX
455
630k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
630k
#endif
457
458
630k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
501k
      || ISTAG (in_class))
460
170k
    {
461
170k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
170k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
170k
    }
464
459k
  else
465
459k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
459k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
459k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
459k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
459k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
459k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
459k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
459k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
459k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
459k
    }
478
479
630k
  if (ISFCN (type))
480
113k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
516k
  else
482
516k
    {
483
516k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
516k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
516k
    }
486
487
672k
 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
672k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
84.5k
{
409
84.5k
  AUXENT *ext = (AUXENT *) ext1;
410
84.5k
  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
84.5k
  switch (in_class)
417
84.5k
    {
418
6.19k
    case C_FILE:
419
6.19k
      if (ext->x_file.x_fname[0] == 0)
420
3.10k
  {
421
3.10k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.10k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.10k
  }
424
3.09k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.09k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
6.19k
      goto end;
430
431
2.50k
    case C_STAT:
432
2.50k
#ifdef C_LEAFSTAT
433
3.24k
    case C_LEAFSTAT:
434
3.24k
#endif
435
3.94k
    case C_HIDDEN:
436
3.94k
      if (type == T_NULL)
437
1.54k
  {
438
1.54k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.54k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.54k
    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.54k
    in->x_scn.x_checksum = 0;
445
1.54k
    in->x_scn.x_associated = 0;
446
1.54k
    in->x_scn.x_comdat = 0;
447
448
1.54k
    goto end;
449
1.54k
  }
450
2.39k
      break;
451
84.5k
    }
452
453
76.7k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
76.7k
#ifndef NO_TVNDX
455
76.7k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
76.7k
#endif
457
458
76.7k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
63.6k
      || ISTAG (in_class))
460
19.3k
    {
461
19.3k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
19.3k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
19.3k
    }
464
57.4k
  else
465
57.4k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
57.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
57.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
57.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
57.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
57.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
57.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
57.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
57.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
57.4k
    }
478
479
76.7k
  if (ISFCN (type))
480
12.2k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
64.5k
  else
482
64.5k
    {
483
64.5k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
64.5k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
64.5k
    }
486
487
84.5k
 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
84.5k
}
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
78.6k
{
409
78.6k
  AUXENT *ext = (AUXENT *) ext1;
410
78.6k
  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
78.6k
  switch (in_class)
417
78.6k
    {
418
6.32k
    case C_FILE:
419
6.32k
      if (ext->x_file.x_fname[0] == 0)
420
2.37k
  {
421
2.37k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.37k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.37k
  }
424
3.94k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.94k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
6.32k
      goto end;
430
431
1.91k
    case C_STAT:
432
1.91k
#ifdef C_LEAFSTAT
433
3.24k
    case C_LEAFSTAT:
434
3.24k
#endif
435
4.83k
    case C_HIDDEN:
436
4.83k
      if (type == T_NULL)
437
1.10k
  {
438
1.10k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.10k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.10k
    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.10k
    in->x_scn.x_checksum = 0;
445
1.10k
    in->x_scn.x_associated = 0;
446
1.10k
    in->x_scn.x_comdat = 0;
447
448
1.10k
    goto end;
449
1.10k
  }
450
3.73k
      break;
451
78.6k
    }
452
453
71.1k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
71.1k
#ifndef NO_TVNDX
455
71.1k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
71.1k
#endif
457
458
71.1k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
57.6k
      || ISTAG (in_class))
460
19.0k
    {
461
19.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
19.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
19.0k
    }
464
52.1k
  else
465
52.1k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
52.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
52.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
52.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
52.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
52.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
52.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
52.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
52.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
52.1k
    }
478
479
71.1k
  if (ISFCN (type))
480
12.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
59.1k
  else
482
59.1k
    {
483
59.1k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
59.1k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
59.1k
    }
486
487
78.6k
 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
78.6k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
116k
{
409
116k
  AUXENT *ext = (AUXENT *) ext1;
410
116k
  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
116k
  switch (in_class)
417
116k
    {
418
5.79k
    case C_FILE:
419
5.79k
      if (ext->x_file.x_fname[0] == 0)
420
2.56k
  {
421
2.56k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.56k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.56k
  }
424
3.22k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
3.22k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
5.79k
      goto end;
430
431
5.18k
    case C_STAT:
432
5.18k
#ifdef C_LEAFSTAT
433
6.15k
    case C_LEAFSTAT:
434
6.15k
#endif
435
7.44k
    case C_HIDDEN:
436
7.44k
      if (type == T_NULL)
437
3.89k
  {
438
3.89k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
3.89k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
3.89k
    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
3.89k
    in->x_scn.x_checksum = 0;
445
3.89k
    in->x_scn.x_associated = 0;
446
3.89k
    in->x_scn.x_comdat = 0;
447
448
3.89k
    goto end;
449
3.89k
  }
450
3.54k
      break;
451
116k
    }
452
453
106k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
106k
#ifndef NO_TVNDX
455
106k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
106k
#endif
457
458
106k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
88.9k
      || ISTAG (in_class))
460
24.3k
    {
461
24.3k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
24.3k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
24.3k
    }
464
82.5k
  else
465
82.5k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
82.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
82.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
82.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
82.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
82.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
82.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
82.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
82.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
82.5k
    }
478
479
106k
  if (ISFCN (type))
480
14.9k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
91.9k
  else
482
91.9k
    {
483
91.9k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
91.9k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
91.9k
    }
486
487
116k
 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
116k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
98.9k
{
409
98.9k
  AUXENT *ext = (AUXENT *) ext1;
410
98.9k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
98.9k
  switch (in_class)
417
98.9k
    {
418
3.88k
    case C_FILE:
419
3.88k
      if (ext->x_file.x_fname[0] == 0)
420
1.67k
  {
421
1.67k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.67k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.67k
  }
424
2.21k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
2.21k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
3.88k
      goto end;
430
431
3.00k
    case C_STAT:
432
3.00k
#ifdef C_LEAFSTAT
433
3.77k
    case C_LEAFSTAT:
434
3.77k
#endif
435
4.43k
    case C_HIDDEN:
436
4.43k
      if (type == T_NULL)
437
1.51k
  {
438
1.51k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.51k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.51k
    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.51k
    in->x_scn.x_checksum = 0;
445
1.51k
    in->x_scn.x_associated = 0;
446
1.51k
    in->x_scn.x_comdat = 0;
447
448
1.51k
    goto end;
449
1.51k
  }
450
2.92k
      break;
451
98.9k
    }
452
453
93.5k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
93.5k
#ifndef NO_TVNDX
455
93.5k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
93.5k
#endif
457
458
93.5k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
78.6k
      || ISTAG (in_class))
460
21.0k
    {
461
21.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
21.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
21.0k
    }
464
72.5k
  else
465
72.5k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
72.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
72.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
72.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
72.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
72.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
72.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
72.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
72.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
72.5k
    }
478
479
93.5k
  if (ISFCN (type))
480
13.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
80.1k
  else
482
80.1k
    {
483
80.1k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
80.1k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
80.1k
    }
486
487
98.9k
 end: ;
488
489
#ifdef COFF_ADJUST_AUX_IN_POST
490
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
491
#endif
492
98.9k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
241k
{
409
241k
  AUXENT *ext = (AUXENT *) ext1;
410
241k
  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
241k
  switch (in_class)
417
241k
    {
418
7.63k
    case C_FILE:
419
7.63k
      if (ext->x_file.x_fname[0] == 0)
420
2.86k
  {
421
2.86k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
2.86k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
2.86k
  }
424
4.77k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
4.77k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
7.63k
      goto end;
430
431
3.48k
    case C_STAT:
432
3.48k
#ifdef C_LEAFSTAT
433
10.2k
    case C_LEAFSTAT:
434
10.2k
#endif
435
12.4k
    case C_HIDDEN:
436
12.4k
      if (type == T_NULL)
437
1.41k
  {
438
1.41k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
1.41k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
1.41k
    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.41k
    in->x_scn.x_checksum = 0;
445
1.41k
    in->x_scn.x_associated = 0;
446
1.41k
    in->x_scn.x_comdat = 0;
447
448
1.41k
    goto end;
449
1.41k
  }
450
11.0k
      break;
451
241k
    }
452
453
232k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
232k
#ifndef NO_TVNDX
455
232k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
232k
#endif
457
458
232k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
173k
      || ISTAG (in_class))
460
73.9k
    {
461
73.9k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
73.9k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
73.9k
    }
464
159k
  else
465
159k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
159k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
159k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
159k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
159k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
159k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
159k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
159k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
159k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
159k
    }
478
479
232k
  if (ISFCN (type))
480
51.8k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
181k
  else
482
181k
    {
483
181k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
181k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
181k
    }
486
487
241k
 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
241k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
51.2k
{
409
51.2k
  AUXENT *ext = (AUXENT *) ext1;
410
51.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
51.2k
  switch (in_class)
417
51.2k
    {
418
2.10k
    case C_FILE:
419
2.10k
      if (ext->x_file.x_fname[0] == 0)
420
1.02k
  {
421
1.02k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
1.02k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
1.02k
  }
424
1.07k
      else
425
#if FILNMLEN != E_FILNMLEN
426
#error we need to cope with truncating or extending x_fname
427
#endif
428
1.07k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
429
2.10k
      goto end;
430
431
1.47k
    case C_STAT:
432
1.47k
#ifdef C_LEAFSTAT
433
2.05k
    case C_LEAFSTAT:
434
2.05k
#endif
435
2.77k
    case C_HIDDEN:
436
2.77k
      if (type == T_NULL)
437
569
  {
438
569
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
439
569
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
440
569
    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
569
    in->x_scn.x_checksum = 0;
445
569
    in->x_scn.x_associated = 0;
446
569
    in->x_scn.x_comdat = 0;
447
448
569
    goto end;
449
569
  }
450
2.20k
      break;
451
51.2k
    }
452
453
48.5k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
454
48.5k
#ifndef NO_TVNDX
455
48.5k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
456
48.5k
#endif
457
458
48.5k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
459
38.7k
      || ISTAG (in_class))
460
12.7k
    {
461
12.7k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
462
12.7k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
463
12.7k
    }
464
35.7k
  else
465
35.7k
    {
466
#if DIMNUM != E_DIMNUM
467
#error we need to cope with truncating or extending DIMNUM
468
#endif
469
35.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
470
35.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
471
35.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
472
35.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
473
35.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
474
35.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
475
35.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
476
35.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
477
35.7k
    }
478
479
48.5k
  if (ISFCN (type))
480
8.55k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
481
40.0k
  else
482
40.0k
    {
483
40.0k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
484
40.0k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
485
40.0k
    }
486
487
51.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
51.2k
}
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
923
{
503
923
  union internal_auxent * in = (union internal_auxent *) inp;
504
923
  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
923
  memset (ext, 0, AUXESZ);
511
512
923
  switch (in_class)
513
923
    {
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
923
    }
541
542
923
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
923
#ifndef NO_TVNDX
544
923
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
923
#endif
546
547
923
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
868
      || ISTAG (in_class))
549
85
    {
550
85
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
85
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
85
    }
553
838
  else
554
838
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
838
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
838
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
838
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
838
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
838
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
838
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
838
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
838
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
838
    }
567
568
923
  if (ISFCN (type))
569
923
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
868
  else
571
868
    {
572
868
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
868
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
868
    }
575
576
923
 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
923
  return AUXESZ;
581
923
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
Unexecuted instantiation: coff-sh.c:coff_swap_aux_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
502
306
{
503
306
  union internal_auxent * in = (union internal_auxent *) inp;
504
306
  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
306
  memset (ext, 0, AUXESZ);
511
512
306
  switch (in_class)
513
306
    {
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
306
    }
541
542
306
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
306
#ifndef NO_TVNDX
544
306
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
306
#endif
546
547
306
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
296
      || ISTAG (in_class))
549
10
    {
550
10
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
10
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
10
    }
553
296
  else
554
296
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
296
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
296
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
296
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
296
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
296
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
296
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
296
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
296
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
296
    }
567
568
306
  if (ISFCN (type))
569
306
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
296
  else
571
296
    {
572
296
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
296
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
296
    }
575
576
306
 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
306
  return AUXESZ;
581
306
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
502
402
{
503
402
  union internal_auxent * in = (union internal_auxent *) inp;
504
402
  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
402
  memset (ext, 0, AUXESZ);
511
512
402
  switch (in_class)
513
402
    {
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
402
    }
541
542
402
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
402
#ifndef NO_TVNDX
544
402
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
402
#endif
546
547
402
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
357
      || ISTAG (in_class))
549
45
    {
550
45
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
45
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
45
    }
553
357
  else
554
357
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
357
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
357
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
357
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
357
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
357
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
357
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
357
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
357
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
357
    }
567
568
402
  if (ISFCN (type))
569
402
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
357
  else
571
357
    {
572
357
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
357
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
357
    }
575
576
402
 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
402
  return AUXESZ;
581
402
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
502
215
{
503
215
  union internal_auxent * in = (union internal_auxent *) inp;
504
215
  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
215
  memset (ext, 0, AUXESZ);
511
512
215
  switch (in_class)
513
215
    {
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
215
    }
541
542
215
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
543
215
#ifndef NO_TVNDX
544
215
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
545
215
#endif
546
547
215
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
548
215
      || ISTAG (in_class))
549
30
    {
550
30
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
551
30
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
552
30
    }
553
185
  else
554
185
    {
555
#if DIMNUM != E_DIMNUM
556
#error we need to cope with truncating or extending DIMNUM
557
#endif
558
185
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
559
185
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
560
185
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
561
185
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
562
185
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
563
185
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
564
185
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
565
185
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
566
185
    }
567
568
215
  if (ISFCN (type))
569
215
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
570
215
  else
571
215
    {
572
215
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
573
215
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
574
215
    }
575
576
215
 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
215
  return AUXESZ;
581
215
}
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
354k
{
590
354k
  LINENO *ext = (LINENO *) ext1;
591
354k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
354k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
354k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
354k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
589
63.8k
{
590
63.8k
  LINENO *ext = (LINENO *) ext1;
591
63.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
63.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
63.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
63.8k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_in
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_in
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_in
coff-rs6000.c:coff_swap_lineno_in
Line
Count
Source
589
77.1k
{
590
77.1k
  LINENO *ext = (LINENO *) ext1;
591
77.1k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
77.1k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
77.1k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
77.1k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
589
42.7k
{
590
42.7k
  LINENO *ext = (LINENO *) ext1;
591
42.7k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
42.7k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
42.7k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
42.7k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
589
48.5k
{
590
48.5k
  LINENO *ext = (LINENO *) ext1;
591
48.5k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
48.5k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
48.5k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
48.5k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
589
61.9k
{
590
61.9k
  LINENO *ext = (LINENO *) ext1;
591
61.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
61.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
61.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
61.9k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
589
26.9k
{
590
26.9k
  LINENO *ext = (LINENO *) ext1;
591
26.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
26.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
26.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
26.9k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
589
32.8k
{
590
32.8k
  LINENO *ext = (LINENO *) ext1;
591
32.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
592
593
32.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
594
32.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
595
32.8k
}
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
8.50k
{
613
8.50k
  AOUTHDR *aouthdr_ext;
614
8.50k
  struct internal_aouthdr *aouthdr_int;
615
616
8.50k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
8.50k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
8.50k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
8.50k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
8.50k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
8.50k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
8.50k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
8.50k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
8.50k
  aouthdr_int->text_start =
625
8.50k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
8.50k
  aouthdr_int->data_start =
627
8.50k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
544
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
534
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
#endif
635
1.07k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
1.07k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
1.07k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
1.07k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
1.07k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
1.07k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
1.07k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
1.07k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
1.07k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
1.07k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
#ifdef XCOFF64
646
544
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
544
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
648
#else
649
534
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
534
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
#endif
652
#endif
653
654
#ifdef MIPSECOFF
655
846
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
846
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
846
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
846
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
846
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
846
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
846
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
#endif
663
664
#ifdef ALPHAECOFF
665
277
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
277
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
277
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
277
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
#endif
670
8.50k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
612
277
{
613
277
  AOUTHDR *aouthdr_ext;
614
277
  struct internal_aouthdr *aouthdr_int;
615
616
277
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
277
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
277
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
277
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
277
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
277
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
277
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
277
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
277
  aouthdr_int->text_start =
625
277
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
277
  aouthdr_int->data_start =
627
277
    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
277
#ifdef ALPHAECOFF
665
277
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
666
277
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
667
277
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
668
277
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
669
277
#endif
670
277
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
612
987
{
613
987
  AOUTHDR *aouthdr_ext;
614
987
  struct internal_aouthdr *aouthdr_int;
615
616
987
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
987
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
987
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
987
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
987
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
987
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
987
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
987
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
987
  aouthdr_int->text_start =
625
987
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
987
  aouthdr_int->data_start =
627
987
    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
987
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
544
{
613
544
  AOUTHDR *aouthdr_ext;
614
544
  struct internal_aouthdr *aouthdr_int;
615
616
544
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
544
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
544
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
544
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
544
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
544
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
544
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
544
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
544
  aouthdr_int->text_start =
625
544
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
544
  aouthdr_int->data_start =
627
544
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
544
#ifdef RS6000COFF_C
630
544
#ifdef XCOFF64
631
544
  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
544
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
544
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
544
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
544
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
544
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
544
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
544
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
544
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
544
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
544
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
645
544
#ifdef XCOFF64
646
544
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
647
544
  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
544
#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
544
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
612
929
{
613
929
  AOUTHDR *aouthdr_ext;
614
929
  struct internal_aouthdr *aouthdr_int;
615
616
929
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
929
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
929
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
929
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
929
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
929
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
929
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
929
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
929
  aouthdr_int->text_start =
625
929
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
929
  aouthdr_int->data_start =
627
929
    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
929
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
612
608
{
613
608
  AOUTHDR *aouthdr_ext;
614
608
  struct internal_aouthdr *aouthdr_int;
615
616
608
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
608
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
608
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
608
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
608
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
608
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
608
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
608
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
608
  aouthdr_int->text_start =
625
608
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
608
  aouthdr_int->data_start =
627
608
    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
608
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
612
608
{
613
608
  AOUTHDR *aouthdr_ext;
614
608
  struct internal_aouthdr *aouthdr_int;
615
616
608
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
608
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
608
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
608
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
608
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
608
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
608
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
608
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
608
  aouthdr_int->text_start =
625
608
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
608
  aouthdr_int->data_start =
627
608
    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
608
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
612
846
{
613
846
  AOUTHDR *aouthdr_ext;
614
846
  struct internal_aouthdr *aouthdr_int;
615
616
846
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
846
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
846
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
846
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
846
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
846
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
846
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
846
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
846
  aouthdr_int->text_start =
625
846
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
846
  aouthdr_int->data_start =
627
846
    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
846
#ifdef MIPSECOFF
655
846
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
656
846
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
657
846
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
658
846
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
659
846
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
660
846
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
661
846
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
662
846
#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
846
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
612
534
{
613
534
  AOUTHDR *aouthdr_ext;
614
534
  struct internal_aouthdr *aouthdr_int;
615
616
534
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
534
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
534
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
534
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
534
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
534
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
534
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
534
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
534
  aouthdr_int->text_start =
625
534
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
534
  aouthdr_int->data_start =
627
534
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
628
629
534
#ifdef RS6000COFF_C
630
#ifdef XCOFF64
631
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
632
#else
633
534
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
634
534
#endif
635
534
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
636
534
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
637
534
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
638
534
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
639
534
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
640
534
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
641
534
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
642
534
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
643
534
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
644
534
  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
534
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
650
534
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
651
534
#endif
652
534
#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
534
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
612
596
{
613
596
  AOUTHDR *aouthdr_ext;
614
596
  struct internal_aouthdr *aouthdr_int;
615
616
596
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
596
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
596
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
596
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
596
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
596
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
596
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
596
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
596
  aouthdr_int->text_start =
625
596
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
596
  aouthdr_int->data_start =
627
596
    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
596
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
612
340
{
613
340
  AOUTHDR *aouthdr_ext;
614
340
  struct internal_aouthdr *aouthdr_int;
615
616
340
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
340
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
340
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
340
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
340
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
340
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
340
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
340
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
340
  aouthdr_int->text_start =
625
340
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
340
  aouthdr_int->data_start =
627
340
    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
340
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
612
401
{
613
401
  AOUTHDR *aouthdr_ext;
614
401
  struct internal_aouthdr *aouthdr_int;
615
616
401
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
401
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
401
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
401
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
401
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
401
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
401
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
401
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
401
  aouthdr_int->text_start =
625
401
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
401
  aouthdr_int->data_start =
627
401
    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
401
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
612
705
{
613
705
  AOUTHDR *aouthdr_ext;
614
705
  struct internal_aouthdr *aouthdr_int;
615
616
705
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
705
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
705
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
705
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
705
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
705
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
705
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
705
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
705
  aouthdr_int->text_start =
625
705
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
705
  aouthdr_int->data_start =
627
705
    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
705
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
612
311
{
613
311
  AOUTHDR *aouthdr_ext;
614
311
  struct internal_aouthdr *aouthdr_int;
615
616
311
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
311
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
311
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
311
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
311
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
311
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
311
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
311
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
311
  aouthdr_int->text_start =
625
311
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
311
  aouthdr_int->data_start =
627
311
    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
311
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
612
820
{
613
820
  AOUTHDR *aouthdr_ext;
614
820
  struct internal_aouthdr *aouthdr_int;
615
616
820
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
617
820
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
618
820
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
619
820
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
620
820
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
621
820
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
622
820
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
623
820
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
624
820
  aouthdr_int->text_start =
625
820
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
626
820
  aouthdr_int->data_start =
627
820
    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
820
}
671
672
static unsigned int
673
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
674
49
{
675
49
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
49
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
49
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
49
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
49
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
49
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
49
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
49
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
49
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
49
        aouthdr_out->text_start);
686
49
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
49
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
1
  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
4
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
4
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
4
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
4
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
4
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
4
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
4
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
4
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
4
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
4
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
1
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
1
  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
4
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
4
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
4
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
4
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
4
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
4
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
4
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
1
  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
16
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
16
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
16
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
16
  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
27
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
27
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
27
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
27
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
27
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
27
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
49
  return AOUTSZ;
747
49
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
674
27
{
675
27
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
27
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
27
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
27
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
27
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
27
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
27
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
27
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
27
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
27
        aouthdr_out->text_start);
686
27
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
27
        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
27
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
27
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
27
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
27
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
27
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
27
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
27
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
27
#endif
745
746
27
  return AOUTSZ;
747
27
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aouthdr_out
coff64-rs6000.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
1
#ifdef RS6000COFF_C
690
1
#ifdef XCOFF64
691
1
  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
1
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
1
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
1
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
1
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
1
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
1
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
1
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
1
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
1
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
1
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
1
#ifdef XCOFF64
706
1
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
1
  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
1
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
1
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
1
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
1
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
1
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
1
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
1
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
1
#ifdef XCOFF64
721
1
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
1
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
1
#endif
724
1
#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: 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
16
{
675
16
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
676
16
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
677
678
16
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
679
16
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
680
16
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
681
16
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
682
16
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
683
16
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
684
16
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
685
16
        aouthdr_out->text_start);
686
16
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
687
16
        aouthdr_out->data_start);
688
689
#ifdef RS6000COFF_C
690
#ifdef XCOFF64
691
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
692
#else
693
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
694
#endif
695
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
696
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
697
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
698
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
699
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
700
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
701
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
702
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
703
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
704
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
705
#ifdef XCOFF64
706
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
707
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
708
#else
709
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
710
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
711
#endif
712
  /* TODO: set o_*psize dynamically */
713
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
716
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
717
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
719
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
720
#ifdef XCOFF64
721
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
722
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
723
#endif
724
#endif
725
726
16
#ifdef MIPSECOFF
727
16
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
728
16
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
729
16
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
730
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
731
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
732
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
733
16
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
734
16
#endif
735
736
#ifdef ALPHAECOFF
737
  /* FIXME: What does bldrev mean?  */
738
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
739
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
740
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
744
#endif
745
746
16
  return AOUTSZ;
747
16
}
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
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
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_out
748
749
ATTRIBUTE_UNUSED
750
static void
751
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
752
1.21M
{
753
1.21M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
1.21M
  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.21M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
1.21M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
1.21M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
1.21M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
1.21M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
1.21M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
1.21M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
1.21M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
1.21M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
1.21M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
89.2k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
1.21M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
752
15.0k
{
753
15.0k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
15.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
15.0k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
15.0k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
15.0k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
15.0k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
15.0k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
15.0k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
15.0k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
15.0k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
15.0k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
15.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
15.0k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
752
104k
{
753
104k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
104k
  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
104k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
104k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
104k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
104k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
104k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
104k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
104k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
104k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
104k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
104k
  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
104k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
44.8k
{
753
44.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
44.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
44.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
44.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
44.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
44.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
44.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
44.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
44.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
44.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
44.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
44.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
44.8k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
752
167k
{
753
167k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
167k
  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
167k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
167k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
167k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
167k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
167k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
167k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
167k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
167k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
167k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
167k
  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
167k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
752
91.7k
{
753
91.7k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
91.7k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
91.7k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
91.7k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
91.7k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
91.7k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
91.7k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
91.7k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
91.7k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
91.7k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
91.7k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
91.7k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
91.7k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
752
158k
{
753
158k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
158k
  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
158k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
158k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
158k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
158k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
158k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
158k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
158k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
158k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
158k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
158k
  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
158k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
752
84.8k
{
753
84.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
84.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
84.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
84.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
84.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
84.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
84.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
84.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
84.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
84.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
84.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
84.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
84.8k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
752
121k
{
753
121k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
121k
  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
121k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
121k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
121k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
121k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
121k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
121k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
121k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
121k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
121k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
121k
  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
121k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
752
95.7k
{
753
95.7k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
95.7k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
95.7k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
95.7k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
95.7k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
95.7k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
95.7k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
95.7k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
95.7k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
95.7k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
95.7k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
95.7k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
#endif
774
95.7k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
752
89.2k
{
753
89.2k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
89.2k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
755
756
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
757
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
758
#endif
759
89.2k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
89.2k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
89.2k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
89.2k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
89.2k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
89.2k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
89.2k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
89.2k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
89.2k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
89.2k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
771
89.2k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
772
89.2k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
773
89.2k
#endif
774
89.2k
}
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
111k
{
753
111k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
754
111k
  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
111k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
760
761
111k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
762
111k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
763
111k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
764
765
111k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
766
111k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
767
111k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
768
111k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
769
111k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
770
111k
  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
111k
}
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
229
{
781
229
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
229
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
229
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
64
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
#endif
788
229
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
229
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
229
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
229
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
229
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
229
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
229
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
229
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
229
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
229
    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
229
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
229
    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
64
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
#endif
831
229
  return ret;
832
229
}
coff-alpha.c:alpha_ecoff_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
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
780
13
{
781
13
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
13
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
13
  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
13
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
13
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
13
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
13
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
13
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
13
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
13
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
13
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
13
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
13
    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
13
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
13
    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
13
  return ret;
832
13
}
Unexecuted instantiation: coff64-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_scnhdr_out
coff-mips.c:mips_ecoff_swap_scnhdr_out
Line
Count
Source
780
3
{
781
3
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
3
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
3
  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
3
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
3
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
3
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
3
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
3
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
3
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
3
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
3
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
3
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
3
    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
3
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
3
    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
3
  return ret;
832
3
}
coff-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
780
86
{
781
86
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
86
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
86
  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
86
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
86
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
86
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
86
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
86
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
86
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
86
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
86
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
86
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
86
    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
86
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
86
    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
86
  return ret;
832
86
}
Unexecuted instantiation: coff-sh.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
780
42
{
781
42
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
42
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
42
  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
42
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
42
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
42
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
42
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
42
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
42
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
42
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
42
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
42
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
42
    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
42
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
42
    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
42
  return ret;
832
42
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
780
64
{
781
64
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
64
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
64
  unsigned int ret = bfd_coff_scnhsz (abfd);
784
785
64
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
786
64
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
787
64
#endif
788
64
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
64
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
64
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
64
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
64
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
64
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
64
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
64
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
64
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
64
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
799
0
  else
800
0
    {
801
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
802
803
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
804
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
805
0
      _bfd_error_handler
806
  /* xgettext:c-format */
807
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
808
0
   abfd, buf, scnhdr_int->s_nlnno);
809
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
810
0
    }
811
812
64
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
64
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
814
0
  else
815
0
    {
816
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
817
818
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
819
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
820
      /* xgettext:c-format */
821
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
822
0
        abfd, buf, scnhdr_int->s_nreloc);
823
0
      bfd_set_error (bfd_error_file_truncated);
824
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
825
0
      ret = 0;
826
0
    }
827
828
64
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
829
64
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
830
64
#endif
831
64
  return ret;
832
64
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
780
19
{
781
19
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
782
19
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
783
19
  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
19
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
789
790
19
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
791
19
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
792
19
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
793
19
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
794
19
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
795
19
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
796
19
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
797
19
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
798
19
    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
19
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
813
19
    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
19
  return ret;
832
19
}
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out