Coverage Report

Created: 2023-08-28 06:30

/src/binutils-gdb/bfd/coffswap.h
Line
Count
Source (jump to first uncovered line)
1
/* Generic COFF swapping routines, for BFD.
2
   Copyright (C) 1990-2023 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
158k
  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
158k
  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
0
  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
0
  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
372k
  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
123k
  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
0
  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
0
  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
5.45k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
6.28k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
6.28k
  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
5.16k
  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
600k
#define GET_FILEHDR_SYMPTR H_GET_32
100
#endif
101
#ifndef PUT_FILEHDR_SYMPTR
102
0
#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
269
#define GET_AOUTHDR_TSIZE H_GET_32
108
#endif
109
#ifndef PUT_AOUTHDR_TSIZE
110
0
#define PUT_AOUTHDR_TSIZE H_PUT_32
111
#endif
112
#ifndef GET_AOUTHDR_DSIZE
113
269
#define GET_AOUTHDR_DSIZE H_GET_32
114
#endif
115
#ifndef PUT_AOUTHDR_DSIZE
116
0
#define PUT_AOUTHDR_DSIZE H_PUT_32
117
#endif
118
#ifndef GET_AOUTHDR_BSIZE
119
269
#define GET_AOUTHDR_BSIZE H_GET_32
120
#endif
121
#ifndef PUT_AOUTHDR_BSIZE
122
0
#define PUT_AOUTHDR_BSIZE H_PUT_32
123
#endif
124
#ifndef GET_AOUTHDR_ENTRY
125
269
#define GET_AOUTHDR_ENTRY H_GET_32
126
#endif
127
#ifndef PUT_AOUTHDR_ENTRY
128
0
#define PUT_AOUTHDR_ENTRY H_PUT_32
129
#endif
130
#ifndef GET_AOUTHDR_TEXT_START
131
269
#define GET_AOUTHDR_TEXT_START H_GET_32
132
#endif
133
#ifndef PUT_AOUTHDR_TEXT_START
134
0
#define PUT_AOUTHDR_TEXT_START H_PUT_32
135
#endif
136
#ifndef GET_AOUTHDR_DATA_START
137
269
#define GET_AOUTHDR_DATA_START H_GET_32
138
#endif
139
#ifndef PUT_AOUTHDR_DATA_START
140
0
#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
181k
#define GET_SCNHDR_PADDR H_GET_32
146
#endif
147
#ifndef PUT_SCNHDR_PADDR
148
0
#define PUT_SCNHDR_PADDR H_PUT_32
149
#endif
150
#ifndef GET_SCNHDR_VADDR
151
181k
#define GET_SCNHDR_VADDR H_GET_32
152
#endif
153
#ifndef PUT_SCNHDR_VADDR
154
0
#define PUT_SCNHDR_VADDR H_PUT_32
155
#endif
156
#ifndef GET_SCNHDR_SIZE
157
169k
#define GET_SCNHDR_SIZE H_GET_32
158
#endif
159
#ifndef PUT_SCNHDR_SIZE
160
0
#define PUT_SCNHDR_SIZE H_PUT_32
161
#endif
162
#ifndef GET_SCNHDR_SCNPTR
163
181k
#define GET_SCNHDR_SCNPTR H_GET_32
164
#endif
165
#ifndef PUT_SCNHDR_SCNPTR
166
0
#define PUT_SCNHDR_SCNPTR H_PUT_32
167
#endif
168
#ifndef GET_SCNHDR_RELPTR
169
181k
#define GET_SCNHDR_RELPTR H_GET_32
170
#endif
171
#ifndef PUT_SCNHDR_RELPTR
172
0
#define PUT_SCNHDR_RELPTR H_PUT_32
173
#endif
174
#ifndef GET_SCNHDR_LNNOPTR
175
181k
#define GET_SCNHDR_LNNOPTR H_GET_32
176
#endif
177
#ifndef PUT_SCNHDR_LNNOPTR
178
0
#define PUT_SCNHDR_LNNOPTR H_PUT_32
179
#endif
180
#ifndef GET_SCNHDR_NRELOC
181
170k
#define GET_SCNHDR_NRELOC H_GET_16
182
#endif
183
#ifndef MAX_SCNHDR_NRELOC
184
0
#define MAX_SCNHDR_NRELOC 0xffff
185
#endif
186
#ifndef PUT_SCNHDR_NRELOC
187
0
#define PUT_SCNHDR_NRELOC H_PUT_16
188
#endif
189
#ifndef GET_SCNHDR_NLNNO
190
170k
#define GET_SCNHDR_NLNNO H_GET_16
191
#endif
192
#ifndef MAX_SCNHDR_NLNNO
193
0
#define MAX_SCNHDR_NLNNO 0xffff
194
#endif
195
#ifndef PUT_SCNHDR_NLNNO
196
0
#define PUT_SCNHDR_NLNNO H_PUT_16
197
#endif
198
#ifndef GET_SCNHDR_FLAGS
199
173k
#define GET_SCNHDR_FLAGS H_GET_32
200
#endif
201
#ifndef PUT_SCNHDR_FLAGS
202
0
#define PUT_SCNHDR_FLAGS H_PUT_32
203
#endif
204
205
#ifndef GET_RELOC_VADDR
206
5.77k
#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
5.73k
{
217
5.73k
  RELOC *reloc_src = (RELOC *) src;
218
5.73k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
5.73k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
5.73k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
5.73k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
5.32k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
5.73k
}
coff-x86_64.c:coff_swap_reloc_in
Line
Count
Source
216
183
{
217
183
  RELOC *reloc_src = (RELOC *) src;
218
183
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
183
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
183
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
183
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
183
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
124
{
217
124
  RELOC *reloc_src = (RELOC *) src;
218
124
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
124
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
124
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
124
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
124
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
coff-sh.c:coff_swap_reloc_in
Line
Count
Source
216
1.62k
{
217
1.62k
  RELOC *reloc_src = (RELOC *) src;
218
1.62k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
1.62k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
1.62k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
1.62k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
1.62k
#ifdef SWAP_IN_RELOC_OFFSET
225
1.62k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
1.62k
#endif
227
1.62k
}
coff-stgo32.c:coff_swap_reloc_in
Line
Count
Source
216
101
{
217
101
  RELOC *reloc_src = (RELOC *) src;
218
101
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
101
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
101
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
101
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
101
}
coff-tic30.c:coff_swap_reloc_in
Line
Count
Source
216
3.61k
{
217
3.61k
  RELOC *reloc_src = (RELOC *) src;
218
3.61k
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
3.61k
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
3.61k
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
3.61k
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
3.61k
#ifdef SWAP_IN_RELOC_OFFSET
225
3.61k
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
3.61k
#endif
227
3.61k
}
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
46
{
217
46
  RELOC *reloc_src = (RELOC *) src;
218
46
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
46
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
46
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
46
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
46
#ifdef SWAP_IN_RELOC_OFFSET
225
46
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
46
#endif
227
46
}
coff-z8k.c:coff_swap_reloc_in
Line
Count
Source
216
41
{
217
41
  RELOC *reloc_src = (RELOC *) src;
218
41
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
41
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
41
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
41
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
41
#ifdef SWAP_IN_RELOC_OFFSET
225
41
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
41
#endif
227
41
}
228
229
static unsigned int
230
coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
231
0
{
232
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
233
0
  struct external_reloc *reloc_dst = (struct external_reloc *) dst;
234
235
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
236
0
  H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
237
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
238
239
#ifdef SWAP_OUT_RELOC_OFFSET
240
0
  SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
241
#endif
242
#ifdef SWAP_OUT_RELOC_EXTRA
243
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
244
#endif
245
246
0
  return bfd_coff_relsz (abfd);
247
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_out
Unexecuted instantiation: coff-go32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_out
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_out
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_out
248
249
#ifdef TICOFF
250
static void
251
coff_swap_reloc_v0_in (bfd *abfd, void *src, void *dst)
252
43
{
253
43
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
43
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
43
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
43
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
43
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
43
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
coff-tic54x.c:coff_swap_reloc_v0_in
Line
Count
Source
252
43
{
253
43
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
43
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
43
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
43
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
43
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
43
}
260
261
static unsigned int
262
coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst)
263
0
{
264
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
265
0
  struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst;
266
267
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
268
0
  H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
269
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
270
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
271
272
0
  return bfd_coff_relsz (abfd);
273
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out
274
#endif
275
276
#endif /* NO_COFF_RELOCS */
277
278
static void
279
coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
280
685k
{
281
685k
  FILHDR *filehdr_src = (FILHDR *) src;
282
685k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
685k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
685k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
685k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
685k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
685k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
685k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
685k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
171k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
685k
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
28.4k
{
281
28.4k
  FILHDR *filehdr_src = (FILHDR *) src;
282
28.4k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
28.4k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
28.4k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
28.4k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
28.4k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
28.4k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
28.4k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
28.4k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
28.4k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
40.2k
{
281
40.2k
  FILHDR *filehdr_src = (FILHDR *) src;
282
40.2k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
40.2k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
40.2k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
40.2k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
40.2k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
40.2k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
40.2k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
40.2k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
40.2k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
56.9k
{
281
56.9k
  FILHDR *filehdr_src = (FILHDR *) src;
282
56.9k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
56.9k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
56.9k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
56.9k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
56.9k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
56.9k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
56.9k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
56.9k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
56.9k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
40.2k
{
281
40.2k
  FILHDR *filehdr_src = (FILHDR *) src;
282
40.2k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
40.2k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
40.2k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
40.2k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
40.2k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
40.2k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
40.2k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
40.2k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
40.2k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
40.2k
{
281
40.2k
  FILHDR *filehdr_src = (FILHDR *) src;
282
40.2k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
40.2k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
40.2k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
40.2k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
40.2k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
40.2k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
40.2k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
40.2k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
40.2k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
40.2k
{
281
40.2k
  FILHDR *filehdr_src = (FILHDR *) src;
282
40.2k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
40.2k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
40.2k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
40.2k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
40.2k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
40.2k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
40.2k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
40.2k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
40.2k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
85.7k
{
281
85.7k
  FILHDR *filehdr_src = (FILHDR *) src;
282
85.7k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
85.7k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
85.7k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
85.7k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
85.7k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
85.7k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
85.7k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
85.7k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
85.7k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
28.5k
{
281
28.5k
  FILHDR *filehdr_src = (FILHDR *) src;
282
28.5k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
28.5k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
28.5k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
28.5k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
28.5k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
28.5k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
28.5k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
28.5k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
28.5k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
67.7k
{
281
67.7k
  FILHDR *filehdr_src = (FILHDR *) src;
282
67.7k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
67.7k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
67.7k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
67.7k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
67.7k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
67.7k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
67.7k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
67.7k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
67.7k
}
coff-stgo32.c:coff_swap_filehdr_in
Line
Count
Source
280
125
{
281
125
  FILHDR *filehdr_src = (FILHDR *) src;
282
125
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
125
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
125
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
125
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
125
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
125
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
125
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
125
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
125
}
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
28.5k
{
281
28.5k
  FILHDR *filehdr_src = (FILHDR *) src;
282
28.5k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
28.5k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
28.5k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
28.5k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
28.5k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
28.5k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
28.5k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
28.5k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
28.5k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
171k
{
281
171k
  FILHDR *filehdr_src = (FILHDR *) src;
282
171k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
171k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
171k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
171k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
171k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
171k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
171k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
171k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
171k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
171k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
171k
#endif
298
171k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
28.5k
{
281
28.5k
  FILHDR *filehdr_src = (FILHDR *) src;
282
28.5k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
28.5k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
28.5k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
28.5k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
28.5k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
28.5k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
28.5k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
28.5k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
28.5k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
28.5k
{
281
28.5k
  FILHDR *filehdr_src = (FILHDR *) src;
282
28.5k
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
28.5k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
28.5k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
28.5k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
28.5k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
28.5k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
28.5k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
28.5k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
28.5k
}
299
300
static  unsigned int
301
coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
302
0
{
303
0
  struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
304
0
  FILHDR *filehdr_out = (FILHDR *) out;
305
306
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
307
  COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
308
#endif
309
0
  H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
310
0
  H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
311
0
  H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
312
0
  PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
313
0
  H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
314
0
  H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
315
0
  H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
316
317
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
318
0
  COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
319
#endif
320
0
  return bfd_coff_filhsz (abfd);
321
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_filehdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_filehdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_filehdr_out
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
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_filehdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_filehdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_filehdr_out
322
323
#ifndef NO_COFF_SYMBOLS
324
325
static void
326
coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
327
26.3k
{
328
26.3k
  SYMENT *ext = (SYMENT *) ext1;
329
26.3k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
26.3k
  if (ext->e.e_name[0] == 0)
332
19.5k
    {
333
19.5k
      in->_n._n_n._n_zeroes = 0;
334
19.5k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
19.5k
    }
336
6.80k
  else
337
6.80k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
6.80k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
6.80k
#endif
343
6.80k
    }
344
345
26.3k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
26.3k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
26.3k
  if (sizeof (ext->e_type) == 2)
348
26.3k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
26.3k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
26.3k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
11.8k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
26.3k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
1.04k
{
328
1.04k
  SYMENT *ext = (SYMENT *) ext1;
329
1.04k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.04k
  if (ext->e.e_name[0] == 0)
332
610
    {
333
610
      in->_n._n_n._n_zeroes = 0;
334
610
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
610
    }
336
430
  else
337
430
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
430
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
430
#endif
343
430
    }
344
345
1.04k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.04k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.04k
  if (sizeof (ext->e_type) == 2)
348
1.04k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
1.04k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.04k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
1.04k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_in
Unexecuted instantiation: coff-go32.c:coff_swap_sym_in
Unexecuted instantiation: coff-i386.c:coff_swap_sym_in
coff-sh.c:coff_swap_sym_in
Line
Count
Source
327
2.33k
{
328
2.33k
  SYMENT *ext = (SYMENT *) ext1;
329
2.33k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
2.33k
  if (ext->e.e_name[0] == 0)
332
1.70k
    {
333
1.70k
      in->_n._n_n._n_zeroes = 0;
334
1.70k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
1.70k
    }
336
635
  else
337
635
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
635
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
635
#endif
343
635
    }
344
345
2.33k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
2.33k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
2.33k
  if (sizeof (ext->e_type) == 2)
348
2.33k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
2.33k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
2.33k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
2.33k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
834
{
328
834
  SYMENT *ext = (SYMENT *) ext1;
329
834
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
834
  if (ext->e.e_name[0] == 0)
332
682
    {
333
682
      in->_n._n_n._n_zeroes = 0;
334
682
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
682
    }
336
152
  else
337
152
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
152
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
152
#endif
343
152
    }
344
345
834
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
834
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
834
  if (sizeof (ext->e_type) == 2)
348
834
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
834
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
834
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
834
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
11.8k
{
328
11.8k
  SYMENT *ext = (SYMENT *) ext1;
329
11.8k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
11.8k
  if (ext->e.e_name[0] == 0)
332
8.73k
    {
333
8.73k
      in->_n._n_n._n_zeroes = 0;
334
8.73k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
8.73k
    }
336
3.16k
  else
337
3.16k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
3.16k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
3.16k
#endif
343
3.16k
    }
344
345
11.8k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
11.8k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
11.8k
  if (sizeof (ext->e_type) == 2)
348
11.8k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
11.8k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
11.8k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
11.8k
#ifdef COFF_ADJUST_SYM_IN_POST
354
11.8k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
11.8k
#endif
356
11.8k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
9.39k
{
328
9.39k
  SYMENT *ext = (SYMENT *) ext1;
329
9.39k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
9.39k
  if (ext->e.e_name[0] == 0)
332
7.18k
    {
333
7.18k
      in->_n._n_n._n_zeroes = 0;
334
7.18k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
7.18k
    }
336
2.21k
  else
337
2.21k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
2.21k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
2.21k
#endif
343
2.21k
    }
344
345
9.39k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
9.39k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
9.39k
  if (sizeof (ext->e_type) == 2)
348
9.39k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
9.39k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
9.39k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
9.39k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
830
{
328
830
  SYMENT *ext = (SYMENT *) ext1;
329
830
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
830
  if (ext->e.e_name[0] == 0)
332
622
    {
333
622
      in->_n._n_n._n_zeroes = 0;
334
622
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
622
    }
336
208
  else
337
208
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
208
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
208
#endif
343
208
    }
344
345
830
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
830
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
830
  if (sizeof (ext->e_type) == 2)
348
830
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
830
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
830
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
830
}
357
358
static unsigned int
359
coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
360
0
{
361
0
  struct internal_syment *in = (struct internal_syment *) inp;
362
0
  SYMENT *ext =(SYMENT *) extp;
363
364
#ifdef COFF_ADJUST_SYM_OUT_PRE
365
  COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
366
#endif
367
368
0
  if (in->_n._n_name[0] == 0)
369
0
    {
370
0
      H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
371
0
      H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
372
0
    }
373
0
  else
374
0
    {
375
#if SYMNMLEN != E_SYMNMLEN
376
#error we need to cope with truncating or extending SYMNMLEN
377
#else
378
0
      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
379
0
#endif
380
0
    }
381
382
0
  H_PUT_32 (abfd, in->n_value, ext->e_value);
383
0
  H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
384
385
0
  if (sizeof (ext->e_type) == 2)
386
0
    H_PUT_16 (abfd, in->n_type, ext->e_type);
387
0
  else
388
0
    H_PUT_32 (abfd, in->n_type, ext->e_type);
389
390
0
  H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
391
0
  H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
392
393
#ifdef COFF_ADJUST_SYM_OUT_POST
394
0
  COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
395
#endif
396
397
0
  return SYMESZ;
398
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_sym_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_sym_out
Unexecuted instantiation: coff-go32.c:coff_swap_sym_out
Unexecuted instantiation: coff-i386.c:coff_swap_sym_out
Unexecuted instantiation: coff-sh.c:coff_swap_sym_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic30.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_sym_out
Unexecuted instantiation: coff-z80.c:coff_swap_sym_out
Unexecuted instantiation: coff-z8k.c:coff_swap_sym_out
399
400
static void
401
coff_swap_aux_in (bfd *abfd,
402
      void * ext1,
403
      int type,
404
      int in_class,
405
      int indx,
406
      int numaux,
407
      void * in1)
408
530k
{
409
530k
  AUXENT *ext = (AUXENT *) ext1;
410
530k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
530k
  switch (in_class)
417
530k
    {
418
8.07k
    case C_FILE:
419
8.07k
      if (ext->x_file.x_fname[0] == 0)
420
3.22k
  {
421
3.22k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.22k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.22k
  }
424
4.84k
      else
425
4.84k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
4.84k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
4.84k
    else
436
4.84k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
4.84k
#endif
438
4.84k
  }
439
8.07k
      goto end;
440
441
10.5k
    case C_STAT:
442
10.5k
#ifdef C_LEAFSTAT
443
12.0k
    case C_LEAFSTAT:
444
12.0k
#endif
445
15.0k
    case C_HIDDEN:
446
15.0k
      if (type == T_NULL)
447
6.28k
  {
448
6.28k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
6.28k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
6.28k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
6.28k
    in->x_scn.x_checksum = 0;
455
6.28k
    in->x_scn.x_associated = 0;
456
6.28k
    in->x_scn.x_comdat = 0;
457
458
6.28k
    goto end;
459
6.28k
  }
460
8.71k
      break;
461
530k
    }
462
463
515k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
515k
#ifndef NO_TVNDX
465
515k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
515k
#endif
467
468
515k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
515k
      || ISTAG (in_class))
470
158k
    {
471
158k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
158k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
158k
    }
474
356k
  else
475
356k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
356k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
356k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
356k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
356k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
356k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
356k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
356k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
356k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
356k
    }
488
489
515k
  if (ISFCN (type))
490
143k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
372k
  else
492
372k
    {
493
372k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
372k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
372k
    }
496
497
530k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
530k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
19.2k
{
409
19.2k
  AUXENT *ext = (AUXENT *) ext1;
410
19.2k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
19.2k
  switch (in_class)
417
19.2k
    {
418
69
    case C_FILE:
419
69
      if (ext->x_file.x_fname[0] == 0)
420
53
  {
421
53
    in->x_file.x_n.x_n.x_zeroes = 0;
422
53
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
53
  }
424
16
      else
425
16
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
16
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
16
    else
436
16
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
16
#endif
438
16
  }
439
69
      goto end;
440
441
58
    case C_STAT:
442
58
#ifdef C_LEAFSTAT
443
58
    case C_LEAFSTAT:
444
58
#endif
445
58
    case C_HIDDEN:
446
58
      if (type == T_NULL)
447
31
  {
448
31
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
31
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
31
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
31
    in->x_scn.x_checksum = 0;
455
31
    in->x_scn.x_associated = 0;
456
31
    in->x_scn.x_comdat = 0;
457
458
31
    goto end;
459
31
  }
460
27
      break;
461
19.2k
    }
462
463
19.1k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
19.1k
#ifndef NO_TVNDX
465
19.1k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
19.1k
#endif
467
468
19.1k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
19.1k
      || ISTAG (in_class))
470
5.36k
    {
471
5.36k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
5.36k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
5.36k
    }
474
13.7k
  else
475
13.7k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
13.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
13.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
13.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
13.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
13.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
13.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
13.7k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
13.7k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
13.7k
    }
488
489
19.1k
  if (ISFCN (type))
490
5.07k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
14.0k
  else
492
14.0k
    {
493
14.0k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
14.0k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
14.0k
    }
496
497
19.2k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
19.2k
}
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_in
Unexecuted instantiation: coff-go32.c:coff_swap_aux_in
Unexecuted instantiation: coff-i386.c:coff_swap_aux_in
coff-sh.c:coff_swap_aux_in
Line
Count
Source
408
167
{
409
167
  AUXENT *ext = (AUXENT *) ext1;
410
167
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
167
  switch (in_class)
417
167
    {
418
0
    case C_FILE:
419
0
      if (ext->x_file.x_fname[0] == 0)
420
0
  {
421
0
    in->x_file.x_n.x_n.x_zeroes = 0;
422
0
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
0
  }
424
0
      else
425
0
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
0
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
0
    else
436
0
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
0
#endif
438
0
  }
439
0
      goto end;
440
441
1
    case C_STAT:
442
1
#ifdef C_LEAFSTAT
443
1
    case C_LEAFSTAT:
444
1
#endif
445
2
    case C_HIDDEN:
446
2
      if (type == T_NULL)
447
0
  {
448
0
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
0
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
0
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
0
    in->x_scn.x_checksum = 0;
455
0
    in->x_scn.x_associated = 0;
456
0
    in->x_scn.x_comdat = 0;
457
458
0
    goto end;
459
0
  }
460
2
      break;
461
167
    }
462
463
167
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
167
#ifndef NO_TVNDX
465
167
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
167
#endif
467
468
167
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
167
      || ISTAG (in_class))
470
163
    {
471
163
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
163
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
163
    }
474
4
  else
475
4
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
4
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
4
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
4
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
4
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
4
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
4
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
4
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
4
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
4
    }
488
489
167
  if (ISFCN (type))
490
163
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
4
  else
492
4
    {
493
4
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
4
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
4
    }
496
497
167
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
167
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
664
{
409
664
  AUXENT *ext = (AUXENT *) ext1;
410
664
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
664
  switch (in_class)
417
664
    {
418
33
    case C_FILE:
419
33
      if (ext->x_file.x_fname[0] == 0)
420
13
  {
421
13
    in->x_file.x_n.x_n.x_zeroes = 0;
422
13
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
13
  }
424
20
      else
425
20
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
20
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
20
    else
436
20
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
20
#endif
438
20
  }
439
33
      goto end;
440
441
142
    case C_STAT:
442
142
#ifdef C_LEAFSTAT
443
142
    case C_LEAFSTAT:
444
142
#endif
445
142
    case C_HIDDEN:
446
142
      if (type == T_NULL)
447
34
  {
448
34
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
34
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
34
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
34
    in->x_scn.x_checksum = 0;
455
34
    in->x_scn.x_associated = 0;
456
34
    in->x_scn.x_comdat = 0;
457
458
34
    goto end;
459
34
  }
460
108
      break;
461
664
    }
462
463
597
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
597
#ifndef NO_TVNDX
465
597
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
597
#endif
467
468
597
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
597
      || ISTAG (in_class))
470
40
    {
471
40
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
40
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
40
    }
474
557
  else
475
557
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
557
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
557
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
557
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
557
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
557
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
557
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
557
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
557
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
557
    }
488
489
597
  if (ISFCN (type))
490
17
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
580
  else
492
580
    {
493
580
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
580
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
580
    }
496
497
664
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
664
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
382k
{
409
382k
  AUXENT *ext = (AUXENT *) ext1;
410
382k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
382k
  switch (in_class)
417
382k
    {
418
7.97k
    case C_FILE:
419
7.97k
      if (ext->x_file.x_fname[0] == 0)
420
3.15k
  {
421
3.15k
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3.15k
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3.15k
  }
424
4.81k
      else
425
4.81k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
4.81k
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
4.81k
    else
436
4.81k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
4.81k
#endif
438
4.81k
  }
439
7.97k
      goto end;
440
441
3.70k
    case C_STAT:
442
3.70k
#ifdef C_LEAFSTAT
443
5.25k
    case C_LEAFSTAT:
444
5.25k
#endif
445
8.20k
    case C_HIDDEN:
446
8.20k
      if (type == T_NULL)
447
833
  {
448
833
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
833
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
833
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
833
    in->x_scn.x_checksum = 0;
455
833
    in->x_scn.x_associated = 0;
456
833
    in->x_scn.x_comdat = 0;
457
458
833
    goto end;
459
833
  }
460
7.36k
      break;
461
382k
    }
462
463
374k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
374k
#ifndef NO_TVNDX
465
374k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
374k
#endif
467
468
374k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
374k
      || ISTAG (in_class))
470
134k
    {
471
134k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
134k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
134k
    }
474
239k
  else
475
239k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
239k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
239k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
239k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
239k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
239k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
239k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
239k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
239k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
239k
    }
488
489
374k
  if (ISFCN (type))
490
125k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
248k
  else
492
248k
    {
493
248k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
248k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
248k
    }
496
497
382k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
382k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
127k
{
409
127k
  AUXENT *ext = (AUXENT *) ext1;
410
127k
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
127k
  switch (in_class)
417
127k
    {
418
0
    case C_FILE:
419
0
      if (ext->x_file.x_fname[0] == 0)
420
0
  {
421
0
    in->x_file.x_n.x_n.x_zeroes = 0;
422
0
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
0
  }
424
0
      else
425
0
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
0
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
0
    else
436
0
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
0
#endif
438
0
  }
439
0
      goto end;
440
441
6.60k
    case C_STAT:
442
6.60k
#ifdef C_LEAFSTAT
443
6.60k
    case C_LEAFSTAT:
444
6.60k
#endif
445
6.60k
    case C_HIDDEN:
446
6.60k
      if (type == T_NULL)
447
5.39k
  {
448
5.39k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
5.39k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
5.39k
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
5.39k
    in->x_scn.x_checksum = 0;
455
5.39k
    in->x_scn.x_associated = 0;
456
5.39k
    in->x_scn.x_comdat = 0;
457
458
5.39k
    goto end;
459
5.39k
  }
460
1.21k
      break;
461
127k
    }
462
463
121k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
121k
#ifndef NO_TVNDX
465
121k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
121k
#endif
467
468
121k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
121k
      || ISTAG (in_class))
470
18.8k
    {
471
18.8k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
18.8k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
18.8k
    }
474
102k
  else
475
102k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
102k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
102k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
102k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
102k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
102k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
102k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
102k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
102k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
102k
    }
