Coverage Report

Created: 2026-10-02 09:53

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
210k
  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
210k
  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
414
  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
414
  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
585k
  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
518k
  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
828
  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
605
  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.2k
  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.3k
  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.3k
  H_GET_16 (abfd, ext->x_scn.x_nlinno)
75
#endif
76
#ifndef PUT_SCN_SCNLEN
77
#define PUT_SCN_SCNLEN(abfd, in, ext) \
78
0
  H_PUT_32 (abfd, in, ext->x_scn.x_scnlen)
79
#endif
80
#ifndef PUT_SCN_NRELOC
81
#define PUT_SCN_NRELOC(abfd, in, ext) \
82
0
  H_PUT_16 (abfd, in, ext->x_scn.x_nreloc)
83
#endif
84
#ifndef PUT_SCN_NLINNO
85
#define PUT_SCN_NLINNO(abfd, in, ext) \
86
0
  H_PUT_16 (abfd, in, ext->x_scn.x_nlinno)
87
#endif
88
#ifndef GET_LINENO_LNNO
89
#define GET_LINENO_LNNO(abfd, ext) \
90
124k
  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.63M
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
117
#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
11.1k
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
79
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
11.1k
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
79
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
11.1k
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
79
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
11.1k
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
79
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
11.1k
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
79
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
11.1k
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
79
#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.51M
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
626
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
1.51M
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
626
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
1.41M
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
597
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
1.51M
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
626
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
1.51M
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
626
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
1.51M
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
626
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
1.43M
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
646
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
617
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
1.43M
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
646
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
617
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
1.48M
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
618
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
16.7k
#define GET_RELOC_VADDR H_GET_32
207
#endif
208
#ifndef PUT_RELOC_VADDR
209
0
#define PUT_RELOC_VADDR H_PUT_32
210
#endif
211
212
#ifndef NO_COFF_RELOCS
213
214
static void
215
coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
216
16.4k
{
217
16.4k
  RELOC *reloc_src = src;
218
16.4k
  struct internal_reloc *reloc_dst = dst;
219
220
16.4k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
16.4k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
16.4k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
16.4k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
#ifdef SWAP_IN_RELOC_OFFSET
226
4.25k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
#endif
228
16.4k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
927
{
217
927
  RELOC *reloc_src = src;
218
927
  struct internal_reloc *reloc_dst = dst;
219
220
927
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
927
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
927
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
927
  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
927
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
4.48k
{
217
4.48k
  RELOC *reloc_src = src;
218
4.48k
  struct internal_reloc *reloc_dst = dst;
219
220
4.48k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
4.48k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
4.48k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
4.48k
  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.48k
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
642
{
217
642
  RELOC *reloc_src = src;
218
642
  struct internal_reloc *reloc_dst = dst;
219
220
642
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
642
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
642
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
642
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
642
#ifdef SWAP_IN_RELOC_OFFSET
226
642
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
642
#endif
228
642
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
6.76k
{
217
6.76k
  RELOC *reloc_src = src;
218
6.76k
  struct internal_reloc *reloc_dst = dst;
219
220
6.76k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
6.76k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
6.76k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
6.76k
  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
6.76k
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
2.28k
{
217
2.28k
  RELOC *reloc_src = src;
218
2.28k
  struct internal_reloc *reloc_dst = dst;
219
220
2.28k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
2.28k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
2.28k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
2.28k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
2.28k
#ifdef SWAP_IN_RELOC_OFFSET
226
2.28k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
2.28k
#endif
228
2.28k
}
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.08k
{
217
1.08k
  RELOC *reloc_src = src;
218
1.08k
  struct internal_reloc *reloc_dst = dst;
219
220
1.08k
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
1.08k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
1.08k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
1.08k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
1.08k
#ifdef SWAP_IN_RELOC_OFFSET
226
1.08k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
1.08k
#endif
228
1.08k
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
239
{
217
239
  RELOC *reloc_src = src;
218
239
  struct internal_reloc *reloc_dst = dst;
219
220
239
  memset (reloc_dst, 0, sizeof (*reloc_dst));
221
239
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
222
239
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
223
239
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
224
225
239
#ifdef SWAP_IN_RELOC_OFFSET
226
239
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
227
239
#endif
228
239
}
229
230
static unsigned int
231
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
232
0
{
233
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
234
0
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
235
236
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
237
0
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
238
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
239
240
#ifdef SWAP_OUT_RELOC_OFFSET
241
0
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
242
#endif
243
#ifdef SWAP_OUT_RELOC_EXTRA
244
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
245
#endif
246
247
0
  return bfd_coff_relsz (abfd);
248
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out
Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out
249
250
#ifdef TICOFF
251
static void
252
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
253
270
{
254
270
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
255
270
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
256
257
270
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
258
270
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
259
270
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
260
270
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
253
270
{
254
270
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
255
270
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
256
257
270
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
258
270
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
259
270
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
260
270
}
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.09M
{
282
4.09M
  FILHDR *filehdr_src = (FILHDR *) src;
283
4.09M
  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.09M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
4.09M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
4.09M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
4.09M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
4.09M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
4.09M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
4.09M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
1.09M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
#endif
299
4.09M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
281
183k
{
282
183k
  FILHDR *filehdr_src = (FILHDR *) src;
283
183k
  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
183k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
183k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
183k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
183k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
183k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
183k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
183k
  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
183k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
281
205k
{
282
205k
  FILHDR *filehdr_src = (FILHDR *) src;
283
205k
  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
205k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
205k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
205k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
205k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
205k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
205k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
205k
  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
205k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
281
275k
{
282
275k
  FILHDR *filehdr_src = (FILHDR *) src;
283
275k
  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
275k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
275k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
275k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
275k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
275k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
275k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
275k
  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
275k
}
cf-i386lynx.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
}
coff-go32.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
}
coff-i386.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
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
281
560k
{
282
560k
  FILHDR *filehdr_src = (FILHDR *) src;
283
560k
  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
560k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
560k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
560k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
560k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
560k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
560k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
560k
  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
560k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
281
140k
{
282
140k
  FILHDR *filehdr_src = (FILHDR *) src;
283
140k
  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
140k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
140k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
140k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
140k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
140k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
140k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
140k
  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
140k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
281
457k
{
282
457k
  FILHDR *filehdr_src = (FILHDR *) src;
283
457k
  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
457k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
457k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
457k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
457k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
457k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
457k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
457k
  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
457k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
281
3.54k
{
282
3.54k
  FILHDR *filehdr_src = (FILHDR *) src;
283
3.54k
  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.54k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
3.54k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
3.54k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
3.54k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
3.54k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
3.54k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
3.54k
  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.54k
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
281
186k
{
282
186k
  FILHDR *filehdr_src = (FILHDR *) src;
283
186k
  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
186k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
186k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
186k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
186k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
186k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
186k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
186k
  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
186k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
281
1.09M
{
282
1.09M
  FILHDR *filehdr_src = (FILHDR *) src;
283
1.09M
  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.09M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
1.09M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
1.09M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
1.09M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
1.09M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
1.09M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
1.09M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
295
296
1.09M
#ifdef COFF_ADJUST_FILEHDR_IN_POST
297
1.09M
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
298
1.09M
#endif
299
1.09M
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
281
186k
{
282
186k
  FILHDR *filehdr_src = (FILHDR *) src;
283
186k
  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
186k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
186k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
186k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
186k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
186k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
186k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
186k
  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
186k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
281
183k
{
282
183k
  FILHDR *filehdr_src = (FILHDR *) src;
283
183k
  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
183k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
289
183k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
290
183k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
291
183k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
292
183k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
293
183k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
294
183k
  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
183k
}
300
301
static  unsigned int
302
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
303
138
{
304
138
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
138
  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
138
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
138
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
138
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
138
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
138
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
138
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
138
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
7
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
#endif
321
138
  return bfd_coff_filhsz (abfd);
322
138
}
coff-alpha.c:alpha_ecoff_swap_filehdr_out
Line
Count
Source
303
11
{
304
11
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
11
  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
11
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
11
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
11
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
11
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
11
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
11
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
11
  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
11
  return bfd_coff_filhsz (abfd);
322
11
}
coff-x86_64.c:coff_swap_filehdr_out
Line
Count
Source
303
7
{
304
7
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
7
  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
7
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
7
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
7
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
7
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
7
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
7
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
7
  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
7
  return bfd_coff_filhsz (abfd);
322
7
}
coff64-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
303
10
{
304
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
10
  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
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
10
  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
10
  return bfd_coff_filhsz (abfd);
322
10
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_filehdr_out
coff-mips.c:mips_ecoff_swap_filehdr_out
Line
Count
Source
303
49
{
304
49
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
49
  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
49
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
49
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
49
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
49
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
49
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
49
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
49
  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
49
  return bfd_coff_filhsz (abfd);
322
49
}
coff-rs6000.c:coff_swap_filehdr_out
Line
Count
Source
303
6
{
304
6
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
6
  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
6
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
6
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
6
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
6
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
6
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
6
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
6
  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
6
  return bfd_coff_filhsz (abfd);
322
6
}
coff-sh.c:coff_swap_filehdr_out
Line
Count
Source
303
12
{
304
12
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
12
  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
12
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
12
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
12
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
12
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
12
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
12
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
12
  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
12
  return bfd_coff_filhsz (abfd);
322
12
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
coff-tic30.c:coff_swap_filehdr_out
Line
Count
Source
303
10
{
304
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
10
  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
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
10
  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
10
  return bfd_coff_filhsz (abfd);
322
10
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
coff-tic54x.c:coff_swap_filehdr_out
Line
Count
Source
303
7
{
304
7
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
7
  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
7
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
7
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
7
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
7
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
7
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
7
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
7
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
317
318
7
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
319
7
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
320
7
#endif
321
7
  return bfd_coff_filhsz (abfd);
322
7
}
coff-z80.c:coff_swap_filehdr_out
Line
Count
Source
303
10
{
304
10
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
10
  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
10
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
10
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
10
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
10
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
10
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
10
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
10
  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
10
  return bfd_coff_filhsz (abfd);
322
10
}
coff-z8k.c:coff_swap_filehdr_out
Line
Count
Source
303
16
{
304
16
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
305
16
  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
16
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
311
16
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
312
16
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
313
16
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
314
16
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
315
16
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
316
16
  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
16
  return bfd_coff_filhsz (abfd);
322
16
}
323
324
#ifndef NO_COFF_SYMBOLS
325
326
static void
327
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
328
201k
{
329
201k
  SYMENT *ext = (SYMENT *) ext1;
330
201k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
201k
  if (ext->e.e_name[0] == 0)
333
123k
    {
334
123k
      in->_n._n_n._n_zeroes = 0;
335
123k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
123k
    }
337
78.4k
  else
338
78.4k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
78.4k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
78.4k
#endif
344
78.4k
    }
345
346
201k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
201k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
201k
  if (sizeof (ext->e_type) == 2)
349
201k
    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
201k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
201k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
#ifdef COFF_ADJUST_SYM_IN_POST
355
22.3k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
#endif
357
201k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
328
38.9k
{
329
38.9k
  SYMENT *ext = (SYMENT *) ext1;
330
38.9k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
38.9k
  if (ext->e.e_name[0] == 0)
333
24.8k
    {
334
24.8k
      in->_n._n_n._n_zeroes = 0;
335
24.8k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
24.8k
    }
337
14.0k
  else
338
14.0k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
14.0k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
14.0k
#endif
344
14.0k
    }
345
346
38.9k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
38.9k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
38.9k
  if (sizeof (ext->e_type) == 2)
349
38.9k
    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
38.9k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
38.9k
  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
38.9k
}
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
31.0k
{
329
31.0k
  SYMENT *ext = (SYMENT *) ext1;
330
31.0k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
31.0k
  if (ext->e.e_name[0] == 0)
333
18.6k
    {
334
18.6k
      in->_n._n_n._n_zeroes = 0;
335
18.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
18.6k
    }
337
12.4k
  else
338
12.4k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
12.4k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
12.4k
#endif
344
12.4k
    }
345
346
31.0k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
31.0k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
31.0k
  if (sizeof (ext->e_type) == 2)
349
31.0k
    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
31.0k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
31.0k
  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
31.0k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
328
54.8k
{
329
54.8k
  SYMENT *ext = (SYMENT *) ext1;
330
54.8k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
54.8k
  if (ext->e.e_name[0] == 0)
333
33.5k
    {
334
33.5k
      in->_n._n_n._n_zeroes = 0;
335
33.5k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
33.5k
    }
337
21.3k
  else
338
21.3k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
21.3k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
21.3k
#endif
344
21.3k
    }
345
346
54.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
54.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
54.8k
  if (sizeof (ext->e_type) == 2)
349
54.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
54.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
54.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
54.8k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
328
22.3k
{
329
22.3k
  SYMENT *ext = (SYMENT *) ext1;
330
22.3k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
22.3k
  if (ext->e.e_name[0] == 0)
333
12.8k
    {
334
12.8k
      in->_n._n_n._n_zeroes = 0;
335
12.8k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
12.8k
    }
337
9.51k
  else
338
9.51k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
9.51k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
9.51k
#endif
344
9.51k
    }
345
346
22.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
22.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
22.3k
  if (sizeof (ext->e_type) == 2)
349
22.3k
    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
22.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
22.3k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
354
22.3k
#ifdef COFF_ADJUST_SYM_IN_POST
355
22.3k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
356
22.3k
#endif
357
22.3k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
328
35.4k
{
329
35.4k
  SYMENT *ext = (SYMENT *) ext1;
330
35.4k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
35.4k
  if (ext->e.e_name[0] == 0)
333
21.6k
    {
334
21.6k
      in->_n._n_n._n_zeroes = 0;
335
21.6k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
21.6k
    }
337
13.8k
  else
338
13.8k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
13.8k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
13.8k
#endif
344
13.8k
    }
345
346
35.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
35.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
35.4k
  if (sizeof (ext->e_type) == 2)
349
35.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
35.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
35.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
35.4k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
328
19.2k
{
329
19.2k
  SYMENT *ext = (SYMENT *) ext1;
330
19.2k
  struct internal_syment *in = (struct internal_syment *) in1;
331
332
19.2k
  if (ext->e.e_name[0] == 0)
333
11.9k
    {
334
11.9k
      in->_n._n_n._n_zeroes = 0;
335
11.9k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
336
11.9k
    }
337
7.34k
  else
338
7.34k
    {
339
#if SYMNMLEN != E_SYMNMLEN
340
#error we need to cope with truncating or extending SYMNMLEN
341
#else
342
7.34k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
343
7.34k
#endif
344
7.34k
    }
345
346
19.2k
  in->n_value = H_GET_32 (abfd, ext->e_value);
347
19.2k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
348
19.2k
  if (sizeof (ext->e_type) == 2)
349
19.2k
    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
19.2k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
353
19.2k
  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
19.2k
}
358
359
static unsigned int
360
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
361
1.11k
{
362
1.11k
  struct internal_syment *in = (struct internal_syment *) inp;
363
1.11k
  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.11k
  if (in->_n._n_name[0] == 0)
370
997
    {
371
997
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
997
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
997
    }
374
118
  else
375
118
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
118
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
118
#endif
381
118
    }
382
383
1.11k
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
1.11k
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
1.11k
  if (sizeof (ext->e_type) == 2)
387
1.11k
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
1.11k
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
1.11k
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
1.11k
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
#ifdef COFF_ADJUST_SYM_OUT_POST
395
336
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
#endif
397
398
1.11k
  return SYMESZ;
399
1.11k
}
coff-x86_64.c:coff_swap_sym_out
Line
Count
Source
361
2
{
362
2
  struct internal_syment *in = (struct internal_syment *) inp;
363
2
  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
2
  if (in->_n._n_name[0] == 0)
370
1
    {
371
1
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
1
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
1
    }
374
1
  else
375
1
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
1
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
1
#endif
381
1
    }
382
383
2
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
2
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
2
  if (sizeof (ext->e_type) == 2)
387
2
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
2
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
2
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
2
  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
2
  return SYMESZ;
399
2
}
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
36
{
362
36
  struct internal_syment *in = (struct internal_syment *) inp;
363
36
  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
36
  if (in->_n._n_name[0] == 0)
370
3
    {
371
3
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
3
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
3
    }
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
36
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
36
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
36
  if (sizeof (ext->e_type) == 2)
387
36
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
36
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
36
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
36
  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
36
  return SYMESZ;
399
36
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
coff-tic30.c:coff_swap_sym_out
Line
Count
Source
361
179
{
362
179
  struct internal_syment *in = (struct internal_syment *) inp;
363
179
  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
179
  if (in->_n._n_name[0] == 0)
370
158
    {
371
158
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
158
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
158
    }
374
21
  else
375
21
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
21
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
21
#endif
381
21
    }
382
383
179
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
179
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
179
  if (sizeof (ext->e_type) == 2)
387
179
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
179
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
179
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
179
  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
179
  return SYMESZ;
399
179
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
coff-tic54x.c:coff_swap_sym_out
Line
Count
Source
361
336
{
362
336
  struct internal_syment *in = (struct internal_syment *) inp;
363
336
  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
336
  if (in->_n._n_name[0] == 0)
370
304
    {
371
304
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
304
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
304
    }
374
32
  else
375
32
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
32
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
32
#endif
381
32
    }
382
383
336
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
336
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
336
  if (sizeof (ext->e_type) == 2)
387
336
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
336
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
336
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
336
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
393
394
336
#ifdef COFF_ADJUST_SYM_OUT_POST
395
336
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
396
336
#endif
397
398
336
  return SYMESZ;
399
336
}
coff-z80.c:coff_swap_sym_out
Line
Count
Source
361
186
{
362
186
  struct internal_syment *in = (struct internal_syment *) inp;
363
186
  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
186
  if (in->_n._n_name[0] == 0)
370
174
    {
371
174
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
174
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
174
    }
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
186
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
186
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
186
  if (sizeof (ext->e_type) == 2)
387
186
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
186
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
186
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
186
  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
186
  return SYMESZ;
399
186
}
coff-z8k.c:coff_swap_sym_out
Line
Count
Source
361
376
{
362
376
  struct internal_syment *in = (struct internal_syment *) inp;
363
376
  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
376
  if (in->_n._n_name[0] == 0)
370
357
    {
371
357
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
372
357
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
373
357
    }
374
19
  else
375
19
    {
376
#if SYMNMLEN != E_SYMNMLEN
377
#error we need to cope with truncating or extending SYMNMLEN
378
#else
379
19
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
380
19
#endif
381
19
    }
382
383
376
  H_PUT_32 (abfd, in->n_value, ext->e_value);
384
376
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
385
386
376
  if (sizeof (ext->e_type) == 2)
387
376
    H_PUT_16 (abfd, in->n_type, ext->e_type);
388
0
  else
389
376
    H_PUT_32 (abfd, in->n_type, ext->e_type);
390
391
376
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
392
376
  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
376
  return SYMESZ;
399
376
}
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
821k
{
410
821k
  AUXENT *ext = (AUXENT *) ext1;
411
821k
  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
821k
  switch (in_class)
418
821k
    {
419
69.1k
    case C_FILE:
420
69.1k
      if (ext->x_file.x_fname[0] == 0)
421
31.4k
  {
422
31.4k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
31.4k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
31.4k
  }
425
37.7k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
37.7k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
69.1k
      goto end;
431
432
42.0k
    case C_STAT:
433
42.0k
#ifdef C_LEAFSTAT
434
59.2k
    case C_LEAFSTAT:
435
59.2k
#endif
436
76.9k
    case C_HIDDEN:
437
76.9k
      if (type == T_NULL)
438
21.3k
  {
439
21.3k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
21.3k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
21.3k
    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.3k
    in->x_scn.x_checksum = 0;
446
21.3k
    in->x_scn.x_associated = 0;
447
21.3k
    in->x_scn.x_comdat = 0;
448
449
21.3k
    goto end;
450
21.3k
  }
451
55.6k
      break;
452
821k
    }
453
454
731k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
731k
#ifndef NO_TVNDX
456
731k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
731k
#endif
458
459
731k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
568k
      || ISTAG (in_class))
461
210k
    {
462
210k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
210k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
210k
    }
465
520k
  else
466
520k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
520k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
520k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
520k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
520k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
520k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
520k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
520k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
520k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
520k
    }
479
480
731k
  if (ISFCN (type))
481
145k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
585k
  else
483
585k
    {
484
585k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
585k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
585k
    }
487
488
821k
 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
821k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
409
101k
{
410
101k
  AUXENT *ext = (AUXENT *) ext1;
411
101k
  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
101k
  switch (in_class)
418
101k
    {
419
8.10k
    case C_FILE:
420
8.10k
      if (ext->x_file.x_fname[0] == 0)
421
4.18k
  {
422
4.18k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
4.18k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
4.18k
  }
425
3.91k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
3.91k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
8.10k
      goto end;
431
432
2.89k
    case C_STAT:
433
2.89k
#ifdef C_LEAFSTAT
434
4.50k
    case C_LEAFSTAT:
435
4.50k
#endif
436
6.51k
    case C_HIDDEN:
437
6.51k
      if (type == T_NULL)
438
2.23k
  {
439
2.23k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
2.23k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
2.23k
    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.23k
    in->x_scn.x_checksum = 0;
446
2.23k
    in->x_scn.x_associated = 0;
447
2.23k
    in->x_scn.x_comdat = 0;
448
449
2.23k
    goto end;
450
2.23k
  }
451
4.27k
      break;
452
101k
    }
453
454
91.1k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
91.1k
#ifndef NO_TVNDX
456
91.1k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
91.1k
#endif
458
459
91.1k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
74.8k
      || ISTAG (in_class))
461
23.7k
    {
462
23.7k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
23.7k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
23.7k
    }
465
67.3k
  else
466
67.3k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
67.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
67.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
67.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
67.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
67.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
67.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
67.3k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
67.3k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
67.3k
    }
479
480
91.1k
  if (ISFCN (type))
481
14.8k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
76.2k
  else
483
76.2k
    {
484
76.2k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
76.2k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
76.2k
    }
487
488
101k
 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
101k
}
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
107k
{
410
107k
  AUXENT *ext = (AUXENT *) ext1;
411
107k
  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
107k
  switch (in_class)
418
107k
    {
419
19.4k
    case C_FILE:
420
19.4k
      if (ext->x_file.x_fname[0] == 0)
421
6.97k
  {
422
6.97k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
6.97k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
6.97k
  }
425
12.4k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
12.4k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
19.4k
      goto end;
431
432
2.07k
    case C_STAT:
433
2.07k
#ifdef C_LEAFSTAT
434
3.43k
    case C_LEAFSTAT:
435
3.43k
#endif
436
5.16k
    case C_HIDDEN:
437
5.16k
      if (type == T_NULL)
438
767
  {
439
767
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
767
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
767
    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
767
    in->x_scn.x_checksum = 0;
446
767
    in->x_scn.x_associated = 0;
447
767
    in->x_scn.x_comdat = 0;
448
449
767
    goto end;
450
767
  }
451
4.40k
      break;
452
107k
    }
453
454
87.3k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
87.3k
#ifndef NO_TVNDX
456
87.3k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
87.3k
#endif
458
459
87.3k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
65.5k
      || ISTAG (in_class))
461
29.3k
    {
462
29.3k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
29.3k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
29.3k
    }
465
57.9k
  else
466
57.9k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
57.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
57.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
57.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
57.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
57.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
57.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
57.9k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
57.9k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
57.9k
    }
479
480
87.3k
  if (ISFCN (type))
481
20.0k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
67.2k
  else
483
67.2k
    {
484
67.2k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
67.2k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
67.2k
    }
487
488
107k
 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
107k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
409
150k
{
410
150k
  AUXENT *ext = (AUXENT *) ext1;
411
150k
  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
150k
  switch (in_class)
418
150k
    {
419
8.80k
    case C_FILE:
420
8.80k
      if (ext->x_file.x_fname[0] == 0)
421
3.50k
  {
422
3.50k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
3.50k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
3.50k
  }
425
5.30k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
5.30k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
8.80k
      goto end;
431
432
20.8k
    case C_STAT:
433
20.8k
#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.4k
  {
439
15.4k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
15.4k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
15.4k
    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.4k
    in->x_scn.x_checksum = 0;
446
15.4k
    in->x_scn.x_associated = 0;
447
15.4k
    in->x_scn.x_comdat = 0;
448
449
15.4k
    goto end;
450
15.4k
  }
451
10.4k
      break;
452
150k
    }
453
454
126k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
126k
#ifndef NO_TVNDX
456
126k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
126k
#endif
458
459
126k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
105k
      || 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
96.7k
  else
466
96.7k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
96.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
96.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
96.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
96.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
96.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
96.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
96.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
96.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
96.7k
    }
479
480
126k
  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
108k
  else
483
108k
    {
484
108k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
108k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
108k
    }
487
488
150k
 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
150k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
409
92.2k
{
410
92.2k
  AUXENT *ext = (AUXENT *) ext1;
411
92.2k
  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
92.2k
  switch (in_class)
418
92.2k
    {
419
6.32k
    case C_FILE:
420
6.32k
      if (ext->x_file.x_fname[0] == 0)
421
2.76k
  {
422
2.76k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
2.76k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
2.76k
  }
425
3.56k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
3.56k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
6.32k
      goto end;
431
432
2.20k
    case C_STAT:
433
2.20k
#ifdef C_LEAFSTAT
434
3.01k
    case C_LEAFSTAT:
435
3.01k
#endif
436
4.93k
    case C_HIDDEN:
437
4.93k
      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.89k
      break;
452
92.2k
    }
453
454
84.8k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
84.8k
#ifndef NO_TVNDX
456
84.8k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
84.8k
#endif
458
459
84.8k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
66.0k
      || ISTAG (in_class))
461
24.4k
    {
462
24.4k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
24.4k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
24.4k
    }
465
60.4k
  else
466
60.4k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
60.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
60.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
60.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
60.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
60.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
60.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
60.4k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
60.4k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
60.4k
    }
479
480
84.8k
  if (ISFCN (type))
481
17.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
67.4k
  else
483
67.4k
    {
484
67.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
67.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
67.4k
    }
487
488
92.2k
 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
92.2k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
409
264k
{
410
264k
  AUXENT *ext = (AUXENT *) ext1;
411
264k
  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
264k
  switch (in_class)
418
264k
    {
419
14.2k
    case C_FILE:
420
14.2k
      if (ext->x_file.x_fname[0] == 0)
421
7.51k
  {
422
7.51k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
7.51k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
7.51k
  }
425
6.70k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
6.70k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
14.2k
      goto end;
431
432
11.7k
    case C_STAT:
433
11.7k
#ifdef C_LEAFSTAT
434
19.8k
    case C_LEAFSTAT:
435
19.8k
#endif
436
29.0k
    case C_HIDDEN:
437
29.0k
      if (type == T_NULL)
438
1.08k
  {
439
1.08k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
1.08k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
1.08k
    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.08k
    in->x_scn.x_checksum = 0;
446
1.08k
    in->x_scn.x_associated = 0;
447
1.08k
    in->x_scn.x_comdat = 0;
448
449
1.08k
    goto end;
450
1.08k
  }
451
27.9k
      break;
452
264k
    }
453
454
248k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
248k
#ifndef NO_TVNDX
456
248k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
248k
#endif
458
459
248k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
187k
      || ISTAG (in_class))
461
72.0k
    {
462
72.0k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
72.0k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
72.0k
    }
465
176k
  else
466
176k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
176k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
176k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
176k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
176k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
176k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
176k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
176k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
176k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
176k
    }
479
480
248k
  if (ISFCN (type))
481
54.9k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
193k
  else
483
193k
    {
484
193k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
193k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
193k
    }
487
488
264k
 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
264k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
409
105k
{
410
105k
  AUXENT *ext = (AUXENT *) ext1;
411
105k
  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
105k
  switch (in_class)
418
105k
    {
419
12.3k
    case C_FILE:
420
12.3k
      if (ext->x_file.x_fname[0] == 0)
421
6.51k
  {
422
6.51k
    in->x_file.x_n.x_n.x_zeroes = 0;
423
6.51k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
424
6.51k
  }
425
5.79k
      else
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending x_fname
428
#endif
429
5.79k
  memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
430
12.3k
      goto end;
431
432
2.24k
    case C_STAT:
433
2.24k
#ifdef C_LEAFSTAT
434
3.95k
    case C_LEAFSTAT:
435
3.95k
#endif
436
5.37k
    case C_HIDDEN:
437
5.37k
      if (type == T_NULL)
438
767
  {
439
767
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
440
767
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
441
767
    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
767
    in->x_scn.x_checksum = 0;
446
767
    in->x_scn.x_associated = 0;
447
767
    in->x_scn.x_comdat = 0;
448
449
767
    goto end;
450
767
  }
451
4.61k
      break;
452
105k
    }
453
454
92.2k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
455
92.2k
#ifndef NO_TVNDX
456
92.2k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
457
92.2k
#endif
458
459
92.2k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
460
69.1k
      || ISTAG (in_class))
461
30.9k
    {
462
30.9k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
463
30.9k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
464
30.9k
    }
465
61.2k
  else
466
61.2k
    {
467
#if DIMNUM != E_DIMNUM
468
#error we need to cope with truncating or extending DIMNUM
469
#endif
470
61.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
471
61.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
472
61.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
473
61.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
474
61.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
475
61.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
476
61.2k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
477
61.2k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
478
61.2k
    }
479
480
92.2k
  if (ISFCN (type))
481
19.4k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
482
72.7k
  else
483
72.7k
    {
484
72.7k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
485
72.7k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
486
72.7k
    }
487
488
105k
 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
105k
}
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
1.23k
{
504
1.23k
  union internal_auxent * in = (union internal_auxent *) inp;
505
1.23k
  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
1.23k
  memset (ext, 0, AUXESZ);
512
513
1.23k
  switch (in_class)
514
1.23k
    {
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
113
    case C_STAT:
529
113
#ifdef C_LEAFSTAT
530
113
    case C_LEAFSTAT:
531
113
#endif
532
113
    case C_HIDDEN:
533
113
      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
113
      break;
541
1.23k
    }
542
543
1.23k
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
1.23k
#ifndef NO_TVNDX
545
1.23k
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
1.23k
#endif
547
548
1.23k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
828
      || ISTAG (in_class))
550
414
    {
551
414
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
414
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
414
    }
554
818
  else
555
818
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
818
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
818
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
818
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
818
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
818
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
818
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
818
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
818
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
818
    }
568
569
1.23k
  if (ISFCN (type))
570
1.23k
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
828
  else
572
828
    {
573
828
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
828
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
828
    }
576
577
1.23k
 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
1.23k
  return AUXESZ;
582
1.23k
}
coff-x86_64.c:coff_swap_aux_out
Line
Count
Source
503
2
{
504
2
  union internal_auxent * in = (union internal_auxent *) inp;
505
2
  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
2
  memset (ext, 0, AUXESZ);
512
513
2
  switch (in_class)
514
2
    {
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
2
    }
542
543
2
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
2
#ifndef NO_TVNDX
545
2
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
2
#endif
547
548
2
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
2
      || ISTAG (in_class))
550
0
    {
551
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
0
    }
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
2
  if (ISFCN (type))
570
2
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
2
  else
572
2
    {
573
2
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
2
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
2
    }
576
577
2
 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
2
  return AUXESZ;
582
2
}
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
252
{
504
252
  union internal_auxent * in = (union internal_auxent *) inp;
505
252
  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
252
  memset (ext, 0, AUXESZ);
512
513
252
  switch (in_class)
514
252
    {
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
113
    case C_STAT:
529
113
#ifdef C_LEAFSTAT
530
113
    case C_LEAFSTAT:
531
113
#endif
532
113
    case C_HIDDEN:
533
113
      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
113
      break;
541
252
    }
542
543
252
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
252
#ifndef NO_TVNDX
545
252
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
252
#endif
547
548
252
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
252
      || ISTAG (in_class))
550
0
    {
551
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
0
    }
554
252
  else
555
252
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
252
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
252
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
252
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
252
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
252
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
252
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
252
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
252
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
252
    }
568
569
252
  if (ISFCN (type))
570
252
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
252
  else
572
252
    {
573
252
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
252
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
252
    }
576
577
252
 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
252
  return AUXESZ;
582
252
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
coff-tic30.c:coff_swap_aux_out
Line
Count
Source
503
170
{
504
170
  union internal_auxent * in = (union internal_auxent *) inp;
505
170
  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
170
  memset (ext, 0, AUXESZ);
512
513
170
  switch (in_class)
514
170
    {
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
170
    }
542
543
170
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
170
#ifndef NO_TVNDX
545
170
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
170
#endif
547
548
170
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
170
      || ISTAG (in_class))
550
0
    {
551
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
0
    }
554
170
  else
555
170
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
170
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
170
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
170
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
170
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
170
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
170
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
170
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
170
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
170
    }
568
569
170
  if (ISFCN (type))
570
170
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
170
  else
572
170
    {
573
170
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
170
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
170
    }
576
577
170
 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
170
  return AUXESZ;
582
170
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
coff-tic54x.c:coff_swap_aux_out
Line
Count
Source
503
321
{
504
321
  union internal_auxent * in = (union internal_auxent *) inp;
505
321
  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
321
  memset (ext, 0, AUXESZ);
512
513
321
  switch (in_class)
514
321
    {
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
321
    }
542
543
321
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
321
#ifndef NO_TVNDX
545
321
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
321
#endif
547
548
321
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
223
      || ISTAG (in_class))
550
98
    {
551
98
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
98
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
98
    }
554
223
  else
555
223
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
223
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
223
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
223
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
223
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
223
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
223
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
223
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
223
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
223
    }
568
569
321
  if (ISFCN (type))
570
321
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
223
  else
572
223
    {
573
223
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
223
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
223
    }
576
577
321
 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
321
  return AUXESZ;
582
321
}
coff-z80.c:coff_swap_aux_out
Line
Count
Source
503
326
{
504
326
  union internal_auxent * in = (union internal_auxent *) inp;
505
326
  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
326
  memset (ext, 0, AUXESZ);
512
513
326
  switch (in_class)
514
326
    {
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
326
    }
542
543
326
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
326
#ifndef NO_TVNDX
545
326
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
326
#endif
547
548
326
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
20
      || ISTAG (in_class))
550
306
    {
551
306
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
306
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
306
    }
554
20
  else
555
20
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
20
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
20
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
20
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
20
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
20
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
20
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
20
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
20
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
20
    }
568
569
326
  if (ISFCN (type))
570
326
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
20
  else
572
20
    {
573
20
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
20
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
20
    }
576
577
326
 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
326
  return AUXESZ;
582
326
}
coff-z8k.c:coff_swap_aux_out
Line
Count
Source
503
161
{
504
161
  union internal_auxent * in = (union internal_auxent *) inp;
505
161
  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
161
  memset (ext, 0, AUXESZ);
512
513
161
  switch (in_class)
514
161
    {
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
161
    }
542
543
161
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
544
161
#ifndef NO_TVNDX
545
161
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
546
161
#endif
547
548
161
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
549
161
      || ISTAG (in_class))
