Coverage Report

Created: 2026-09-14 08:07

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
197k
  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
197k
  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
265
  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
265
  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
555k
  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
496k
  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
699
  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
602
  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
20.8k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
21.9k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
21.9k
  H_GET_16 (abfd, ext->x_scn.x_nlinno)
75
#endif
76
#ifndef PUT_SCN_SCNLEN
77
#define PUT_SCN_SCNLEN(abfd, in, ext) \
78
2
  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
9
  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
9
  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
95.7k
  H_GET_16 (abfd, ext->l_lnno);
91
#endif
92
#ifndef PUT_LINENO_LNNO
93
#define PUT_LINENO_LNNO(abfd, val, ext) \
94
0
  H_PUT_16 (abfd, val, ext->l_lnno);
95
#endif
96
97
/* The f_symptr field in the filehdr is sometimes 64 bits.  */
98
#ifndef GET_FILEHDR_SYMPTR
99
3.57M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
359
#define PUT_FILEHDR_SYMPTR H_PUT_32
103
#endif
104
105
/* Some fields in the aouthdr are sometimes 64 bits.  */
106
#ifndef GET_AOUTHDR_TSIZE
107
10.9k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
208
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
10.9k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
208
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
10.9k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
208
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
10.9k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
208
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
10.9k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
208
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
10.9k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
208
#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.44M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
972
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.44M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
972
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.35M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
890
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.44M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
972
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.44M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
972
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.44M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
972
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.36M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
997
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
915
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.36M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
997
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
915
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.41M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
935
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
15.6k
#define GET_RELOC_VADDR H_GET_32
207
#endif
208
#ifndef PUT_RELOC_VADDR
209
6
#define PUT_RELOC_VADDR H_PUT_32
210
#endif
211
212
#ifndef NO_COFF_RELOCS
213
214
static void
215
coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
216
15.4k
{
217
15.4k
  RELOC *reloc_src = src;
218
15.4k
  struct internal_reloc *reloc_dst = dst;
219
220
15.4k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
15.4k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
15.4k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
15.4k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
#ifdef SWAP_IN_RELOC_OFFSET
226
4.17k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
#endif
228
15.4k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
922
{
217
922
  RELOC *reloc_src = src;
218
922
  struct internal_reloc *reloc_dst = dst;
219
220
922
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
922
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
922
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
922
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
#ifdef SWAP_IN_RELOC_OFFSET
226
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
#endif
228
922
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
4.58k
{
217
4.58k
  RELOC *reloc_src = src;
218
4.58k
  struct internal_reloc *reloc_dst = dst;
219
220
4.58k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
4.58k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
4.58k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
4.58k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
#ifdef SWAP_IN_RELOC_OFFSET
226
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
#endif
228
4.58k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
515
{
217
515
  RELOC *reloc_src = src;
218
515
  struct internal_reloc *reloc_dst = dst;
219
220
515
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
515
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
515
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
515
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
515
#ifdef SWAP_IN_RELOC_OFFSET
226
515
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
515
#endif
228
515
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
5.73k
{
217
5.73k
  RELOC *reloc_src = src;
218
5.73k
  struct internal_reloc *reloc_dst = dst;
219
220
5.73k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
5.73k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
5.73k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
5.73k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
#ifdef SWAP_IN_RELOC_OFFSET
226
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
#endif
228
5.73k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
2.31k
{
217
2.31k
  RELOC *reloc_src = src;
218
2.31k
  struct internal_reloc *reloc_dst = dst;
219
220
2.31k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
2.31k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
2.31k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
2.31k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
2.31k
#ifdef SWAP_IN_RELOC_OFFSET
226
2.31k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
2.31k
#endif
228
2.31k
}
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
1.10k
{
217
1.10k
  RELOC *reloc_src = src;
218
1.10k
  struct internal_reloc *reloc_dst = dst;
219
220
1.10k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
1.10k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
1.10k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
1.10k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
1.10k
#ifdef SWAP_IN_RELOC_OFFSET
226
1.10k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
1.10k
#endif
228
1.10k
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
235
{
217
235
  RELOC *reloc_src = src;
218
235
  struct internal_reloc *reloc_dst = dst;
219
220
235
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
235
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
235
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
235
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
235
#ifdef SWAP_IN_RELOC_OFFSET
226
235
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
235
#endif
228
235
}
229
230
static unsigned int
231
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
232
6
{
233
6
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
234
6
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
235
236
6
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
237
6
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
238
6
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
239
240
#ifdef SWAP_OUT_RELOC_OFFSET
241
3
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
242
#endif
243
#ifdef SWAP_OUT_RELOC_EXTRA
244
3
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
245
#endif
246
247
6
  return bfd_coff_relsz (abfd);
248
6
}
coff-x86_64.c:coff_swap_reloc_out
Line
Count
Source
232
3
{
233
3
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
234
3
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
235
236
3
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
237
3
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
238
3
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
239
240
#ifdef SWAP_OUT_RELOC_OFFSET
241
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
242
#endif
243
#ifdef SWAP_OUT_RELOC_EXTRA
244
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
245
#endif
246
247
3
  return bfd_coff_relsz (abfd);
248
3
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out
Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
coff-z8k.c:coff_swap_reloc_out
Line
Count
Source
232
3
{
233
3
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
234
3
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
235
236
3
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
237
3
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
238
3
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
239
240
3
#ifdef SWAP_OUT_RELOC_OFFSET
241
3
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
242
3
#endif
243
3
#ifdef SWAP_OUT_RELOC_EXTRA
244
3
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
245
3
#endif
246
247
3
  return bfd_coff_relsz (abfd);
248
3
}
249
250
#ifdef TICOFF
251
static void
252
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
253
260
{
254
260
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
255
260
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
256
257
260
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
258
260
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
259
260
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
260
260
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
253
260
{
254
260
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
255
260
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
256
257
260
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
258
260
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
259
260
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
260
260
}
261
262
static unsigned int
263
coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst)
264
0
{
265
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
266
0
  struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst;
267
268
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
269
0
  H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
270
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
271
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
272
273
0
  return bfd_coff_relsz (abfd);
274
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out
275
#endif
276
277
#endif /* NO_COFF_RELOCS */
278
279
static void
280
coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
281
4.02M
{
282
4.02M
  FILHDR *filehdr_src = (FILHDR *) src;
283
4.02M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
4.02M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
4.02M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
4.02M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
4.02M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
4.02M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
4.02M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
4.02M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
1.07M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
4.02M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
281
179k
{
282
179k
  FILHDR *filehdr_src = (FILHDR *) src;
283
179k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
179k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
179k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
179k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
179k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
179k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
179k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
179k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
179k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
281
204k
{
282
204k
  FILHDR *filehdr_src = (FILHDR *) src;
283
204k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
204k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
204k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
204k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
204k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
204k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
204k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
204k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
204k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
281
274k
{
282
274k
  FILHDR *filehdr_src = (FILHDR *) src;
283
274k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
274k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
274k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
274k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
274k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
274k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
274k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
274k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
274k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
281
203k
{
282
203k
  FILHDR *filehdr_src = (FILHDR *) src;
283
203k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
203k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
203k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
203k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
203k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
203k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
203k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
203k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
203k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
281
203k
{
282
203k
  FILHDR *filehdr_src = (FILHDR *) src;
283
203k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
203k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
203k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
203k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
203k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
203k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
203k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
203k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
203k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
281
203k
{
282
203k
  FILHDR *filehdr_src = (FILHDR *) src;
283
203k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
203k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
203k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
203k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
203k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
203k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
203k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
203k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
203k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
281
549k
{
282
549k
  FILHDR *filehdr_src = (FILHDR *) src;
283
549k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
549k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
549k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
549k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
549k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
549k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
549k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
549k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
549k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
281
139k
{
282
139k
  FILHDR *filehdr_src = (FILHDR *) src;
283
139k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
139k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
139k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
139k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
139k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
139k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
139k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
139k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
139k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
281
444k
{
282
444k
  FILHDR *filehdr_src = (FILHDR *) src;
283
444k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
444k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
444k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
444k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
444k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
444k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
444k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
444k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
444k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
281
3.55k
{
282
3.55k
  FILHDR *filehdr_src = (FILHDR *) src;
283
3.55k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
3.55k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
3.55k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
3.55k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
3.55k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
3.55k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
3.55k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
3.55k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
3.55k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
281
182k
{
282
182k
  FILHDR *filehdr_src = (FILHDR *) src;
283
182k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
182k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
182k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
182k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
182k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
182k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
182k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
182k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
182k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
281
1.07M
{
282
1.07M
  FILHDR *filehdr_src = (FILHDR *) src;
283
1.07M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
1.07M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
1.07M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
1.07M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
1.07M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
1.07M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
1.07M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
1.07M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
1.07M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
1.07M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
1.07M
#endif
299
1.07M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
281
182k
{
282
182k
  FILHDR *filehdr_src = (FILHDR *) src;
283
182k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
182k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
182k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
182k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
182k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
182k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
182k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
182k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
182k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
281
180k
{
282
180k
  FILHDR *filehdr_src = (FILHDR *) src;
283
180k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
284
285
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
286
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
287
#endif
288
180k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
180k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
180k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
180k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
180k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
180k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
180k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
180k
}
300
301
static  unsigned int
302
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
303
437
{
304
437
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
437
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
437
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
437
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
437
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
437
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
437
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
437
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
437
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
33
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
437
  return bfd_coff_filhsz (abfd);
322
437
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
303
28
{
304
28
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
28
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
28
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
28
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
28
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
28
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
28
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
28
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
28
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
28
  return bfd_coff_filhsz (abfd);
322
28
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
303
44
{
304
44
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
44
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
44
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
44
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
44
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
44
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
44
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
44
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
44
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
44
  return bfd_coff_filhsz (abfd);
322
44
}
coff64-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
303
50
{
304
50
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
50
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
50
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
50
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
50
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
50
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
50
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
50
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
50
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
50
  return bfd_coff_filhsz (abfd);
322
50
}
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
303
66
{
304
66
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
66
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
66
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
66
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
66
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
66
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
66
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
66
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
66
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
66
  return bfd_coff_filhsz (abfd);
322
66
}
coff-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
303
64
{
304
64
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
64
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
64
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
64
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
64
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
64
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
64
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
64
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
64
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
64
  return bfd_coff_filhsz (abfd);
322
64
}
coff-sh.c:coff_swap_filehdr_out
Line
Count
Source
303
42
{
304
42
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
42
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
42
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
42
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
42
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
42
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
42
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
42
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
42
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
42
  return bfd_coff_filhsz (abfd);
322
42
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.c:coff_swap_filehdr_out
Line
Count
Source
303
44
{
304
44
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
44
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
44
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
44
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
44
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
44
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
44
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
44
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
44
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
44
  return bfd_coff_filhsz (abfd);
322
44
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
303
33
{
304
33
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
33
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
33
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
33
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
33
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
33
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
33
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
33
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
33
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
33
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
33
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
33
#endif
321
33
  return bfd_coff_filhsz (abfd);
322
33
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
303
22
{
304
22
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
22
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
22
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
22
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
22
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
22
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
22
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
22
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
22
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
22
  return bfd_coff_filhsz (abfd);
322
22
}
coff-z8k.c:coff_swap_filehdr_out
Line
Count
Source
303
44
{
304
44
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
44
  FILHDR *filehdr_out = (FILHDR *) out;
306
307
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
308
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
309
#endif
310
44
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
44
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
44
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
44
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
44
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
44
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
44
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
44
  return bfd_coff_filhsz (abfd);
322
44
}
323
324
#ifndef NO_COFF_SYMBOLS
325
326
static void
327
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
328
189k
{
329
189k
  SYMENT *ext = (SYMENT *) ext1;
330
189k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
189k
  if (ext->e.e_name[0] == 0)
333
116k
    {
334
116k
      in->_n._n_n._n_zeroes = 0;
335
116k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
116k
    }
337
73.1k
  else
338
73.1k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
73.1k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
73.1k
#endif
344
73.1k
    }
345
346
189k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
189k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
189k
  if (sizeof (ext->e_type) == 2)
349
189k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
189k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
189k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
18.6k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
189k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
328
36.1k
{
329
36.1k
  SYMENT *ext = (SYMENT *) ext1;
330
36.1k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
36.1k
  if (ext->e.e_name[0] == 0)
333
23.0k
    {
334
23.0k
      in->_n._n_n._n_zeroes = 0;
335
23.0k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
23.0k
    }
337
13.1k
  else
338
13.1k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
13.1k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
13.1k
#endif
344
13.1k
    }
345
346
36.1k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
36.1k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
36.1k
  if (sizeof (ext->e_type) == 2)
349
36.1k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
36.1k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
36.1k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
36.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
328
28.8k
{
329
28.8k
  SYMENT *ext = (SYMENT *) ext1;
330
28.8k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
28.8k
  if (ext->e.e_name[0] == 0)
333
17.6k
    {
334
17.6k
      in->_n._n_n._n_zeroes = 0;
335
17.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
17.6k
    }
337
11.2k
  else
338
11.2k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
11.2k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
11.2k
#endif
344
11.2k
    }
345
346
28.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
28.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
28.8k
  if (sizeof (ext->e_type) == 2)
349
28.8k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
28.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
28.8k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
28.8k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
328
55.7k
{
329
55.7k
  SYMENT *ext = (SYMENT *) ext1;
330
55.7k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
55.7k
  if (ext->e.e_name[0] == 0)
333
34.2k
    {
334
34.2k
      in->_n._n_n._n_zeroes = 0;
335
34.2k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
34.2k
    }
337
21.5k
  else
338
21.5k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
21.5k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
21.5k
#endif
344
21.5k
    }
345
346
55.7k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
55.7k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
55.7k
  if (sizeof (ext->e_type) == 2)
349
55.7k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
55.7k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
55.7k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
55.7k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
328
18.6k
{
329
18.6k
  SYMENT *ext = (SYMENT *) ext1;
330
18.6k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
18.6k
  if (ext->e.e_name[0] == 0)
333
10.6k
    {
334
10.6k
      in->_n._n_n._n_zeroes = 0;
335
10.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
10.6k
    }
337
8.02k
  else
338
8.02k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
8.02k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
8.02k
#endif
344
8.02k
    }
345
346
18.6k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
18.6k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
18.6k
  if (sizeof (ext->e_type) == 2)
349
18.6k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
18.6k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
18.6k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
18.6k
#ifdef COFF_ADJUST_SYM_IN_POST
355
18.6k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
18.6k
#endif
357
18.6k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
328
32.4k
{
329
32.4k
  SYMENT *ext = (SYMENT *) ext1;
330
32.4k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
32.4k
  if (ext->e.e_name[0] == 0)
333
19.6k
    {
334
19.6k
      in->_n._n_n._n_zeroes = 0;
335
19.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
19.6k
    }
337
12.8k
  else
338
12.8k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
12.8k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
12.8k
#endif
344
12.8k
    }
345
346
32.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
32.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
32.4k
  if (sizeof (ext->e_type) == 2)
349
32.4k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
32.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
32.4k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
32.4k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
328
17.8k
{
329
17.8k
  SYMENT *ext = (SYMENT *) ext1;
330
17.8k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
17.8k
  if (ext->e.e_name[0] == 0)
333
11.3k
    {
334
11.3k
      in->_n._n_n._n_zeroes = 0;
335
11.3k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
11.3k
    }
337
6.47k
  else
338
6.47k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
6.47k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
6.47k
#endif
344
6.47k
    }
345
346
17.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
17.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
17.8k
  if (sizeof (ext->e_type) == 2)
349
17.8k
    in->n_type = H_GET_16 (abfd, ext->e_type);
350
0
  else
351
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
352
17.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
17.8k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
17.8k
}
358
359
static unsigned int
360
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
361
1.09k
{
362
1.09k
  struct internal_syment *in = (struct internal_syment *) inp;
363
1.09k
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
1.09k
  if (in->_n._n_name[0] == 0)
370
931
    {
371
931
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
931
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
931
    }
374
159
  else
375
159
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
159
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
159
#endif
381
159
    }
382
383
1.09k
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
1.09k
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
1.09k
  if (sizeof (ext->e_type) == 2)
387
1.09k
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
1.09k
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
1.09k
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
1.09k
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
416
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
1.09k
  return SYMESZ;
399
1.09k
}
coff-x86_64.c:coff_swap_sym_out
Line
Count
Source
361
40
{
362
40
  struct internal_syment *in = (struct internal_syment *) inp;
363
40
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
40
  if (in->_n._n_name[0] == 0)
370
7
    {
371
7
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
7
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
7
    }
374
33
  else
375
33
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
33
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
33
#endif
381
33
    }
382
383
40
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
40
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
40
  if (sizeof (ext->e_type) == 2)
387
40
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
40
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
40
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
40
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
40
  return SYMESZ;
399
40
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out
Unexecuted instantiation: coff-go32.c:coff_swap_sym_out
Unexecuted instantiation: coff-i386.c:coff_swap_sym_out
coff-sh.c:coff_swap_sym_out
Line
Count
Source
361
24
{
362
24
  struct internal_syment *in = (struct internal_syment *) inp;
363
24
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
24
  if (in->_n._n_name[0] == 0)
370
12
    {
371
12
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
12
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
12
    }
374
12
  else
375
12
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
12
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
12
#endif
381
12
    }
382
383
24
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
24
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
24
  if (sizeof (ext->e_type) == 2)
387
24
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
24
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
24
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
24
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
24
  return SYMESZ;
399
24
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
361
52
{
362
52
  struct internal_syment *in = (struct internal_syment *) inp;
363
52
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
52
  if (in->_n._n_name[0] == 0)
370
30
    {
371
30
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
30
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
30
    }
374
22
  else
375
22
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
22
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
22
#endif
381
22
    }
382
383
52
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
52
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
52
  if (sizeof (ext->e_type) == 2)
387
52
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
52
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
52
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
52
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
52
  return SYMESZ;
399
52
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
361
416
{
362
416
  struct internal_syment *in = (struct internal_syment *) inp;
363
416
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
416
  if (in->_n._n_name[0] == 0)
370
391
    {
371
391
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
391
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
391
    }
374
25
  else
375
25
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
25
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
25
#endif
381
25
    }
382
383
416
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
416
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
416
  if (sizeof (ext->e_type) == 2)
387
416
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
416
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
416
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
416
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
416
#ifdef COFF_ADJUST_SYM_OUT_POST
395
416
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
416
#endif
397
398
416
  return SYMESZ;
399
416
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
361
144
{
362
144
  struct internal_syment *in = (struct internal_syment *) inp;
363
144
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
144
  if (in->_n._n_name[0] == 0)
370
104
    {
371
104
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
104
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
104
    }
374
40
  else
375
40
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
40
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
40
#endif
381
40
    }
382
383
144
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
144
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
144
  if (sizeof (ext->e_type) == 2)
387
144
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
144
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
144
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
144
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
144
  return SYMESZ;
399
144
}
coff-z8k.c:coff_swap_sym_out
Line
Count
Source
361
414
{
362
414
  struct internal_syment *in = (struct internal_syment *) inp;
363
414
  SYMENT *ext =(SYMENT *) extp;
364
365
#ifdef COFF_ADJUST_SYM_OUT_PRE
366
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
367
#endif
368
369
414
  if (in->_n._n_name[0] == 0)
370
387
    {
371
387
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
387
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
387
    }
374
27
  else
375
27
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
27
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
27
#endif
381
27
    }
382
383
414
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
414
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
414
  if (sizeof (ext->e_type) == 2)
387
414
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
414
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
414
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
414
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
414
  return SYMESZ;
399
414
}
400
401
static void
402
coff_swap_aux_in (bfd *abfd,
403
      void * ext1,
404
      int type,
405
      int in_class,
406
      int indx ATTRIBUTE_UNUSED,
407
      int numaux ATTRIBUTE_UNUSED,
408
      void * in1)
409
779k
{
410
779k
  AUXENT *ext = (AUXENT *) ext1;
411
779k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
779k
  switch (in_class)
418
779k
    {
419
64.0k
    case C_FILE:
420
64.0k
      if (ext->x_file.x_fname[0] == 0)
421
28.1k
  {
422
28.1k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
28.1k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
28.1k
  }
425
35.9k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
35.9k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
64.0k
      goto end;
431
432
42.3k
    case C_STAT:
433
42.3k
#ifdef C_LEAFSTAT
434
59.0k
    case C_LEAFSTAT:
435
59.0k
#endif
436
73.8k
    case C_HIDDEN:
437
73.8k
      if (type == T_NULL)
438
21.9k
  {
439
21.9k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
21.9k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
21.9k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
21.9k
    in->x_scn.x_checksum = 0;
446
21.9k
    in->x_scn.x_associated = 0;
447
21.9k
    in->x_scn.x_comdat = 0;
448
449
21.9k
    goto end;
450
21.9k
  }
451
51.8k
      break;
452
779k
    }
453
454
693k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
693k
#ifndef NO_TVNDX
456
693k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
693k
#endif
458
459
693k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
538k
      || ISTAG (in_class))
461
197k
    {
462
197k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
197k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
197k
    }
465
496k
  else
466
496k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
496k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
496k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
496k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
496k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
496k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
496k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
496k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
496k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
496k
    }
479
480
693k
  if (ISFCN (type))
481
138k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
555k
  else
483
555k
    {
484
555k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
555k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
555k
    }
487
488
779k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
779k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
409
96.7k
{
410
96.7k
  AUXENT *ext = (AUXENT *) ext1;
411
96.7k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
96.7k
  switch (in_class)
418
96.7k
    {
419
5.75k
    case C_FILE:
420
5.75k
      if (ext->x_file.x_fname[0] == 0)
421
2.70k
  {
422
2.70k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
2.70k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
2.70k
  }
425
3.05k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
3.05k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
5.75k
      goto end;
431
432
2.95k
    case C_STAT:
433
2.95k
#ifdef C_LEAFSTAT
434
4.61k
    case C_LEAFSTAT:
435
4.61k
#endif
436
6.61k
    case C_HIDDEN:
437
6.61k
      if (type == T_NULL)
438
2.21k
  {
439
2.21k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
2.21k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
2.21k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
2.21k
    in->x_scn.x_checksum = 0;
446
2.21k
    in->x_scn.x_associated = 0;
447
2.21k
    in->x_scn.x_comdat = 0;
448
449
2.21k
    goto end;
450
2.21k
  }
451
4.40k
      break;
452
96.7k
    }
453
454
88.7k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
88.7k
#ifndef NO_TVNDX
456
88.7k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
88.7k
#endif
458
459
88.7k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
71.2k
      || ISTAG (in_class))
461
24.0k
    {
462
24.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
24.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
24.0k
    }
465
64.7k
  else
466
64.7k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
64.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
64.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
64.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
64.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
64.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
64.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
64.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
64.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
64.7k
    }
479
480
88.7k
  if (ISFCN (type))
481
16.3k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
72.4k
  else
483
72.4k
    {
484
72.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
72.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
72.4k
    }
487
488
96.7k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
96.7k
}
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
409
98.8k
{
410
98.8k
  AUXENT *ext = (AUXENT *) ext1;
411
98.8k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
98.8k
  switch (in_class)
418
98.8k
    {
419
19.2k
    case C_FILE:
420
19.2k
      if (ext->x_file.x_fname[0] == 0)
421
6.89k
  {
422
6.89k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
6.89k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
6.89k
  }
425
12.3k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
12.3k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
19.2k
      goto end;
431
432
1.54k
    case C_STAT:
433
1.54k
#ifdef C_LEAFSTAT
434
2.89k
    case C_LEAFSTAT:
435
2.89k
#endif
436
4.40k
    case C_HIDDEN:
437
4.40k
      if (type == T_NULL)
438
725
  {
439
725
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
725
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
725
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
725
    in->x_scn.x_checksum = 0;
446
725
    in->x_scn.x_associated = 0;
447
725
    in->x_scn.x_comdat = 0;
448
449
725
    goto end;
450
725
  }
451
3.68k
      break;
452
98.8k
    }
453
454
78.7k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
78.7k
#ifndef NO_TVNDX
456
78.7k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
78.7k
#endif
458
459
78.7k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
58.7k
      || ISTAG (in_class))
461
26.5k
    {
462
26.5k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
26.5k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
26.5k
    }
465
52.2k
  else
466
52.2k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
52.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
52.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
52.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
52.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
52.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
52.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
52.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
52.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
52.2k
    }
479
480
78.7k
  if (ISFCN (type))
481
18.3k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
60.4k
  else
483
60.4k
    {
484
60.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
60.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
60.4k
    }
487
488
98.8k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
98.8k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
409
159k
{
410
159k
  AUXENT *ext = (AUXENT *) ext1;
411
159k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
159k
  switch (in_class)
418
159k
    {
419
9.11k
    case C_FILE:
420
9.11k
      if (ext->x_file.x_fname[0] == 0)
421
3.30k
  {
422
3.30k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
3.30k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
3.30k
  }
425
5.80k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
5.80k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
9.11k
      goto end;
431
432
21.0k
    case C_STAT:
433
21.0k
#ifdef C_LEAFSTAT
434
24.5k
    case C_LEAFSTAT:
435
24.5k
#endif
436
25.9k
    case C_HIDDEN:
437
25.9k
      if (type == T_NULL)
438
15.5k
  {
439
15.5k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
15.5k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
15.5k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
15.5k
    in->x_scn.x_checksum = 0;
446
15.5k
    in->x_scn.x_associated = 0;
447
15.5k
    in->x_scn.x_comdat = 0;
448
449
15.5k
    goto end;
450
15.5k
  }
451
10.4k
      break;
452
159k
    }
453
454
135k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
135k
#ifndef NO_TVNDX
456
135k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
135k
#endif
458
459
135k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
113k
      || ISTAG (in_class))
461
29.9k
    {
462
29.9k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
29.9k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
29.9k
    }
465
105k
  else
466
105k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
105k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
105k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
105k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
105k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
105k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
105k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
105k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
105k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
105k
    }
479
480
135k
  if (ISFCN (type))
481
19.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
116k
  else
483
116k
    {
484
116k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
116k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
116k
    }
487
488
159k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
159k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
409
81.1k
{
410
81.1k
  AUXENT *ext = (AUXENT *) ext1;
411
81.1k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
81.1k
  switch (in_class)
418
81.1k
    {
419
5.67k
    case C_FILE:
420
5.67k
      if (ext->x_file.x_fname[0] == 0)
421
2.42k
  {
422
2.42k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
2.42k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
2.42k
  }
425
3.24k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
3.24k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
5.67k
      goto end;
431
432
2.04k
    case C_STAT:
433
2.04k
#ifdef C_LEAFSTAT
434
2.73k
    case C_LEAFSTAT:
435
2.73k
#endif
436
4.63k
    case C_HIDDEN:
437
4.63k
      if (type == T_NULL)
438
1.04k
  {
439
1.04k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
1.04k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
1.04k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
1.04k
    in->x_scn.x_checksum = 0;
446
1.04k
    in->x_scn.x_associated = 0;
447
1.04k
    in->x_scn.x_comdat = 0;
448
449
1.04k
    goto end;
450
1.04k
  }
451
3.59k
      break;
452
81.1k
    }
453
454
74.4k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
74.4k
#ifndef NO_TVNDX
456
74.4k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
74.4k
#endif
458
459
74.4k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
58.0k
      || ISTAG (in_class))
461
21.1k
    {
462
21.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
21.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
21.1k
    }
465
53.3k
  else
466
53.3k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
53.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
53.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
53.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
53.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
53.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
53.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
53.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
53.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
53.3k
    }
479
480
74.4k
  if (ISFCN (type))
481
15.2k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
59.1k
  else
483
59.1k
    {
484
59.1k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
59.1k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
59.1k
    }
487
488
81.1k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
81.1k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
409
254k
{
410
254k
  AUXENT *ext = (AUXENT *) ext1;
411
254k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
254k
  switch (in_class)
418
254k
    {
419
11.9k
    case C_FILE:
420
11.9k
      if (ext->x_file.x_fname[0] == 0)
421
6.39k
  {
422
6.39k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
6.39k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
6.39k
  }
425
5.52k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
5.52k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
11.9k
      goto end;
431
432
12.1k
    case C_STAT:
433
12.1k
#ifdef C_LEAFSTAT
434
20.1k
    case C_LEAFSTAT:
435
20.1k
#endif
436
27.1k
    case C_HIDDEN:
437
27.1k
      if (type == T_NULL)
438
1.42k
  {
439
1.42k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
1.42k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
1.42k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
1.42k
    in->x_scn.x_checksum = 0;
446
1.42k
    in->x_scn.x_associated = 0;
447
1.42k
    in->x_scn.x_comdat = 0;
448
449
1.42k
    goto end;
450
1.42k
  }
451
25.6k
      break;
452
254k
    }
453
454
241k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
241k
#ifndef NO_TVNDX
456
241k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
241k
#endif
458
459
241k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
183k
      || ISTAG (in_class))
461
68.8k
    {
462
68.8k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
68.8k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
68.8k
    }
465
172k
  else
466
172k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
172k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
172k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
172k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
172k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
172k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
172k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
172k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
172k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
172k
    }
479
480
241k
  if (ISFCN (type))
481
52.1k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
189k
  else
483
189k
    {
484
189k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
189k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
189k
    }
487
488
254k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
254k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
409
87.9k
{
410
87.9k
  AUXENT *ext = (AUXENT *) ext1;
411
87.9k
  union internal_auxent *in = (union internal_auxent *) in1;
412
413
#ifdef COFF_ADJUST_AUX_IN_PRE
414
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
415
#endif
416
417
87.9k
  switch (in_class)
418
87.9k
    {
419
12.3k
    case C_FILE:
420
12.3k
      if (ext->x_file.x_fname[0] == 0)
421
6.43k
  {
422
6.43k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
6.43k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
6.43k
  }
425
5.87k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
5.87k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
12.3k
      goto end;
431
432
2.64k
    case C_STAT:
433
2.64k
#ifdef C_LEAFSTAT
434
4.06k
    case C_LEAFSTAT:
435
4.06k
#endif
436
5.06k
    case C_HIDDEN:
437
5.06k
      if (type == T_NULL)
438
996
  {
439
996
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
996
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
996
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
442
443
    /* PE defines some extra fields; we zero them out for
444
       safety.  */
445
996
    in->x_scn.x_checksum = 0;
446
996
    in->x_scn.x_associated = 0;
447
996
    in->x_scn.x_comdat = 0;
448
449
996
    goto end;
450
996
  }
451
4.07k
      break;
452
87.9k
    }
453
454
74.6k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
74.6k
#ifndef NO_TVNDX
456
74.6k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
74.6k
#endif
458
459
74.6k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
54.2k
      || ISTAG (in_class))
461
26.8k
    {
462
26.8k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
26.8k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
26.8k
    }
465
47.8k
  else
466
47.8k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
47.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
47.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
47.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
47.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
47.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
47.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
47.8k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
47.8k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
47.8k
    }
479
480
74.6k
  if (ISFCN (type))
481
17.2k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
57.3k
  else
483
57.3k
    {
484
57.3k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
57.3k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
57.3k
    }
487
488
87.9k
 end: ;
489
490
#ifdef COFF_ADJUST_AUX_IN_POST
491
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
492
#endif
493
87.9k
}
494
495
static unsigned int
496
coff_swap_aux_out (bfd * abfd,
497
       void * inp,
498
       int type,
499
       int in_class,
500
       int indx ATTRIBUTE_UNUSED,
501
       int numaux ATTRIBUTE_UNUSED,
502
       void * extp)
503
954
{
504
954
  union internal_auxent * in = (union internal_auxent *) inp;
505
954
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
954
  memset (ext, 0, AUXESZ);
512
513
954
  switch (in_class)
514
954
    {
515
55
    case C_FILE:
516
55
      if (in->x_file.x_n.x_fname[0] == 0)
517
32
  {
518
32
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
32
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
32
  }
521
23
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
23
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
55
      goto end;
527
528
14
    case C_STAT:
529
14
#ifdef C_LEAFSTAT
530
14
    case C_LEAFSTAT:
531
14
#endif
532
30
    case C_HIDDEN:
533
30
      if (type == T_NULL)
534
9
  {
535
9
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
9
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
9
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
9
    goto end;
539
9
  }
540
21
      break;
541
954
    }
542
543
890
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
890
#ifndef NO_TVNDX
545
890
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
890
#endif
547
548
890
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
695
      || ISTAG (in_class))
550
265
    {
551
265
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
265
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
265
    }
554
625
  else
555
625
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
625
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
625
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
625
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
625
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
625
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
625
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
625
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
625
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
625
    }
568
569
890
  if (ISFCN (type))
570
890
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
699
  else
572
699
    {
573
699
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
699
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
699
    }
576
577
954
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
954
  return AUXESZ;
582
890
}
coff-x86_64.c:coff_swap_aux_out
Line
Count
Source
503
71
{
504
71
  union internal_auxent * in = (union internal_auxent *) inp;
505
71
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
71
  memset (ext, 0, AUXESZ);
512
513
71
  switch (in_class)
514
71
    {
515
8
    case C_FILE:
516
8
      if (in->x_file.x_n.x_fname[0] == 0)
517
2
  {
518
2
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
2
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
2
  }
521
6
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
6
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
8
      goto end;
527
528
0
    case C_STAT:
529
0
#ifdef C_LEAFSTAT
530
0
    case C_LEAFSTAT:
531
0
#endif
532
9
    case C_HIDDEN:
533
9
      if (type == T_NULL)
534
0
  {
535
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
0
    goto end;
539
0
  }
540
9
      break;
541
71
    }
542
543
63
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
63
#ifndef NO_TVNDX
545
63
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
63
#endif
547
548
63
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
44
      || ISTAG (in_class))
550
19
    {
551
19
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
19
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
19
    }
554
44
  else
555
44
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
44
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
44
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
44
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
44
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
44
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
44
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
44
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
44
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
44
    }
568
569
63
  if (ISFCN (type))
570
63
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
48
  else
572
48
    {
573
48
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
48
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
48
    }
576
577
71
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
71
  return AUXESZ;
582
63
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
coff-sh.c:coff_swap_aux_out
Line
Count
Source
503
17
{
504
17
  union internal_auxent * in = (union internal_auxent *) inp;
505
17
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
17
  memset (ext, 0, AUXESZ);
512
513
17
  switch (in_class)
514
17
    {
515
2
    case C_FILE:
516
2
      if (in->x_file.x_n.x_fname[0] == 0)
517
0
  {
518
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
0
  }
521
2
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
2
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
2
      goto end;
527
528
2
    case C_STAT:
529
2
#ifdef C_LEAFSTAT
530
2
    case C_LEAFSTAT:
531
2
#endif
532
2
    case C_HIDDEN:
533
2
      if (type == T_NULL)
534
2
  {
535
2
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
2
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
2
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
2
    goto end;
539
2
  }
540
0
      break;
541
17
    }
542
543
13
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
13
#ifndef NO_TVNDX
545
13
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
13
#endif
547
548
13
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
8
      || ISTAG (in_class))
550
11
    {
551
11
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
11
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
11
    }
554
2
  else
555
2
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
2
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
2
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
2
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
2
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
2
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
2
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
2
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
2
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
2
    }
568
569
13
  if (ISFCN (type))
570
13
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
8
  else
572
8
    {
573
8
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
8
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
8
    }
576
577
17
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
17
  return AUXESZ;
582
13
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
503
174
{
504
174
  union internal_auxent * in = (union internal_auxent *) inp;
505
174
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
174
  memset (ext, 0, AUXESZ);
512
513
174
  switch (in_class)
514
174
    {
515
0
    case C_FILE:
516
0
      if (in->x_file.x_n.x_fname[0] == 0)
517
0
  {
518
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
0
  }
521
0
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
0
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
0
      goto end;
527
528
0
    case C_STAT:
529
0
#ifdef C_LEAFSTAT
530
0
    case C_LEAFSTAT:
531
0
#endif
532
0
    case C_HIDDEN:
533
0
      if (type == T_NULL)
534
0
  {
535
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
0
    goto end;
539
0
  }
540
0
      break;
541
174
    }
542
543
174
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
174
#ifndef NO_TVNDX
545
174
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
174
#endif
547
548
174
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
166
      || ISTAG (in_class))
550
16
    {
551
16
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
16
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
16
    }
554
158
  else
555
158
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
158
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
158
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
158
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
158
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
158
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
158
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
158
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
158
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
158
    }
568
569
174
  if (ISFCN (type))
570
174
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
166
  else
572
166
    {
573
166
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
166
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
166
    }
576
577
174
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
174
  return AUXESZ;
582
174
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
503
128
{
504
128
  union internal_auxent * in = (union internal_auxent *) inp;
505
128
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
128
  memset (ext, 0, AUXESZ);
512
513
128
  switch (in_class)
514
128
    {
515
21
    case C_FILE:
516
21
      if (in->x_file.x_n.x_fname[0] == 0)
517
11
  {
518
11
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
11
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
11
  }
521
10
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
10
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
21
      goto end;
527
528
3
    case C_STAT:
529
3
#ifdef C_LEAFSTAT
530
3
    case C_LEAFSTAT:
531
3
#endif
532
10
    case C_HIDDEN:
533
10
      if (type == T_NULL)
534
7
  {
535
7
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
7
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
7
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
7
    goto end;
539
7
  }
540
3
      break;
541
128
    }
542
543
100
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
100
#ifndef NO_TVNDX
545
100
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
100
#endif
547
548
100
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
97
      || ISTAG (in_class))
550
4
    {
551
4
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
4
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
4
    }
554
96
  else
555
96
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
96
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
96
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
96
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
96
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
96
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
96
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
96
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
96
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
96
    }
568
569
100
  if (ISFCN (type))
570
100
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
97
  else
572
97
    {
573
97
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
97
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
97
    }
576
577
128
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
128
  return AUXESZ;
582
100
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
503
386
{
504
386
  union internal_auxent * in = (union internal_auxent *) inp;
505
386
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
386
  memset (ext, 0, AUXESZ);
512
513
386
  switch (in_class)
514
386
    {
515
0
    case C_FILE:
516
0
      if (in->x_file.x_n.x_fname[0] == 0)
517
0
  {
518
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
0
  }
521
0
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
0
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
0
      goto end;
527
528
6
    case C_STAT:
529
6
#ifdef C_LEAFSTAT
530
6
    case C_LEAFSTAT:
531
6
#endif
532
6
    case C_HIDDEN:
533
6
      if (type == T_NULL)
534
0
  {
535
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
0
    goto end;
539
0
  }
540
6
      break;
541
386
    }
542
543
386
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
386
#ifndef NO_TVNDX
545
386
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
386
#endif
547
548
386
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
232
      || ISTAG (in_class))
550
203
    {
551
203
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
203
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
203
    }
554
183
  else
555
183
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
183
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
183
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
183
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
183
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
183
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
183
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
183
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
183
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
183
    }
568
569
386
  if (ISFCN (type))
570
386
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
232
  else
572
232
    {
573
232
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
232
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
232
    }
576
577
386
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
386
  return AUXESZ;
582
386
}
coff-z8k.c:coff_swap_aux_out
Line
Count
Source
503
178
{
504
178
  union internal_auxent * in = (union internal_auxent *) inp;
505
178
  AUXENT *ext = (AUXENT *) extp;
506
507
#ifdef COFF_ADJUST_AUX_OUT_PRE
508
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
509
#endif
510
511
178
  memset (ext, 0, AUXESZ);
512
513
178
  switch (in_class)
514
178
    {
515
24
    case C_FILE:
516
24
      if (in->x_file.x_n.x_fname[0] == 0)
517
19
  {
518
19
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
519
19
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
520
19
  }
521
5
      else
522
#if FILNMLEN != E_FILNMLEN
523
#error we need to cope with truncating or extending xfname
524
#endif
525
5
  memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, E_FILNMLEN);
526
24
      goto end;
527
528
3
    case C_STAT:
529
3
#ifdef C_LEAFSTAT
530
3
    case C_LEAFSTAT:
531
3
#endif
532
3
    case C_HIDDEN:
533
3
      if (type == T_NULL)
534
0
  {
535
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
536
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
537
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
538
0
    goto end;
539
0
  }
540
3
      break;
541
178
    }
542
543
154
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
154
#ifndef NO_TVNDX
545
154
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
154
#endif
547
548
154
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
148
      || ISTAG (in_class))
550
12
    {
551
12
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
12
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
12
    }
554
142
  else
555
142
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
142
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
142
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
142
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
142
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
142
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
142
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
142
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
142
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
142
    }
568
569
154
  if (ISFCN (type))
570
154
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
148
  else
572
148
    {
573
148
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
148
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
148
    }
576
577
178
 end:
578
#ifdef COFF_ADJUST_AUX_OUT_POST
579
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
580
#endif
581
178
  return AUXESZ;
582
154
}
583
584
#endif /* NO_COFF_SYMBOLS */
585
586
#ifndef NO_COFF_LINENOS
587
588
static void
589
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
590
375k
{
591
375k
  LINENO *ext = (LINENO *) ext1;
592
375k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
375k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
375k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
375k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
590
70.7k
{
591
70.7k
  LINENO *ext = (LINENO *) ext1;
592
70.7k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
70.7k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
70.7k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
70.7k
}
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
590
52.4k
{
591
52.4k
  LINENO *ext = (LINENO *) ext1;
592
52.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
52.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
52.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
52.4k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
590
47.4k
{
591
47.4k
  LINENO *ext = (LINENO *) ext1;
592
47.4k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
47.4k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
47.4k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
47.4k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
590
65.5k
{
591
65.5k
  LINENO *ext = (LINENO *) ext1;
592
65.5k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
65.5k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
65.5k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
65.5k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
590
43.3k
{
591
43.3k
  LINENO *ext = (LINENO *) ext1;
592
43.3k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
43.3k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
43.3k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
43.3k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
590
49.8k
{
591
49.8k
  LINENO *ext = (LINENO *) ext1;
592
49.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
49.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
49.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
49.8k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
590
45.9k
{
591
45.9k
  LINENO *ext = (LINENO *) ext1;
592
45.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
45.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
45.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
45.9k
}
597
598
static unsigned int
599
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
600
4
{
601
4
  struct internal_lineno *in = (struct internal_lineno *) inp;
602
4
  struct external_lineno *ext = (struct external_lineno *) outp;
603
4
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
604
605
4
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
606
4
  return LINESZ;
607
4
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
coff-sh.c:coff_swap_lineno_out
Line
Count
Source
600
4
{
601
4
  struct internal_lineno *in = (struct internal_lineno *) inp;
602
4
  struct external_lineno *ext = (struct external_lineno *) outp;
603
4
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
604
605
4
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
606
4
  return LINESZ;
607
4
}
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
608
609
#endif /* NO_COFF_LINENOS */
610
611
static void
612
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
613
12.5k
{
614
12.5k
  AOUTHDR *aouthdr_ext;
615
12.5k
  struct internal_aouthdr *aouthdr_int;
616
617
12.5k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
12.5k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
12.5k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
12.5k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
12.5k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
12.5k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
12.5k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
12.5k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
12.5k
  aouthdr_int->text_start =
626
12.5k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
12.5k
  aouthdr_int->data_start =
628
12.5k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
834
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
998
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
1.83k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
1.83k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
1.83k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
1.83k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
1.83k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
1.83k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
1.83k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
1.83k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
1.83k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
1.83k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
834
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
834
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
998
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
998
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
991
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
991
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
991
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
991
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
991
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
991
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
991
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
712
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
712
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
712
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
712
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
12.5k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
613
712
{
614
712
  AOUTHDR *aouthdr_ext;
615
712
  struct internal_aouthdr *aouthdr_int;
616
617
712
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
712
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
712
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
712
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
712
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
712
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
712
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
712
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
712
  aouthdr_int->text_start =
626
712
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
712
  aouthdr_int->data_start =
628
712
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
712
#ifdef ALPHAECOFF
666
712
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
712
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
712
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
712
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
712
#endif
671
712
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.21k
{
614
1.21k
  AOUTHDR *aouthdr_ext;
615
1.21k
  struct internal_aouthdr *aouthdr_int;
616
617
1.21k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.21k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.21k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.21k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.21k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.21k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.21k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.21k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.21k
  aouthdr_int->text_start =
626
1.21k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.21k
  aouthdr_int->data_start =
628
1.21k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
1.21k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
613
834
{
614
834
  AOUTHDR *aouthdr_ext;
615
834
  struct internal_aouthdr *aouthdr_int;
616
617
834
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
834
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
834
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
834
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
834
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
834
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
834
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
834
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
834
  aouthdr_int->text_start =
626
834
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
834
  aouthdr_int->data_start =
628
834
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
834
#ifdef RS6000COFF_C
631
834
#ifdef XCOFF64
632
834
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
834
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
834
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
834
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
834
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
834
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
834
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
834
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
834
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
834
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
834
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
834
#ifdef XCOFF64
647
834
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
834
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
834
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
834
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.12k
{
614
1.12k
  AOUTHDR *aouthdr_ext;
615
1.12k
  struct internal_aouthdr *aouthdr_int;
616
617
1.12k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.12k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.12k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.12k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.12k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.12k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.12k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.12k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.12k
  aouthdr_int->text_start =
626
1.12k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.12k
  aouthdr_int->data_start =
628
1.12k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
1.12k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
613
696
{
614
696
  AOUTHDR *aouthdr_ext;
615
696
  struct internal_aouthdr *aouthdr_int;
616
617
696
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
696
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
696
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
696
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
696
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
696
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
696
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
696
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
696
  aouthdr_int->text_start =
626
696
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
696
  aouthdr_int->data_start =
628
696
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
696
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
613
696
{
614
696
  AOUTHDR *aouthdr_ext;
615
696
  struct internal_aouthdr *aouthdr_int;
616
617
696
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
696
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
696
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
696
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
696
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
696
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
696
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
696
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
696
  aouthdr_int->text_start =
626
696
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
696
  aouthdr_int->data_start =
628
696
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
696
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
613
991
{
614
991
  AOUTHDR *aouthdr_ext;
615
991
  struct internal_aouthdr *aouthdr_int;
616
617
991
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
991
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
991
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
991
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
991
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
991
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
991
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
991
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
991
  aouthdr_int->text_start =
626
991
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
991
  aouthdr_int->data_start =
628
991
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
991
#ifdef MIPSECOFF
656
991
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
991
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
991
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
991
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
991
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
991
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
991
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
991
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
991
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
613
998
{
614
998
  AOUTHDR *aouthdr_ext;
615
998
  struct internal_aouthdr *aouthdr_int;
616
617
998
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
998
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
998
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
998
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
998
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
998
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
998
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
998
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
998
  aouthdr_int->text_start =
626
998
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
998
  aouthdr_int->data_start =
628
998
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
998
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
998
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
998
#endif
636
998
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
998
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
998
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
998
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
998
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
998
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
998
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
998
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
998
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
998
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
998
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
998
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
998
#endif
653
998
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
998
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
613
862
{
614
862
  AOUTHDR *aouthdr_ext;
615
862
  struct internal_aouthdr *aouthdr_int;
616
617
862
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
862
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
862
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
862
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
862
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
862
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
862
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
862
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
862
  aouthdr_int->text_start =
626
862
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
862
  aouthdr_int->data_start =
628
862
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
862
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
613
465
{
614
465
  AOUTHDR *aouthdr_ext;
615
465
  struct internal_aouthdr *aouthdr_int;
616
617
465
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
465
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
465
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
465
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
465
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
465
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
465
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
465
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
465
  aouthdr_int->text_start =
626
465
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
465
  aouthdr_int->data_start =
628
465
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
465
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
613
755
{
614
755
  AOUTHDR *aouthdr_ext;
615
755
  struct internal_aouthdr *aouthdr_int;
616
617
755
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
755
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
755
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
755
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
755
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
755
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
755
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
755
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
755
  aouthdr_int->text_start =
626
755
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
755
  aouthdr_int->data_start =
628
755
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
755
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.00k
{
614
1.00k
  AOUTHDR *aouthdr_ext;
615
1.00k
  struct internal_aouthdr *aouthdr_int;
616
617
1.00k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.00k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.00k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.00k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.00k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.00k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.00k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.00k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.00k
  aouthdr_int->text_start =
626
1.00k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.00k
  aouthdr_int->data_start =
628
1.00k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
1.00k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
613
899
{
614
899
  AOUTHDR *aouthdr_ext;
615
899
  struct internal_aouthdr *aouthdr_int;
616
617
899
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
899
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
899
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
899
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
899
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
899
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
899
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
899
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
899
  aouthdr_int->text_start =
626
899
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
899
  aouthdr_int->data_start =
628
899
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
899
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.24k
{
614
1.24k
  AOUTHDR *aouthdr_ext;
615
1.24k
  struct internal_aouthdr *aouthdr_int;
616
617
1.24k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.24k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.24k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.24k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.24k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.24k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.24k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.24k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.24k
  aouthdr_int->text_start =
626
1.24k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.24k
  aouthdr_int->data_start =
628
1.24k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
1.24k
}
672
673
static unsigned int
674
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
675
249
{
676
249
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
249
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
249
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
249
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
249
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
249
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
249
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
249
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
249
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
249
        aouthdr_out->text_start);
687
249
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
249
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
13
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
64
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
77
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
77
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
77
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
77
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
77
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
77
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
77
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
77
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
77
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
77
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
13
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
13
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
64
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
64
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
77
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
77
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
77
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
77
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
77
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
77
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
77
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
13
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
66
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
66
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
66
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
28
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
28
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
28
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
28
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
28
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
28
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
249
  return AOUTSZ;
748
249
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
675
28
{
676
28
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
28
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
28
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
28
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
28
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
28
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
28
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
28
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
28
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
28
        aouthdr_out->text_start);
687
28
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
28
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
28
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
28
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
28
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
28
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
28
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
28
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
28
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
28
#endif
746
747
28
  return AOUTSZ;
748
28
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
675
10
{
676
10
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
10
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
10
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
10
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
10
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
10
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
10
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
10
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
10
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
10
        aouthdr_out->text_start);
687
10
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
10
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
10
  return AOUTSZ;
748
10
}
coff64-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
675
13
{
676
13
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
13
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
13
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
13
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
13
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
13
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
13
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
13
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
13
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
13
        aouthdr_out->text_start);
687
13
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
13
        aouthdr_out->data_start);
689
690
13
#ifdef RS6000COFF_C
691
13
#ifdef XCOFF64
692
13
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
13
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
13
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
13
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
13
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
13
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
13
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
13
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
13
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
13
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
13
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
13
#ifdef XCOFF64
707
13
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
13
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
13
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
13
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
13
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
13
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
13
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
13
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
13
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
13
#ifdef XCOFF64
722
13
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
13
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
13
#endif
725
13
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
13
  return AOUTSZ;
748
13
}
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
675
66
{
676
66
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
66
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
66
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
66
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
66
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
66
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
66
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
66
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
66
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
66
        aouthdr_out->text_start);
687
66
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
66
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
66
#ifdef MIPSECOFF
728
66
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
66
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
66
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
66
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
66
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
66
  return AOUTSZ;
748
66
}
coff-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
675
64
{
676
64
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
64
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
64
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
64
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
64
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
64
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
64
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
64
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
64
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
64
        aouthdr_out->text_start);
687
64
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
64
        aouthdr_out->data_start);
689
690
64
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
64
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
64
#endif
696
64
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
64
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
64
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
64
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
64
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
64
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
64
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
64
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
64
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
64
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
64
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
64
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
64
#endif
713
  /* TODO: set o_*psize dynamically */
714
64
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
64
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
64
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
64
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
64
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
64
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
64
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
64
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
64
  return AOUTSZ;
748
64
}
coff-sh.c:coff_swap_aouthdr_out
Line
Count
Source
675
17
{
676
17
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
17
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
17
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
17
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
17
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
17
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
17
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
17
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
17
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
17
        aouthdr_out->text_start);
687
17
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
17
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
17
  return AOUTSZ;
748
17
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
coff-tic30.c:coff_swap_aouthdr_out
Line
Count
Source
675
8
{
676
8
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
8
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
8
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
8
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
8
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
8
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
8
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
8
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
8
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
8
        aouthdr_out->text_start);
687
8
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
8
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
8
  return AOUTSZ;
748
8
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
coff-tic54x.c:coff_swap_aouthdr_out
Line
Count
Source
675
8
{
676
8
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
8
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
8
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
8
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
8
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
8
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
8
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
8
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
8
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
8
        aouthdr_out->text_start);
687
8
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
8
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
8
  return AOUTSZ;
748
8
}
coff-z80.c:coff_swap_aouthdr_out
Line
Count
Source
675
13
{
676
13
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
13
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
13
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
13
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
13
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
13
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
13
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
13
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
13
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
13
        aouthdr_out->text_start);
687
13
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
13
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
13
  return AOUTSZ;
748
13
}
coff-z8k.c:coff_swap_aouthdr_out
Line
Count
Source
675
22
{
676
22
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
22
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
22
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
22
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
22
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
22
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
22
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
22
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
22
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
22
        aouthdr_out->text_start);
687
22
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
22
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
723
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
724
#endif
725
#endif
726
727
#ifdef MIPSECOFF
728
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
#endif
736
737
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
22
  return AOUTSZ;
748
22
}
749
750
ATTRIBUTE_UNUSED
751
static void
752
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
753
1.32M
{
754
1.32M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
1.32M
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
1.32M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
1.32M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
1.32M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
1.32M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
1.32M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
1.32M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
1.32M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
1.32M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
1.32M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
1.32M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
90.0k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
1.32M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
753
14.4k
{
754
14.4k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
14.4k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
14.4k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
14.4k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
14.4k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
14.4k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
14.4k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
14.4k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
14.4k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
14.4k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
14.4k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
14.4k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
14.4k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
753
140k
{
754
140k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
140k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
140k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
140k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
140k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
140k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
140k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
140k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
140k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
140k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
140k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
140k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
140k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
753
49.3k
{
754
49.3k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
49.3k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
49.3k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
49.3k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
49.3k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
49.3k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
49.3k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
49.3k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
49.3k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
49.3k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
49.3k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
49.3k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
49.3k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
753
182k
{
754
182k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
182k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
182k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
182k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
182k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
182k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
182k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
182k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
182k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
182k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
182k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
182k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
182k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
753
101k
{
754
101k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
101k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
101k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
101k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
101k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
101k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
101k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
101k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
101k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
101k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
101k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
101k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
101k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
753
168k
{
754
168k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
168k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
168k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
168k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
168k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
168k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
168k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
168k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
168k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
168k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
168k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
168k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
168k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
753
94.3k
{
754
94.3k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
94.3k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
94.3k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
94.3k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
94.3k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
94.3k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
94.3k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
94.3k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
94.3k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
94.3k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
94.3k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
94.3k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
94.3k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
753
121k
{
754
121k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
121k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
121k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
121k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
121k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
121k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
121k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
121k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
121k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
121k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
121k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
121k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
121k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
753
92.5k
{
754
92.5k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
92.5k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
92.5k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
92.5k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
92.5k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
92.5k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
92.5k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
92.5k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
92.5k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
92.5k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
92.5k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
92.5k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
92.5k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
753
90.0k
{
754
90.0k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
90.0k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
90.0k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
90.0k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
90.0k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
90.0k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
90.0k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
90.0k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
90.0k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
90.0k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
90.0k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
90.0k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
90.0k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
90.0k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
90.0k
#endif
775
90.0k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
753
150k
{
754
150k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
150k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
150k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
150k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
150k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
150k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
150k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
150k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
150k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
150k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
150k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
150k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
150k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
753
116k
{
754
116k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
116k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
756
757
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
758
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
759
#endif
760
116k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
116k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
116k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
116k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
116k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
116k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
116k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
116k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
116k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
116k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
116k
}
776
777
ATTRIBUTE_UNUSED
778
static unsigned int
779
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out,
780
          const asection *section ATTRIBUTE_UNUSED)
781
1.01k
{
782
1.01k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
1.01k
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
1.01k
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
82
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
1.01k
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
1.01k
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
1.01k
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
1.01k
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
1.01k
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
1.01k
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
1.01k
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
1.01k
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
1.01k
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
1.01k
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
1.01k
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
1.01k
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
102
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
1.01k
  return ret;
833
1.01k
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Line
Count
Source
781
25
{
782
25
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
25
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
25
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
25
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
25
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
25
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
25
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
25
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
25
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
25
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
25
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
25
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
25
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
25
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
25
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
25
  return ret;
833
25
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
781
71
{
782
71
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
71
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
71
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
71
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
71
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
71
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
71
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
71
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
71
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
71
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
71
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
71
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
71
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
71
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
71
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
71
  return ret;
833
71
}
coff64-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
781
20
{
782
20
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
20
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
20
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
20
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
20
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
20
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
20
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
20
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
20
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
20
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
20
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
20
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
20
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
20
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
20
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
20
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
20
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
20
#endif
832
20
  return ret;
833
20
}
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
781
364
{
782
364
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
364
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
364
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
364
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
364
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
364
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
364
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
364
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
364
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
364
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
364
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
364
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
364
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
364
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
364
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
364
  return ret;
833
364
}
coff-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
781
84
{
782
84
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
84
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
84
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
84
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
84
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
84
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
84
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
84
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
84
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
84
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
84
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
84
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
84
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
84
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
84
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
84
  return ret;
833
84
}
coff-sh.c:coff_swap_scnhdr_out
Line
Count
Source
781
50
{
782
50
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
50
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
50
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
50
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
50
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
50
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
50
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
50
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
50
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
50
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
50
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
50
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
50
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
50
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
50
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
50
  return ret;
833
50
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
781
106
{
782
106
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
106
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
106
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
106
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
106
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
106
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
106
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
106
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
106
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
106
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
106
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
106
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
106
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
106
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
106
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
106
  return ret;
833
106
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
781
82
{
782
82
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
82
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
82
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
82
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
82
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
82
#endif
789
82
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
82
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
82
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
82
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
82
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
82
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
82
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
82
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
82
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
82
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
82
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
82
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
82
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
82
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
82
#endif
832
82
  return ret;
833
82
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
781
56
{
782
56
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
56
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
56
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
56
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
56
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
56
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
56
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
56
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
56
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
56
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
56
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
56
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
56
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
56
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
56
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
56
  return ret;
833
56
}
coff-z8k.c:coff_swap_scnhdr_out
Line
Count
Source
781
159
{
782
159
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
159
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
159
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
159
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
159
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
159
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
159
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
159
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
159
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
159
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
159
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
159
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
159
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
800
0
  else
801
0
    {
802
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
803
804
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
805
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
806
0
      _bfd_error_handler
807
  /* xgettext:c-format */
808
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
809
0
   abfd, buf, scnhdr_int->s_nlnno);
810
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
811
0
    }
812
813
159
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
159
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
815
0
  else
816
0
    {
817
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
818
819
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
820
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
821
      /* xgettext:c-format */
822
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
823
0
        abfd, buf, scnhdr_int->s_nreloc);
824
0
      bfd_set_error (bfd_error_file_truncated);
825
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
826
0
      ret = 0;
827
0
    }
828
829
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
159
  return ret;
833
159
}