488
489
121k
  if (ISFCN (type))
490
12.6k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
109k
  else
492
109k
    {
493
109k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
109k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
109k
    }
496
497
127k
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
127k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
96
{
409
96
  AUXENT *ext = (AUXENT *) ext1;
410
96
  union internal_auxent *in = (union internal_auxent *) in1;
411
412
#ifdef COFF_ADJUST_AUX_IN_PRE
413
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
414
#endif
415
416
96
  switch (in_class)
417
96
    {
418
0
    case C_FILE:
419
0
      if (ext->x_file.x_fname[0] == 0)
420
0
  {
421
0
    in->x_file.x_n.x_n.x_zeroes = 0;
422
0
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
0
  }
424
0
      else
425
0
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
0
    if (numaux > 1 && obj_pe (abfd))
430
0
      {
431
0
        if (indx == 0)
432
0
    memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
433
0
      numaux * sizeof (AUXENT));
434
0
      }
435
0
    else
436
0
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
0
#endif
438
0
  }
439
0
      goto end;
440
441
0
    case C_STAT:
442
0
#ifdef C_LEAFSTAT
443
0
    case C_LEAFSTAT:
444
0
#endif
445
0
    case C_HIDDEN:
446
0
      if (type == T_NULL)
447
0
  {
448
0
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
0
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
0
    in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
451
452
    /* PE defines some extra fields; we zero them out for
453
       safety.  */
454
0
    in->x_scn.x_checksum = 0;
455
0
    in->x_scn.x_associated = 0;
456
0
    in->x_scn.x_comdat = 0;
457
458
0
    goto end;
459
0
  }