550
10
    {
551
10
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
552
10
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
553
10
    }
554
151
  else
555
151
    {
556
#if DIMNUM != E_DIMNUM
557
#error we need to cope with truncating or extending DIMNUM
558
#endif
559
151
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
560
151
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
561
151
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
562
151
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
563
151
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
564
151
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
565
151
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
566
151
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
567
151
    }
568
569
161
  if (ISFCN (type))
570
161
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
571
161
  else
572
161
    {
573
161
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
574
161
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
575
161
    }
576
577
161
 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
161
  return AUXESZ;
582
161
}
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
420k
{
591
420k
  LINENO *ext = (LINENO *) ext1;
592
420k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
420k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
420k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
420k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
590
71.9k
{
591
71.9k
  LINENO *ext = (LINENO *) ext1;
592
71.9k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
71.9k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
71.9k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
71.9k
}
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
72.7k
{
591
72.7k
  LINENO *ext = (LINENO *) ext1;
592
72.7k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
72.7k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
72.7k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
72.7k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
590
53.8k
{
591
53.8k
  LINENO *ext = (LINENO *) ext1;
592
53.8k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
53.8k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
53.8k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
53.8k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
590
63.3k
{
591
63.3k
  LINENO *ext = (LINENO *) ext1;
592
63.3k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
63.3k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
63.3k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
63.3k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
590
52.1k
{
591
52.1k
  LINENO *ext = (LINENO *) ext1;
592
52.1k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
52.1k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
52.1k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
52.1k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
590
56.5k
{
591
56.5k
  LINENO *ext = (LINENO *) ext1;
592
56.5k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
56.5k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
56.5k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
56.5k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
590
49.7k
{
591
49.7k
  LINENO *ext = (LINENO *) ext1;
592
49.7k
  struct internal_lineno *in = (struct internal_lineno *) in1;
593
594
49.7k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
595
49.7k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
596
49.7k
}
597
598
static unsigned int
599
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
600
17
{
601
17
  struct internal_lineno *in = (struct internal_lineno *) inp;
602
17
  struct external_lineno *ext = (struct external_lineno *) outp;
603
17
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
604
605
17
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
606
17
  return LINESZ;
607
17
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
coff-z80.c:coff_swap_lineno_out
Line
Count
Source
600
17
{
601
17
  struct internal_lineno *in = (struct internal_lineno *) inp;
602
17
  struct external_lineno *ext = (struct external_lineno *) outp;
603
17
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
604
605
17
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
606
17
  return LINESZ;
607
17
}
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.7k
{
614
12.7k
  AOUTHDR *aouthdr_ext;
615
12.7k
  struct internal_aouthdr *aouthdr_int;
616
617
12.7k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
12.7k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
12.7k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
12.7k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
12.7k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
12.7k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
12.7k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
12.7k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
12.7k
  aouthdr_int->text_start =
626
12.7k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
12.7k
  aouthdr_int->data_start =
628
12.7k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
883
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
990
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
#endif
636
1.87k
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
1.87k
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
1.87k
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
1.87k
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
1.87k
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
1.87k
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
1.87k
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
1.87k
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
1.87k
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
1.87k
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
#ifdef XCOFF64
647
883
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
883
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
649
#else
650
990
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
990
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
#endif
653
#endif
654
655
#ifdef MIPSECOFF
656
971
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
971
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
971
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
971
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
971
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
971
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
971
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
#endif
664
665
#ifdef ALPHAECOFF
666
647
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
647
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
647
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
647
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
#endif
671
12.7k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
613
647
{
614
647
  AOUTHDR *aouthdr_ext;
615
647
  struct internal_aouthdr *aouthdr_int;
616
617
647
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
647
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
647
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
647
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
647
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
647
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
647
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
647
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
647
  aouthdr_int->text_start =
626
647
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
647
  aouthdr_int->data_start =
628
647
    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
647
#ifdef ALPHAECOFF
666
647
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
667
647
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
668
647
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
669
647
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
670
647
#endif
671
647
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.18k
{
614
1.18k
  AOUTHDR *aouthdr_ext;
615
1.18k
  struct internal_aouthdr *aouthdr_int;
616
617
1.18k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.18k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.18k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.18k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.18k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.18k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.18k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.18k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.18k
  aouthdr_int->text_start =
626
1.18k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.18k
  aouthdr_int->data_start =
628
1.18k
    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.18k
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
613
883
{
614
883
  AOUTHDR *aouthdr_ext;
615
883
  struct internal_aouthdr *aouthdr_int;
616
617
883
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
883
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
883
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
883
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
883
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
883
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
883
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
883
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
883
  aouthdr_int->text_start =
626
883
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
883
  aouthdr_int->data_start =
628
883
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
883
#ifdef RS6000COFF_C
631
883
#ifdef XCOFF64
632
883
  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
883
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
883
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
883
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
883
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
883
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
883
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
883
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
883
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
883
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
883
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
646
883
#ifdef XCOFF64
647
883
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
648
883
  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
883
#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
883
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.15k
{
614
1.15k
  AOUTHDR *aouthdr_ext;
615
1.15k
  struct internal_aouthdr *aouthdr_int;
616
617
1.15k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.15k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.15k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.15k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.15k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.15k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.15k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.15k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.15k
  aouthdr_int->text_start =
626
1.15k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.15k
  aouthdr_int->data_start =
628
1.15k
    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.15k
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
613
743
{
614
743
  AOUTHDR *aouthdr_ext;
615
743
  struct internal_aouthdr *aouthdr_int;
616
617
743
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
743
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
743
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
743
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
743
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
743
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
743
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
743
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
743
  aouthdr_int->text_start =
626
743
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
743
  aouthdr_int->data_start =
628
743
    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
743
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
613
743
{
614
743
  AOUTHDR *aouthdr_ext;
615
743
  struct internal_aouthdr *aouthdr_int;
616
617
743
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
743
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
743
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
743
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
743
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
743
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
743
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
743
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
743
  aouthdr_int->text_start =
626
743
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
743
  aouthdr_int->data_start =
628
743
    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
743
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
613
971
{
614
971
  AOUTHDR *aouthdr_ext;
615
971
  struct internal_aouthdr *aouthdr_int;
616
617
971
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
971
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
971
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
971
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
971
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
971
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
971
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
971
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
971
  aouthdr_int->text_start =
626
971
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
971
  aouthdr_int->data_start =
628
971
    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
971
#ifdef MIPSECOFF
656
971
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
657
971
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
658
971
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
659
971
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
660
971
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
661
971
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
662
971
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
663
971
#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
971
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
613
990
{
614
990
  AOUTHDR *aouthdr_ext;
615
990
  struct internal_aouthdr *aouthdr_int;
616
617
990
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
990
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
990
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
990
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
990
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
990
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
990
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
990
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
990
  aouthdr_int->text_start =
626
990
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
990
  aouthdr_int->data_start =
628
990
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
629
630
990
#ifdef RS6000COFF_C
631
#ifdef XCOFF64
632
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
633
#else
634
990
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
635
990
#endif
636
990
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
637
990
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
638
990
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
639
990
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
640
990
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
641
990
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
642
990
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
643
990
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
644
990
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
645
990
  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
990
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
651
990
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
652
990
#endif
653
990
#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
990
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
613
853
{
614
853
  AOUTHDR *aouthdr_ext;
615
853
  struct internal_aouthdr *aouthdr_int;
616
617
853
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
853
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
853
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
853
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
853
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
853
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
853
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
853
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
853
  aouthdr_int->text_start =
626
853
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
853
  aouthdr_int->data_start =
628
853
    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
853
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
613
438
{
614
438
  AOUTHDR *aouthdr_ext;
615
438
  struct internal_aouthdr *aouthdr_int;
616
617
438
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
438
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
438
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
438
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
438
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
438
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
438
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
438
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
438
  aouthdr_int->text_start =
626
438
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
438
  aouthdr_int->data_start =
628
438
    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
438
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
613
742
{
614
742
  AOUTHDR *aouthdr_ext;
615
742
  struct internal_aouthdr *aouthdr_int;
616
617
742
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
742
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
742
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
742
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
742
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
742
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
742
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
742
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
742
  aouthdr_int->text_start =
626
742
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
742
  aouthdr_int->data_start =
628
742
    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
742
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.07k
{
614
1.07k
  AOUTHDR *aouthdr_ext;
615
1.07k
  struct internal_aouthdr *aouthdr_int;
616
617
1.07k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.07k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.07k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.07k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.07k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.07k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.07k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.07k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.07k
  aouthdr_int->text_start =
626
1.07k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.07k
  aouthdr_int->data_start =
628
1.07k
    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.07k
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
613
968
{
614
968
  AOUTHDR *aouthdr_ext;
615
968
  struct internal_aouthdr *aouthdr_int;
616
617
968
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
968
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
968
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
968
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
968
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
968
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
968
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
968
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
968
  aouthdr_int->text_start =
626
968
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
968
  aouthdr_int->data_start =
628
968
    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
968
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
613
1.31k
{
614
1.31k
  AOUTHDR *aouthdr_ext;
615
1.31k
  struct internal_aouthdr *aouthdr_int;
616
617
1.31k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
618
1.31k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
619
1.31k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
620
1.31k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
621
1.31k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
622
1.31k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
623
1.31k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
624
1.31k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
625
1.31k
  aouthdr_int->text_start =
626
1.31k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
627
1.31k
  aouthdr_int->data_start =
628
1.31k
    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.31k
}
672
673
static unsigned int
674
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
675
90
{
676
90
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
90
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
90
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
90
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
90
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
90
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
90
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
90
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
90
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
90
        aouthdr_out->text_start);
687
90
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
90
        aouthdr_out->data_start);
689
690
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
6
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
#endif
696
6
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
6
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
6
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
6
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
6
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
6
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
6
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
6
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
6
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
6
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
706
#ifdef XCOFF64
707
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
708
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
709
#else
710
6
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
6
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
#endif
713
  /* TODO: set o_*psize dynamically */
714
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
6
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
6
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
6
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
6
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
721
#ifdef XCOFF64
722
0
  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
49
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
49
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
49
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
49
  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
11
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
11
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
11
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
11
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
11
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
11
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
#endif
746
747
90
  return AOUTSZ;
748
90
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Line
Count
Source
675
11
{
676
11
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
11
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
11
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
11
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
11
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
11
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
11
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
11
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
11
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
11
        aouthdr_out->text_start);
687
11
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
11
        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
11
#ifdef ALPHAECOFF
738
  /* FIXME: What does bldrev mean?  */
739
11
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
740
11
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
741
11
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
742
11
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
743
11
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
744
11
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
745
11
#endif
746
747
11
  return AOUTSZ;
748
11
}
coff-x86_64.c:coff_swap_aouthdr_out
Line
Count
Source
675
2
{
676
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
2
        aouthdr_out->text_start);
687
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
2
        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
2
  return AOUTSZ;
748
2
}
Unexecuted instantiation: coff64-rs6000.c:coff_swap_aouthdr_out
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
49
{
676
49
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
49
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
49
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
49
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
49
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
49
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
49
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
49
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
49
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
49
        aouthdr_out->text_start);
687
49
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
49
        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
49
#ifdef MIPSECOFF
728
49
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
729
49
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
730
49
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
731
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
732
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
733
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
734
49
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
735
49
#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
49
  return AOUTSZ;
748
49
}
coff-rs6000.c:coff_swap_aouthdr_out
Line
Count
Source
675
6
{
676
6
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
6
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
6
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
6
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
6
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
6
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
6
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
6
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
6
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
6
        aouthdr_out->text_start);
687
6
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
6
        aouthdr_out->data_start);
689
690
6
#ifdef RS6000COFF_C
691
#ifdef XCOFF64
692
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
693
#else
694
6
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
695
6
#endif
696
6
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
697
6
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
698
6
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
699
6
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
700
6
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
701
6
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
702
6
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
703
6
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
704
6
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
705
6
  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
6
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
711
6
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
712
6
#endif
713
  /* TODO: set o_*psize dynamically */
714
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
715
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
716
6
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
717
6
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
718
6
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
719
6
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
720
6
  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
6
#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
6
  return AOUTSZ;
748
6
}
coff-sh.c:coff_swap_aouthdr_out
Line
Count
Source
675
2
{
676
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
2
        aouthdr_out->text_start);
687
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
2
        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
2
  return AOUTSZ;
748
2
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
coff-tic30.c:coff_swap_aouthdr_out
Line
Count
Source
675
1
{
676
1
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
1
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
1
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
1
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
1
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
1
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
1
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
1
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
1
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
1
        aouthdr_out->text_start);
687
1
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
1
        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
1
  return AOUTSZ;
748
1
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
coff-tic54x.c:coff_swap_aouthdr_out
Line
Count
Source
675
2
{
676
2
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
2
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
2
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
2
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
2
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
2
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
2
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
2
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
2
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
2
        aouthdr_out->text_start);
687
2
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
2
        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
2
  return AOUTSZ;
748
2
}
coff-z80.c:coff_swap_aouthdr_out
Line
Count
Source
675
6
{
676
6
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
6
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
6
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
6
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
6
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
6
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
6
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
6
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
6
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
6
        aouthdr_out->text_start);
687
6
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
6
        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
6
  return AOUTSZ;
748
6
}
coff-z8k.c:coff_swap_aouthdr_out
Line
Count
Source
675
11
{
676
11
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
677
11
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
678
679
11
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
680
11
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
681
11
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
682
11
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
683
11
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
684
11
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
685
11
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
686
11
        aouthdr_out->text_start);
687
11
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
688
11
        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
11
  return AOUTSZ;
748
11
}
749
750
ATTRIBUTE_UNUSED
751
static void
752
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
753
1.39M
{
754
1.39M
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
1.39M
  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.39M
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
1.39M
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
1.39M
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
1.39M
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
1.39M
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
1.39M
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
1.39M
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
1.39M
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
1.39M
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
1.39M
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
98.9k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
#endif
775
1.39M
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
753
13.6k
{
754
13.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
13.6k
  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
13.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
13.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
13.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
13.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
13.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
13.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
13.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
13.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
13.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
13.6k
  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
13.6k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
753
143k
{
754
143k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
143k
  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
143k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
143k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
143k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
143k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
143k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
143k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
143k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
143k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
143k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
143k
  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
143k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
753
52.5k
{
754
52.5k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
52.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
52.5k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
52.5k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
52.5k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
52.5k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
52.5k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
52.5k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
52.5k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
52.5k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
52.5k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
52.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
52.5k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
753
189k
{
754
189k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
189k
  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
189k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
189k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
189k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
189k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
189k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
189k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
189k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
189k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
189k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
189k
  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
189k
}
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
167k
{
754
167k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
167k
  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
167k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
167k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
167k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
167k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
167k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
167k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
167k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
167k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
167k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
167k
  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
167k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
753
100k
{
754
100k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
100k
  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
100k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
100k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
100k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
100k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
100k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
100k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
100k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
100k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
100k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
100k
  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
100k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
753
129k
{
754
129k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
129k
  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
129k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
129k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
129k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
129k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
129k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
129k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
129k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
129k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
129k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
129k
  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
129k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
753
96.1k
{
754
96.1k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
96.1k
  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
96.1k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
96.1k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
96.1k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
96.1k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
96.1k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
96.1k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
96.1k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
96.1k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
96.1k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
96.1k
  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
96.1k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
753
98.9k
{
754
98.9k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
98.9k
  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
98.9k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
98.9k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
98.9k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
98.9k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
98.9k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
98.9k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
98.9k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
98.9k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
98.9k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
98.9k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
772
98.9k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
773
98.9k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
774
98.9k
#endif
775
98.9k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
753
153k
{
754
153k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
153k
  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
153k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
153k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
153k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
153k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
153k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
153k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
153k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
153k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
153k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
153k
  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
153k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
753
141k
{
754
141k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
755
141k
  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
141k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
761
762
141k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
763
141k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
764
141k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
765
766
141k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
767
141k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
768
141k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
769
141k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
770
141k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
771
141k
  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
141k
}
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
647
{
782
647
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
647
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
647
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
29
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
#endif
789
647
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
647
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
647
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
647
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
647
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
647
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
647
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
647
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
647
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
647
    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
647
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
647
    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
30
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
647
  return ret;
833
647
}
coff-alpha.c:alpha_ecoff_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
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
#endif
832
20
  return ret;
833
20
}
coff-x86_64.c:coff_swap_scnhdr_out
Line
Count
Source
781
5
{
782
5
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
5
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
5
  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
5
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
5
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
5
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
5
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
5
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
5
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
5
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
5
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
5
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
5
    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
5
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
5
    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
5
  return ret;
833
5
}
coff64-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
781
1
{
782
1
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
1
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
1
  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
1
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
1
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
1
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
1
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
1
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
1
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
1
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
1
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
1
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
1
    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
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
1
    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
1
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
1
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
1
#endif
832
1
  return ret;
833
1
}
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
245
{
782
245
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
245
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
245
  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
245
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
245
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
245
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
245
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
245
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
245
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
245
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
245
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
245
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
245
    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
245
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
245
    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
245
  return ret;
833
245
}
coff-rs6000.c:coff_swap_scnhdr_out
Line
Count
Source
781
19
{
782
19
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
19
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
19
  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
19
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
19
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
19
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
19
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
19
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
19
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
19
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
19
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
19
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
19
    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
19
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
19
    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
19
  return ret;
833
19
}
coff-sh.c:coff_swap_scnhdr_out
Line
Count
Source
781
6
{
782
6
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
6
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
6
  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
6
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
6
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
6
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
6
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
6
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
6
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
6
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
6
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
6
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
6
    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
6
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
6
    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
6
  return ret;
833
6
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
coff-tic30.c:coff_swap_scnhdr_out
Line
Count
Source
781
171
{
782
171
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
171
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
171
  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
171
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
171
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
171
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
171
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
171
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
171
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
171
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
171
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
171
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
171
    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
171
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
171
    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
171
  return ret;
833
171
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
coff-tic54x.c:coff_swap_scnhdr_out
Line
Count
Source
781
29
{
782
29
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
29
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
29
  unsigned int ret = bfd_coff_scnhsz (abfd);
785
786
29
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
787
29
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
788
29
#endif
789
29
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
29
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
29
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
29
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
29
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
29
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
29
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
29
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
29
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
29
    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
29
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
29
    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
29
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
830
29
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
831
29
#endif
832
29
  return ret;
833
29
}
coff-z80.c:coff_swap_scnhdr_out
Line
Count
Source
781
40
{
782
40
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
40
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
40
  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
40
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
40
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
40
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
40
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
40
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
40
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
40
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
40
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
40
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
40
    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
40
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
40
    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
40
  return ret;
833
40
}
coff-z8k.c:coff_swap_scnhdr_out
Line
Count
Source
781
111
{
782
111
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
783
111
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
784
111
  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
111
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
790
791
111
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
792
111
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
793
111
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
794
111
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
795
111
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
796
111
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
797
111
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
798
111
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
799
111
    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
111
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
814
111
    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
111
  return ret;
833
111
}