460
0
      break;
461
96
    }
462
463
96
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
96
#ifndef NO_TVNDX
465
96
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
96
#endif
467
468
96
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
96
      || ISTAG (in_class))
470
1
    {
471
1
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
1
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
1
    }
474
95
  else
475
95
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
95
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
95
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
95
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
95
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
95
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
95
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
95
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
95
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
95
    }
488
489
96
  if (ISFCN (type))
490
1
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
95
  else
492
95
    {
493
95
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
95
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
95
    }
496
497
96
 end: ;
498
499
#ifdef COFF_ADJUST_AUX_IN_POST
500
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
501
#endif
502
96
}
503
504
static unsigned int
505
coff_swap_aux_out (bfd * abfd,
506
       void * inp,
507
       int type,
508
       int in_class,
509
       int indx ATTRIBUTE_UNUSED,
510
       int numaux ATTRIBUTE_UNUSED,
511
       void * extp)
512
0
{
513
0
  union internal_auxent * in = (union internal_auxent *) inp;
514
0
  AUXENT *ext = (AUXENT *) extp;
515
516
#ifdef COFF_ADJUST_AUX_OUT_PRE
517
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
518
#endif
519
520
0
  memset (ext, 0, AUXESZ);
521
522
0
  switch (in_class)
523
0
    {
524
0
    case C_FILE:
525
0
      if (in->x_file.x_n.x_fname[0] == 0)
526
0
  {
527
0
    H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
528
0
    H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
529
0
  }
530
0
      else
531
0
  {
532
#if FILNMLEN != E_FILNMLEN
533
#error we need to cope with truncating or extending FILNMLEN
534
#else
535
0
    memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
536
0
#endif
537
0
  }
538
0
      goto end;
539
540
0
    case C_STAT:
541
0
#ifdef C_LEAFSTAT
542
0
    case C_LEAFSTAT:
543
0
#endif
544
0
    case C_HIDDEN:
545
0
      if (type == T_NULL)
546
0
  {
547
0
    PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
548
0
    PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
549
0
    PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
550
0
    goto end;
551
0
  }
552
0
      break;
553
0
    }
554
555
0
  H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
556
0
#ifndef NO_TVNDX
557
0
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
558
0
#endif
559
560
0
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
561
0
      || ISTAG (in_class))
562
0
    {
563
0
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
564
0
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
565
0
    }
566
0
  else
567
0
    {
568
#if DIMNUM != E_DIMNUM
569
#error we need to cope with truncating or extending DIMNUM
570
#endif
571
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
572
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
573
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
574
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
575
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
576
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
577
0
      H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
578
0
         ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
579
0
    }
580
581
0
  if (ISFCN (type))
582
0
    H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
583
0
  else
584
0
    {
585
0
      PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
586
0
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
587
0
    }
588
589
0
 end:
590
#ifdef COFF_ADJUST_AUX_OUT_POST
591
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
592
#endif
593
0
  return AUXESZ;
594
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_aux_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_aux_out
Unexecuted instantiation: coff-go32.c:coff_swap_aux_out
Unexecuted instantiation: coff-i386.c:coff_swap_aux_out
Unexecuted instantiation: coff-sh.c:coff_swap_aux_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aux_out
Unexecuted instantiation: coff-z80.c:coff_swap_aux_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aux_out
595
596
#endif /* NO_COFF_SYMBOLS */
597
598
#ifndef NO_COFF_LINENOS
599
600
static void
601
coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
602
395k
{
603
395k
  LINENO *ext = (LINENO *) ext1;
604
395k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
395k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
395k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
395k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
602
3.04k
{
603
3.04k
  LINENO *ext = (LINENO *) ext1;
604
3.04k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
3.04k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
3.04k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
3.04k
}
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
602
1.64k
{
603
1.64k
  LINENO *ext = (LINENO *) ext1;
604
1.64k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
1.64k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
1.64k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
1.64k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
602
5.83k
{
603
5.83k
  LINENO *ext = (LINENO *) ext1;
604
5.83k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
5.83k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
5.83k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
5.83k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
602
375k
{
603
375k
  LINENO *ext = (LINENO *) ext1;
604
375k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
375k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
375k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
375k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
602
3.52k
{
603
3.52k
  LINENO *ext = (LINENO *) ext1;
604
3.52k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
3.52k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
3.52k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
3.52k
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
602
4.35k
{
603
4.35k
  LINENO *ext = (LINENO *) ext1;
604
4.35k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
4.35k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
4.35k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
4.35k
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
602
1.53k
{
603
1.53k
  LINENO *ext = (LINENO *) ext1;
604
1.53k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
1.53k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
1.53k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
1.53k
}
609
610
static unsigned int
611
coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
612
0
{
613
0
  struct internal_lineno *in = (struct internal_lineno *) inp;
614
0
  struct external_lineno *ext = (struct external_lineno *) outp;
615
0
  H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
616
617
0
  PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
618
0
  return LINESZ;
619
0
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_lineno_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_lineno_out
Unexecuted instantiation: coff-go32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-i386.c:coff_swap_lineno_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_lineno_out
Unexecuted instantiation: coff-sh.c:coff_swap_lineno_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic30.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z80.c:coff_swap_lineno_out
Unexecuted instantiation: coff-z8k.c:coff_swap_lineno_out
620
621
#endif /* NO_COFF_LINENOS */
622
623
static void
624
coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
625
381
{
626
381
  AOUTHDR *aouthdr_ext;
627
381
  struct internal_aouthdr *aouthdr_int;
628
629
381
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
381
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
381
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
381
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
381
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
381
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
381
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
381
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
381
  aouthdr_int->text_start =
638
381
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
381
  aouthdr_int->data_start =
640
381
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
49
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
24
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
73
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
73
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
73
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
73
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
73
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
73
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
73
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
73
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
73
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
73
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
49
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
49
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
24
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
24
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
82
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
82
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
82
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
82
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
82
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
82
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
82
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
63
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
63
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
63
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
63
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
381
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
625
63
{
626
63
  AOUTHDR *aouthdr_ext;
627
63
  struct internal_aouthdr *aouthdr_int;
628
629
63
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
63
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
63
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
63
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
63
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
63
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
63
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
63
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
63
  aouthdr_int->text_start =
638
63
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
63
  aouthdr_int->data_start =
640
63
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
63
#ifdef ALPHAECOFF
678
63
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
63
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
63
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
63
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
63
#endif
683
63
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
625
42
{
626
42
  AOUTHDR *aouthdr_ext;
627
42
  struct internal_aouthdr *aouthdr_int;
628
629
42
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
42
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
42
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
42
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
42
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
42
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
42
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
42
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
42
  aouthdr_int->text_start =
638
42
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
42
  aouthdr_int->data_start =
640
42
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
42
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
49
{
626
49
  AOUTHDR *aouthdr_ext;
627
49
  struct internal_aouthdr *aouthdr_int;
628
629
49
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
49
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
49
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
49
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
49
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
49
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
49
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
49
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
49
  aouthdr_int->text_start =
638
49
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
49
  aouthdr_int->data_start =
640
49
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
49
#ifdef RS6000COFF_C
643
49
#ifdef XCOFF64
644
49
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
49
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
49
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
49
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
49
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
49
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
49
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
49
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
49
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
49
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
49
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
49
#ifdef XCOFF64
659
49
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
49
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
49
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
49
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
625
33
{
626
33
  AOUTHDR *aouthdr_ext;
627
33
  struct internal_aouthdr *aouthdr_int;
628
629
33
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
33
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
33
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
33
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
33
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
33
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
33
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
33
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
33
  aouthdr_int->text_start =
638
33
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
33
  aouthdr_int->data_start =
640
33
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
33
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
625
26
{
626
26
  AOUTHDR *aouthdr_ext;
627
26
  struct internal_aouthdr *aouthdr_int;
628
629
26
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
26
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
26
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
26
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
26
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
26
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
26
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
26
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
26
  aouthdr_int->text_start =
638
26
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
26
  aouthdr_int->data_start =
640
26
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
26
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
625
26
{
626
26
  AOUTHDR *aouthdr_ext;
627
26
  struct internal_aouthdr *aouthdr_int;
628
629
26
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
26
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
26
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
26
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
26
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
26
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
26
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
26
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
26
  aouthdr_int->text_start =
638
26
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
26
  aouthdr_int->data_start =
640
26
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
26
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
625
82
{
626
82
  AOUTHDR *aouthdr_ext;
627
82
  struct internal_aouthdr *aouthdr_int;
628
629
82
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
82
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
82
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
82
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
82
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
82
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
82
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
82
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
82
  aouthdr_int->text_start =
638
82
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
82
  aouthdr_int->data_start =
640
82
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
82
#ifdef MIPSECOFF
668
82
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
82
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
82
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
82
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
82
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
82
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
82
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
82
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
82
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
24
{
626
24
  AOUTHDR *aouthdr_ext;
627
24
  struct internal_aouthdr *aouthdr_int;
628
629
24
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
24
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
24
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
24
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
24
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
24
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
24
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
24
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
24
  aouthdr_int->text_start =
638
24
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
24
  aouthdr_int->data_start =
640
24
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
24
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
24
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
24
#endif
648
24
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
24
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
24
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
24
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
24
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
24
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
24
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
24
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
24
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
24
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
24
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
24
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
24
#endif
665
24
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
24
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
625
14
{
626
14
  AOUTHDR *aouthdr_ext;
627
14
  struct internal_aouthdr *aouthdr_int;
628
629
14
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
14
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
14
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
14
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
14
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
14
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
14
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
14
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
14
  aouthdr_int->text_start =
638
14
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
14
  aouthdr_int->data_start =
640
14
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
14
}
coff-stgo32.c:coff_swap_aouthdr_in
Line
Count
Source
625
7
{
626
7
  AOUTHDR *aouthdr_ext;
627
7
  struct internal_aouthdr *aouthdr_int;
628
629
7
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
7
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
7
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
7
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
7
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
7
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
7
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
7
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
7
  aouthdr_int->text_start =
638
7
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
7
  aouthdr_int->data_start =
640
7
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
7
}
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
625
2
{
626
2
  AOUTHDR *aouthdr_ext;
627
2
  struct internal_aouthdr *aouthdr_int;
628
629
2
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
2
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
2
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
2
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
2
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
2
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
2
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
2
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
2
  aouthdr_int->text_start =
638
2
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
2
  aouthdr_int->data_start =
640
2
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
2
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.c:coff_swap_aouthdr_in
Line
Count
Source
625
1
{
626
1
  AOUTHDR *aouthdr_ext;
627
1
  struct internal_aouthdr *aouthdr_int;
628
629
1
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1
  aouthdr_int->text_start =
638
1
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1
  aouthdr_int->data_start =
640
1
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
1
}
coff-z80.c:coff_swap_aouthdr_in
Line
Count
Source
625
5
{
626
5
  AOUTHDR *aouthdr_ext;
627
5
  struct internal_aouthdr *aouthdr_int;
628
629
5
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
5
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
5
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
5
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
5
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
5
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
5
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
5
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
5
  aouthdr_int->text_start =
638
5
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
5
  aouthdr_int->data_start =
640
5
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
5
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
625
7
{
626
7
  AOUTHDR *aouthdr_ext;
627
7
  struct internal_aouthdr *aouthdr_int;
628
629
7
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
7
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
7
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
7
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
7
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
7
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
7
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
7
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
7
  aouthdr_int->text_start =
638
7
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
7
  aouthdr_int->data_start =
640
7
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
7
}
684
685
static unsigned int
686
coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
687
0
{
688
0
  struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
689
0
  AOUTHDR *aouthdr_out = (AOUTHDR *) out;
690
691
0
  H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
692
0
  H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
693
0
  PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
694
0
  PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
695
0
  PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
696
0
  PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
697
0
  PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
698
0
        aouthdr_out->text_start);
699
0
  PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
700
0
        aouthdr_out->data_start);
701
702
#ifdef RS6000COFF_C
703
#ifdef XCOFF64
704
0
  H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
705
#else
706
0
  H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
707
#endif
708
0
  H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
709
0
  H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
710
0
  H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
711
0
  H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
712
0
  H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
713
0
  H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
714
0
  H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
715
0
  H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
716
0
  H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
717
0
  H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
718
#ifdef XCOFF64
719
0
  H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
720
0
  H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
721
#else
722
0
  H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
723
0
  H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
724
#endif
725
  /* TODO: set o_*psize dynamically */
726
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize);
727
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize);
728
0
  H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize);
729
0
  H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags);
730
0
  H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata);
731
0
  H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss);
732
0
  H_PUT_32 (abfd, 0, aouthdr_out->o_debugger);
733
#ifdef XCOFF64
734
0
  H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags);
735
  memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
736
#endif
737
#endif
738
739
#ifdef MIPSECOFF
740
0
  H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
741
0
  H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
742
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
743
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
744
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
745
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
746
0
  H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
747
#endif
748
749
#ifdef ALPHAECOFF
750
  /* FIXME: What does bldrev mean?  */
751
0
  H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
752
0
  H_PUT_16 (abfd, 0, aouthdr_out->padding);
753
0
  H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
754
0
  H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
755
0
  H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
756
0
  H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
757
#endif
758
759
0
  return AOUTSZ;
760
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_aouthdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_aouthdr_out
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
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_aouthdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_aouthdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_aouthdr_out
761
762
ATTRIBUTE_UNUSED
763
static void
764
coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
765
176k
{
766
176k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
176k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
176k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
176k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
176k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
176k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
176k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
176k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
176k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
176k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
176k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
176k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
11.4k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
176k
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
765
902
{
766
902
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
902
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
902
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
902
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
902
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
902
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
902
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
902
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
902
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
902
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
902
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
902
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
902
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
765
6.18k
{
766
6.18k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
6.18k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
6.18k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
6.18k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
6.18k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
6.18k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
6.18k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
6.18k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
6.18k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
6.18k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
6.18k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
6.18k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
6.18k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
2.70k
{
766
2.70k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.70k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.70k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.70k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.70k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.70k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.70k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.70k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.70k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.70k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.70k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.70k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
2.70k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
765
9.20k
{
766
9.20k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
9.20k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
9.20k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
9.20k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
9.20k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
9.20k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
9.20k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
9.20k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
9.20k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
9.20k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
9.20k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
9.20k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
9.20k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
765
7.30k
{
766
7.30k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
7.30k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
7.30k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
7.30k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
7.30k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
7.30k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
7.30k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
7.30k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
7.30k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
7.30k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
7.30k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
7.30k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
7.30k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
765
8.73k
{
766
8.73k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
8.73k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
8.73k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
8.73k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
8.73k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
8.73k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
8.73k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
8.73k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
8.73k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
8.73k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
8.73k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
8.73k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
8.73k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
2.14k
{
766
2.14k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.14k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.14k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.14k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.14k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.14k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.14k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.14k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.14k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.14k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.14k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.14k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
2.14k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
765
10.6k
{
766
10.6k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
10.6k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
10.6k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
10.6k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
10.6k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
10.6k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
10.6k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
10.6k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
10.6k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
10.6k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
10.6k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
10.6k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
10.6k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
765
110k
{
766
110k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
110k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
110k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
110k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
110k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
110k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
110k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
110k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
110k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
110k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
110k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
110k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
110k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
765
11.4k
{
766
11.4k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
11.4k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
11.4k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
11.4k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
11.4k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
11.4k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
11.4k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
11.4k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
11.4k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
11.4k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
11.4k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
11.4k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
11.4k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
11.4k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
11.4k
#endif
787
11.4k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
765
2.51k
{
766
2.51k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.51k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
2.51k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.51k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.51k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.51k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.51k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.51k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.51k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.51k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.51k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.51k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
2.51k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
765
4.89k
{
766
4.89k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
4.89k
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
768
769
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
770
  COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
771
#endif
772
4.89k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
4.89k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
4.89k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
4.89k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
4.89k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
4.89k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
4.89k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
4.89k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
4.89k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
4.89k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
4.89k
}
788
789
ATTRIBUTE_UNUSED
790
static unsigned int
791
coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
792
0
{
793
0
  struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
794
0
  SCNHDR *scnhdr_ext = (SCNHDR *) out;
795
0
  unsigned int ret = bfd_coff_scnhsz (abfd);
796
797
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
798
0
  COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
799
#endif
800
0
  memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
801
802
0
  PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
803
0
  PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
804
0
  PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
805
0
  PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
806
0
  PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
807
0
  PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
808
0
  PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
809
0
  if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
810
0
    PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
811
0
  else
812
0
    {
813
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
814
815
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
816
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
817
0
      _bfd_error_handler
818
  /* xgettext:c-format */
819
0
  (_("%pB: warning: %s: line number overflow: 0x%lx > 0xffff"),
820
0
   abfd, buf, scnhdr_int->s_nlnno);
821
0
      PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
822
0
    }
823
824
0
  if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
825
0
    PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
826
0
  else
827
0
    {
828
0
      char buf[sizeof (scnhdr_int->s_name) + 1];
829
830
0
      memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
831
0
      buf[sizeof (scnhdr_int->s_name)] = '\0';
832
      /* xgettext:c-format */
833
0
      _bfd_error_handler (_("%pB: %s: reloc overflow: 0x%lx > 0xffff"),
834
0
        abfd, buf, scnhdr_int->s_nreloc);
835
0
      bfd_set_error (bfd_error_file_truncated);
836
0
      PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
837
0
      ret = 0;
838
0
    }
839
840
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
841
0
  COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
842
#endif
843
0
  return ret;
844
0
}
Unexecuted instantiation: coff-alpha.c:alpha_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-x86_64.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff64-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: cf-i386lynx.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-i386.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-mips.c:mips_ecoff_swap_scnhdr_out
Unexecuted instantiation: coff-rs6000.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-sh.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic30.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z80.c:coff_swap_scnhdr_out
Unexecuted instantiation: coff-z8k.c:coff_swap_scnhdr_out