Coverage Report

Created: 2023-08-28 06:25

/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
11.1k
  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
11.1k
  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
35.4k
  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
29.1k
  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
1.75k
  H_GET_32 (abfd, ext->x_scn.x_scnlen)
67
#endif
68
#ifndef GET_SCN_NRELOC
69
#define GET_SCN_NRELOC(abfd, ext) \
70
1.76k
  H_GET_16 (abfd, ext->x_scn.x_nreloc)
71
#endif
72
#ifndef GET_SCN_NLINNO
73
#define GET_SCN_NLINNO(abfd, ext) \
74
1.76k
  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
22.8k
  H_GET_16 (abfd, ext->l_lnno);
91
#endif
92
#ifndef PUT_LINENO_LNNO
93
#define PUT_LINENO_LNNO(abfd, val, ext) \
94
0
  H_PUT_16 (abfd, val, ext->l_lnno);
95
#endif
96
97
/* The f_symptr field in the filehdr is sometimes 64 bits.  */
98
#ifndef GET_FILEHDR_SYMPTR
99
2.36M
#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
1.13k
#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
1.13k
#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
1.13k
#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
1.13k
#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
1.13k
#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
1.13k
#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
1.06M
#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
1.06M
#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
1.05M
#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
1.06M
#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
1.06M
#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
1.06M
#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
1.05M
#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
1.05M
#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
1.12M
#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
320
#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
320
{
217
320
  RELOC *reloc_src = (RELOC *) src;
218
320
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
320
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
320
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
320
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
223
224
#ifdef SWAP_IN_RELOC_OFFSET
225
0
  reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
226
#endif
227
320
}
Unexecuted instantiation: coff-x86_64.c:coff_swap_reloc_in
Unexecuted instantiation: cf-i386lynx.c:coff_swap_reloc_in
coff-go32.c:coff_swap_reloc_in
Line
Count
Source
216
320
{
217
320
  RELOC *reloc_src = (RELOC *) src;
218
320
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
219
220
320
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
221
320
  reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
222
320
  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
320
}
Unexecuted instantiation: coff-i386.c:coff_swap_reloc_in
Unexecuted instantiation: coff-sh.c:coff_swap_reloc_in
Unexecuted instantiation: coff-stgo32.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic30.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_in
Unexecuted instantiation: coff-z80.c:coff_swap_reloc_in
Unexecuted instantiation: coff-z8k.c:coff_swap_reloc_in
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
0
{
253
0
  struct external_reloc_v0 *reloc_src = (struct external_reloc_v0 *) src;
254
0
  struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
255
256
0
  reloc_dst->r_vaddr  = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
257
0
  reloc_dst->r_symndx = H_GET_16 (abfd, reloc_src->r_symndx);
258
0
  reloc_dst->r_type   = H_GET_16 (abfd, reloc_src->r_type);
259
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_in
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_in
260
261
static unsigned int
262
coff_swap_reloc_v0_out (bfd *abfd, void *src, void *dst)
263
0
{
264
0
  struct internal_reloc *reloc_src = (struct internal_reloc *) src;
265
0
  struct external_reloc_v0 *reloc_dst = (struct external_reloc_v0 *) dst;
266
267
0
  PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
268
0
  H_PUT_16 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
269
0
  H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
270
0
  SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
271
272
0
  return bfd_coff_relsz (abfd);
273
0
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_reloc_v0_out
Unexecuted instantiation: coff-tic54x.c:coff_swap_reloc_v0_out
274
#endif
275
276
#endif /* NO_COFF_RELOCS */
277
278
static void
279
coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
280
2.70M
{
281
2.70M
  FILHDR *filehdr_src = (FILHDR *) src;
282
2.70M
  struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
283
284
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
285
  COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
286
#endif
287
2.70M
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
2.70M
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
2.70M
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
2.70M
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
2.70M
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
2.70M
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
2.70M
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
684k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
#endif
298
2.70M
}
coff-alpha.c:alpha_ecoff_swap_filehdr_in
Line
Count
Source
280
113k
{
281
113k
  FILHDR *filehdr_src = (FILHDR *) src;
282
113k
  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
113k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
113k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
113k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
113k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
113k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
113k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
113k
  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
113k
}
coff-x86_64.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff64-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
227k
{
281
227k
  FILHDR *filehdr_src = (FILHDR *) src;
282
227k
  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
227k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
227k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
227k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
227k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
227k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
227k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
227k
  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
227k
}
cf-i386lynx.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff-go32.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff-i386.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff-mips.c:mips_ecoff_swap_filehdr_in
Line
Count
Source
280
342k
{
281
342k
  FILHDR *filehdr_src = (FILHDR *) src;
282
342k
  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
342k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
342k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
342k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
342k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
342k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
342k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
342k
  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
342k
}
coff-rs6000.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff-sh.c:coff_swap_filehdr_in
Line
Count
Source
280
427k
{
281
427k
  FILHDR *filehdr_src = (FILHDR *) src;
282
427k
  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
427k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
427k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
427k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
427k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
427k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
427k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
427k
  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
427k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_filehdr_in
coff-tic30.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_filehdr_in
coff-tic54x.c:coff_swap_filehdr_in
Line
Count
Source
280
684k
{
281
684k
  FILHDR *filehdr_src = (FILHDR *) src;
282
684k
  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
684k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
684k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
684k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
684k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
684k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
684k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
684k
  filehdr_dst->f_flags  = H_GET_16 (abfd, filehdr_src->f_flags);
294
295
684k
#ifdef COFF_ADJUST_FILEHDR_IN_POST
296
684k
  COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
297
684k
#endif
298
684k
}
coff-z80.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
coff-z8k.c:coff_swap_filehdr_in
Line
Count
Source
280
114k
{
281
114k
  FILHDR *filehdr_src = (FILHDR *) src;
282
114k
  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
114k
  filehdr_dst->f_magic  = H_GET_16 (abfd, filehdr_src->f_magic);
288
114k
  filehdr_dst->f_nscns  = H_GET_16 (abfd, filehdr_src->f_nscns);
289
114k
  filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
290
114k
  filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
291
114k
  filehdr_dst->f_nsyms  = H_GET_32 (abfd, filehdr_src->f_nsyms);
292
114k
  filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
293
114k
  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
114k
}
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
12.4k
{
328
12.4k
  SYMENT *ext = (SYMENT *) ext1;
329
12.4k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
12.4k
  if (ext->e.e_name[0] == 0)
332
7.66k
    {
333
7.66k
      in->_n._n_n._n_zeroes = 0;
334
7.66k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
7.66k
    }
336
4.83k
  else
337
4.83k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
4.83k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
4.83k
#endif
343
4.83k
    }
344
345
12.4k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
12.4k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
12.4k
  if (sizeof (ext->e_type) == 2)
348
12.4k
    in->n_type = H_GET_16 (abfd, ext->e_type);
349
0
  else
350
0
    in->n_type = H_GET_32 (abfd, ext->e_type);
351
12.4k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
12.4k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
#ifdef COFF_ADJUST_SYM_IN_POST
354
2.16k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
#endif
356
12.4k
}
coff-x86_64.c:coff_swap_sym_in
Line
Count
Source
327
1.77k
{
328
1.77k
  SYMENT *ext = (SYMENT *) ext1;
329
1.77k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.77k
  if (ext->e.e_name[0] == 0)
332
857
    {
333
857
      in->_n._n_n._n_zeroes = 0;
334
857
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
857
    }
336
916
  else
337
916
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
916
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
916
#endif
343
916
    }
344
345
1.77k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.77k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.77k
  if (sizeof (ext->e_type) == 2)
348
1.77k
    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.77k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.77k
  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.77k
}
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
3.39k
{
328
3.39k
  SYMENT *ext = (SYMENT *) ext1;
329
3.39k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
3.39k
  if (ext->e.e_name[0] == 0)
332
3.03k
    {
333
3.03k
      in->_n._n_n._n_zeroes = 0;
334
3.03k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
3.03k
    }
336
356
  else
337
356
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
356
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
356
#endif
343
356
    }
344
345
3.39k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
3.39k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
3.39k
  if (sizeof (ext->e_type) == 2)
348
3.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
3.39k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
3.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
3.39k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_sym_in
coff-tic30.c:coff_swap_sym_in
Line
Count
Source
327
1.58k
{
328
1.58k
  SYMENT *ext = (SYMENT *) ext1;
329
1.58k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.58k
  if (ext->e.e_name[0] == 0)
332
817
    {
333
817
      in->_n._n_n._n_zeroes = 0;
334
817
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
817
    }
336
763
  else
337
763
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
763
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
763
#endif
343
763
    }
344
345
1.58k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.58k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.58k
  if (sizeof (ext->e_type) == 2)
348
1.58k
    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.58k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.58k
  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.58k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_sym_in
coff-tic54x.c:coff_swap_sym_in
Line
Count
Source
327
2.16k
{
328
2.16k
  SYMENT *ext = (SYMENT *) ext1;
329
2.16k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
2.16k
  if (ext->e.e_name[0] == 0)
332
1.38k
    {
333
1.38k
      in->_n._n_n._n_zeroes = 0;
334
1.38k
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
1.38k
    }
336
779
  else
337
779
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
779
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
779
#endif
343
779
    }
344
345
2.16k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
2.16k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
2.16k
  if (sizeof (ext->e_type) == 2)
348
2.16k
    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.16k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
2.16k
  in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
353
2.16k
#ifdef COFF_ADJUST_SYM_IN_POST
354
2.16k
  COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
355
2.16k
#endif
356
2.16k
}
coff-z80.c:coff_swap_sym_in
Line
Count
Source
327
2.53k
{
328
2.53k
  SYMENT *ext = (SYMENT *) ext1;
329
2.53k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
2.53k
  if (ext->e.e_name[0] == 0)
332
945
    {
333
945
      in->_n._n_n._n_zeroes = 0;
334
945
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
945
    }
336
1.58k
  else
337
1.58k
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
1.58k
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
1.58k
#endif
343
1.58k
    }
344
345
2.53k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
2.53k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
2.53k
  if (sizeof (ext->e_type) == 2)
348
2.53k
    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.53k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
2.53k
  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.53k
}
coff-z8k.c:coff_swap_sym_in
Line
Count
Source
327
1.05k
{
328
1.05k
  SYMENT *ext = (SYMENT *) ext1;
329
1.05k
  struct internal_syment *in = (struct internal_syment *) in1;
330
331
1.05k
  if (ext->e.e_name[0] == 0)
332
621
    {
333
621
      in->_n._n_n._n_zeroes = 0;
334
621
      in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
335
621
    }
336
434
  else
337
434
    {
338
#if SYMNMLEN != E_SYMNMLEN
339
#error we need to cope with truncating or extending SYMNMLEN
340
#else
341
434
      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
342
434
#endif
343
434
    }
344
345
1.05k
  in->n_value = H_GET_32 (abfd, ext->e_value);
346
1.05k
  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
347
1.05k
  if (sizeof (ext->e_type) == 2)
348
1.05k
    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.05k
  in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
352
1.05k
  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.05k
}
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
45.4k
{
409
45.4k
  AUXENT *ext = (AUXENT *) ext1;
410
45.4k
  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
45.4k
  switch (in_class)
417
45.4k
    {
418
2.99k
    case C_FILE:
419
2.99k
      if (ext->x_file.x_fname[0] == 0)
420
531
  {
421
531
    in->x_file.x_n.x_n.x_zeroes = 0;
422
531
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
531
  }
424
2.46k
      else
425
2.46k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
2.46k
    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
2.46k
    else
436
2.46k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
2.46k
#endif
438
2.46k
  }
439
2.99k
      goto end;
440
441
3.09k
    case C_STAT:
442
3.09k
#ifdef C_LEAFSTAT
443
3.09k
    case C_LEAFSTAT:
444
3.09k
#endif
445
5.78k
    case C_HIDDEN:
446
5.78k
      if (type == T_NULL)
447
1.76k
  {
448
1.76k
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
1.76k
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
1.76k
    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
1.76k
    in->x_scn.x_checksum = 0;
455
1.76k
    in->x_scn.x_associated = 0;
456
1.76k
    in->x_scn.x_comdat = 0;
457
458
1.76k
    goto end;
459
1.76k
  }
460
4.02k
      break;
461
45.4k
    }
462
463
40.6k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
40.6k
#ifndef NO_TVNDX
465
40.6k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
40.6k
#endif
467
468
40.6k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
40.6k
      || ISTAG (in_class))
470
11.1k
    {
471
11.1k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
11.1k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
11.1k
    }
474
29.5k
  else
475
29.5k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
29.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
29.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
29.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
29.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
29.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
29.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
29.5k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
29.5k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
29.5k
    }
488
489
40.6k
  if (ISFCN (type))
490
5.23k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
35.4k
  else
492
35.4k
    {
493
35.4k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
35.4k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
35.4k
    }
496
497
45.4k
 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
45.4k
}
coff-x86_64.c:coff_swap_aux_in
Line
Count
Source
408
8.81k
{
409
8.81k
  AUXENT *ext = (AUXENT *) ext1;
410
8.81k
  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
8.81k
  switch (in_class)
417
8.81k
    {
418
237
    case C_FILE:
419
237
      if (ext->x_file.x_fname[0] == 0)
420
105
  {
421
105
    in->x_file.x_n.x_n.x_zeroes = 0;
422
105
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
105
  }
424
132
      else
425
132
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
132
    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
132
    else
436
132
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
132
#endif
438
132
  }
439
237
      goto end;
440
441
516
    case C_STAT:
442
516
#ifdef C_LEAFSTAT
443
516
    case C_LEAFSTAT:
444
516
#endif
445
1.14k
    case C_HIDDEN:
446
1.14k
      if (type == T_NULL)
447
174
  {
448
174
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
174
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
174
    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
174
    in->x_scn.x_checksum = 0;
455
174
    in->x_scn.x_associated = 0;
456
174
    in->x_scn.x_comdat = 0;
457
458
174
    goto end;
459
174
  }
460
972
      break;
461
8.81k
    }
462
463
8.40k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
8.40k
#ifndef NO_TVNDX
465
8.40k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
8.40k
#endif
467
468
8.40k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
8.40k
      || ISTAG (in_class))
470
3.36k
    {
471
3.36k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
3.36k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
3.36k
    }
474
5.04k
  else
475
5.04k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
5.04k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
5.04k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
5.04k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
5.04k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
5.04k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
5.04k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
5.04k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
5.04k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
5.04k
    }
488
489
8.40k
  if (ISFCN (type))
490
1.34k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
7.05k
  else
492
7.05k
    {
493
7.05k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
7.05k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
7.05k
    }
496
497
8.81k
 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
8.81k
}
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
4.62k
{
409
4.62k
  AUXENT *ext = (AUXENT *) ext1;
410
4.62k
  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
4.62k
  switch (in_class)
417
4.62k
    {
418
275
    case C_FILE:
419
275
      if (ext->x_file.x_fname[0] == 0)
420
130
  {
421
130
    in->x_file.x_n.x_n.x_zeroes = 0;
422
130
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
130
  }
424
145
      else
425
145
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
145
    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
145
    else
436
145
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
145
#endif
438
145
  }
439
275
      goto end;
440
441
1.33k
    case C_STAT:
442
1.33k
#ifdef C_LEAFSTAT
443
1.33k
    case C_LEAFSTAT:
444
1.33k
#endif
445
1.44k
    case C_HIDDEN:
446
1.44k
      if (type == T_NULL)
447
844
  {
448
844
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
844
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
844
    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
844
    in->x_scn.x_checksum = 0;
455
844
    in->x_scn.x_associated = 0;
456
844
    in->x_scn.x_comdat = 0;
457
458
844
    goto end;
459
844
  }
460
603
      break;
461
4.62k
    }
462
463
3.50k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
3.50k
#ifndef NO_TVNDX
465
3.50k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
3.50k
#endif
467
468
3.50k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
3.50k
      || ISTAG (in_class))
470
1.09k
    {
471
1.09k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
1.09k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
1.09k
    }
474
2.41k
  else
475
2.41k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
2.41k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
2.41k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
2.41k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
2.41k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
2.41k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
2.41k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
2.41k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
2.41k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
2.41k
    }
488
489
3.50k
  if (ISFCN (type))
490
573
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
2.93k
  else
492
2.93k
    {
493
2.93k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
2.93k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
2.93k
    }
496
497
4.62k
 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
4.62k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aux_in
coff-tic30.c:coff_swap_aux_in
Line
Count
Source
408
7.57k
{
409
7.57k
  AUXENT *ext = (AUXENT *) ext1;
410
7.57k
  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
7.57k
  switch (in_class)
417
7.57k
    {
418
579
    case C_FILE:
419
579
      if (ext->x_file.x_fname[0] == 0)
420
88
  {
421
88
    in->x_file.x_n.x_n.x_zeroes = 0;
422
88
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
88
  }
424
491
      else
425
491
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
491
    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
491
    else
436
491
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
491
#endif
438
491
  }
439
579
      goto end;
440
441
652
    case C_STAT:
442
652
#ifdef C_LEAFSTAT
443
652
    case C_LEAFSTAT:
444
652
#endif
445
1.34k
    case C_HIDDEN:
446
1.34k
      if (type == T_NULL)
447
487
  {
448
487
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
487
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
487
    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
487
    in->x_scn.x_checksum = 0;
455
487
    in->x_scn.x_associated = 0;
456
487
    in->x_scn.x_comdat = 0;
457
458
487
    goto end;
459
487
  }
460
862
      break;
461
7.57k
    }
462
463
6.50k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
6.50k
#ifndef NO_TVNDX
465
6.50k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
6.50k
#endif
467
468
6.50k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
6.50k
      || ISTAG (in_class))
470
2.69k
    {
471
2.69k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
2.69k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
2.69k
    }
474
3.80k
  else
475
3.80k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
3.80k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
3.80k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
3.80k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
3.80k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
3.80k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
3.80k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
3.80k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
3.80k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
3.80k
    }
488
489
6.50k
  if (ISFCN (type))
490
1.59k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
4.90k
  else
492
4.90k
    {
493
4.90k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
4.90k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
4.90k
    }
496
497
7.57k
 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
7.57k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aux_in
coff-tic54x.c:coff_swap_aux_in
Line
Count
Source
408
6.95k
{
409
6.95k
  AUXENT *ext = (AUXENT *) ext1;
410
6.95k
  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
6.95k
  switch (in_class)
417
6.95k
    {
418
348
    case C_FILE:
419
348
      if (ext->x_file.x_fname[0] == 0)
420
124
  {
421
124
    in->x_file.x_n.x_n.x_zeroes = 0;
422
124
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
124
  }
424
224
      else
425
224
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
224
    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
224
    else
436
224
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
224
#endif
438
224
  }
439
348
      goto end;
440
441
230
    case C_STAT:
442
230
#ifdef C_LEAFSTAT
443
230
    case C_LEAFSTAT:
444
230
#endif
445
337
    case C_HIDDEN:
446
337
      if (type == T_NULL)
447
14
  {
448
14
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
14
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
14
    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
14
    in->x_scn.x_checksum = 0;
455
14
    in->x_scn.x_associated = 0;
456
14
    in->x_scn.x_comdat = 0;
457
458
14
    goto end;
459
14
  }
460
323
      break;
461
6.95k
    }
462
463
6.59k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
6.59k
#ifndef NO_TVNDX
465
6.59k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
6.59k
#endif
467
468
6.59k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
6.59k
      || ISTAG (in_class))
470
1.50k
    {
471
1.50k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
1.50k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
1.50k
    }
474
5.08k
  else
475
5.08k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
5.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
5.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
5.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
5.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
5.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
5.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
5.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
5.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
5.08k
    }
488
489
6.59k
  if (ISFCN (type))
490
328
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
6.26k
  else
492
6.26k
    {
493
6.26k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
6.26k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
6.26k
    }
496
497
6.95k
 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
6.95k
}
coff-z80.c:coff_swap_aux_in
Line
Count
Source
408
14.3k
{
409
14.3k
  AUXENT *ext = (AUXENT *) ext1;
410
14.3k
  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
14.3k
  switch (in_class)
417
14.3k
    {
418
1.29k
    case C_FILE:
419
1.29k
      if (ext->x_file.x_fname[0] == 0)
420
3
  {
421
3
    in->x_file.x_n.x_n.x_zeroes = 0;
422
3
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
3
  }
424
1.29k
      else
425
1.29k
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
1.29k
    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
1.29k
    else
436
1.29k
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
1.29k
#endif
438
1.29k
  }
439
1.29k
      goto end;
440
441
207
    case C_STAT:
442
207
#ifdef C_LEAFSTAT
443
207
    case C_LEAFSTAT:
444
207
#endif
445
1.06k
    case C_HIDDEN:
446
1.06k
      if (type == T_NULL)
447
33
  {
448
33
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
33
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
33
    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
33
    in->x_scn.x_checksum = 0;
455
33
    in->x_scn.x_associated = 0;
456
33
    in->x_scn.x_comdat = 0;
457
458
33
    goto end;
459
33
  }
460
1.03k
      break;
461
14.3k
    }
462
463
13.0k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
13.0k
#ifndef NO_TVNDX
465
13.0k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
13.0k
#endif
467
468
13.0k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
13.0k
      || ISTAG (in_class))
470
1.89k
    {
471
1.89k
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
1.89k
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
1.89k
    }
474
11.1k
  else
475
11.1k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
11.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
11.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
11.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
11.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
11.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
11.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
11.1k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
11.1k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
11.1k
    }
488
489
13.0k
  if (ISFCN (type))
490
1.20k
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
11.8k
  else
492
11.8k
    {
493
11.8k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
11.8k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
11.8k
    }
496
497
14.3k
 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
14.3k
}
coff-z8k.c:coff_swap_aux_in
Line
Count
Source
408
3.12k
{
409
3.12k
  AUXENT *ext = (AUXENT *) ext1;
410
3.12k
  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
3.12k
  switch (in_class)
417
3.12k
    {
418
258
    case C_FILE:
419
258
      if (ext->x_file.x_fname[0] == 0)
420
81
  {
421
81
    in->x_file.x_n.x_n.x_zeroes = 0;
422
81
    in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
423
81
  }
424
177
      else
425
177
  {
426
#if FILNMLEN != E_FILNMLEN
427
#error we need to cope with truncating or extending FILNMLEN
428
#else
429
177
    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
177
    else
436
177
      memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
437
177
#endif
438
177
  }
439
258
      goto end;
440
441
155
    case C_STAT:
442
155
#ifdef C_LEAFSTAT
443
155
    case C_LEAFSTAT:
444
155
#endif
445
443
    case C_HIDDEN:
446
443
      if (type == T_NULL)
447
216
  {
448
216
    in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
449
216
    in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
450
216
    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
216
    in->x_scn.x_checksum = 0;
455
216
    in->x_scn.x_associated = 0;
456
216
    in->x_scn.x_comdat = 0;
457
458
216
    goto end;
459
216
  }
460
227
      break;
461
3.12k
    }
462
463
2.65k
  in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
464
2.65k
#ifndef NO_TVNDX
465
2.65k
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
466
2.65k
#endif
467
468
2.65k
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
469
2.65k
      || ISTAG (in_class))
470
567
    {
471
567
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
472
567
      in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
473
567
    }
474
2.08k
  else
475
2.08k
    {
476
#if DIMNUM != E_DIMNUM
477
#error we need to cope with truncating or extending DIMNUM
478
#endif
479
2.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[0] =
480
2.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
481
2.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[1] =
482
2.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
483
2.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[2] =
484
2.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
485
2.08k
      in->x_sym.x_fcnary.x_ary.x_dimen[3] =
486
2.08k
  H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
487
2.08k
    }
488
489
2.65k
  if (ISFCN (type))
490
182
    in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
491
2.47k
  else
492
2.47k
    {
493
2.47k
      in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
494
2.47k
      in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
495
2.47k
    }
496
497
3.12k
 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
3.12k
}
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
77.6k
{
603
77.6k
  LINENO *ext = (LINENO *) ext1;
604
77.6k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
77.6k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
77.6k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
77.6k
}
coff-x86_64.c:coff_swap_lineno_in
Line
Count
Source
602
4.23k
{
603
4.23k
  LINENO *ext = (LINENO *) ext1;
604
4.23k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
4.23k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
4.23k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
4.23k
}
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
22.1k
{
603
22.1k
  LINENO *ext = (LINENO *) ext1;
604
22.1k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
22.1k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
22.1k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
22.1k
}
coff-sh.c:coff_swap_lineno_in
Line
Count
Source
602
18.0k
{
603
18.0k
  LINENO *ext = (LINENO *) ext1;
604
18.0k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
18.0k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
18.0k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
18.0k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_lineno_in
coff-tic30.c:coff_swap_lineno_in
Line
Count
Source
602
31.2k
{
603
31.2k
  LINENO *ext = (LINENO *) ext1;
604
31.2k
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
31.2k
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
31.2k
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
31.2k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_lineno_in
coff-tic54x.c:coff_swap_lineno_in
Line
Count
Source
602
707
{
603
707
  LINENO *ext = (LINENO *) ext1;
604
707
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
707
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
707
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
707
}
coff-z80.c:coff_swap_lineno_in
Line
Count
Source
602
499
{
603
499
  LINENO *ext = (LINENO *) ext1;
604
499
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
499
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
499
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
499
}
coff-z8k.c:coff_swap_lineno_in
Line
Count
Source
602
842
{
603
842
  LINENO *ext = (LINENO *) ext1;
604
842
  struct internal_lineno *in = (struct internal_lineno *) in1;
605
606
842
  in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
607
842
  in->l_lnno = GET_LINENO_LNNO (abfd, ext);
608
842
}
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
1.21k
{
626
1.21k
  AOUTHDR *aouthdr_ext;
627
1.21k
  struct internal_aouthdr *aouthdr_int;
628
629
1.21k
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
1.21k
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
1.21k
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
1.21k
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
1.21k
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
1.21k
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
1.21k
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
1.21k
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
1.21k
  aouthdr_int->text_start =
638
1.21k
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
1.21k
  aouthdr_int->data_start =
640
1.21k
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
66
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
148
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
#endif
648
214
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
214
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
214
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
214
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
214
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
214
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
214
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
214
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
214
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
214
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
#ifdef XCOFF64
659
66
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
66
  aouthdr_int->o_maxdata  = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
661
#else
662
148
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
148
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
#endif
665
#endif
666
667
#ifdef MIPSECOFF
668
12
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
12
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
12
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
12
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
12
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
12
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
12
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
#endif
676
677
#ifdef ALPHAECOFF
678
8
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
8
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
8
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
8
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
#endif
683
1.21k
}
coff-alpha.c:alpha_ecoff_swap_aouthdr_in
Line
Count
Source
625
8
{
626
8
  AOUTHDR *aouthdr_ext;
627
8
  struct internal_aouthdr *aouthdr_int;
628
629
8
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
8
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
8
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
8
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
8
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
8
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
8
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
8
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
8
  aouthdr_int->text_start =
638
8
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
8
  aouthdr_int->data_start =
640
8
    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
8
#ifdef ALPHAECOFF
678
8
  aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
679
8
  aouthdr_int->gp_value  = H_GET_64 (abfd, aouthdr_ext->gp_value);
680
8
  aouthdr_int->gprmask   = H_GET_32 (abfd, aouthdr_ext->gprmask);
681
8
  aouthdr_int->fprmask   = H_GET_32 (abfd, aouthdr_ext->fprmask);
682
8
#endif
683
8
}
coff-x86_64.c:coff_swap_aouthdr_in
Line
Count
Source
625
248
{
626
248
  AOUTHDR *aouthdr_ext;
627
248
  struct internal_aouthdr *aouthdr_int;
628
629
248
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
248
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
248
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
248
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
248
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
248
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
248
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
248
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
248
  aouthdr_int->text_start =
638
248
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
248
  aouthdr_int->data_start =
640
248
    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
248
}
coff64-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
66
{
626
66
  AOUTHDR *aouthdr_ext;
627
66
  struct internal_aouthdr *aouthdr_int;
628
629
66
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
66
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
66
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
66
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
66
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
66
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
66
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
66
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
66
  aouthdr_int->text_start =
638
66
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
66
  aouthdr_int->data_start =
640
66
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
66
#ifdef RS6000COFF_C
643
66
#ifdef XCOFF64
644
66
  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
66
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
66
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
66
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
66
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
66
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
66
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
66
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
66
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
66
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
66
  aouthdr_int->o_cputype  = H_GET_16 (abfd, aouthdr_ext->o_cputype);
658
66
#ifdef XCOFF64
659
66
  aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
660
66
  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
66
#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
66
}
cf-i386lynx.c:coff_swap_aouthdr_in
Line
Count
Source
625
106
{
626
106
  AOUTHDR *aouthdr_ext;
627
106
  struct internal_aouthdr *aouthdr_int;
628
629
106
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
106
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
106
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
106
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
106
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
106
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
106
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
106
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
106
  aouthdr_int->text_start =
638
106
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
106
  aouthdr_int->data_start =
640
106
    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
106
}
coff-go32.c:coff_swap_aouthdr_in
Line
Count
Source
625
106
{
626
106
  AOUTHDR *aouthdr_ext;
627
106
  struct internal_aouthdr *aouthdr_int;
628
629
106
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
106
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
106
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
106
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
106
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
106
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
106
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
106
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
106
  aouthdr_int->text_start =
638
106
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
106
  aouthdr_int->data_start =
640
106
    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
106
}
coff-i386.c:coff_swap_aouthdr_in
Line
Count
Source
625
106
{
626
106
  AOUTHDR *aouthdr_ext;
627
106
  struct internal_aouthdr *aouthdr_int;
628
629
106
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
106
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
106
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
106
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
106
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
106
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
106
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
106
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
106
  aouthdr_int->text_start =
638
106
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
106
  aouthdr_int->data_start =
640
106
    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
106
}
coff-mips.c:mips_ecoff_swap_aouthdr_in
Line
Count
Source
625
12
{
626
12
  AOUTHDR *aouthdr_ext;
627
12
  struct internal_aouthdr *aouthdr_int;
628
629
12
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
12
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
12
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
12
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
12
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
12
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
12
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
12
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
12
  aouthdr_int->text_start =
638
12
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
12
  aouthdr_int->data_start =
640
12
    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
12
#ifdef MIPSECOFF
668
12
  aouthdr_int->bss_start  = H_GET_32 (abfd, aouthdr_ext->bss_start);
669
12
  aouthdr_int->gp_value   = H_GET_32 (abfd, aouthdr_ext->gp_value);
670
12
  aouthdr_int->gprmask    = H_GET_32 (abfd, aouthdr_ext->gprmask);
671
12
  aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
672
12
  aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
673
12
  aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
674
12
  aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
675
12
#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
12
}
coff-rs6000.c:coff_swap_aouthdr_in
Line
Count
Source
625
148
{
626
148
  AOUTHDR *aouthdr_ext;
627
148
  struct internal_aouthdr *aouthdr_int;
628
629
148
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
148
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
148
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
148
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
148
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
148
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
148
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
148
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
148
  aouthdr_int->text_start =
638
148
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
148
  aouthdr_int->data_start =
640
148
    GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
641
642
148
#ifdef RS6000COFF_C
643
#ifdef XCOFF64
644
  aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
645
#else
646
148
  aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
647
148
#endif
648
148
  aouthdr_int->o_snentry  = H_GET_16 (abfd, aouthdr_ext->o_snentry);
649
148
  aouthdr_int->o_sntext   = H_GET_16 (abfd, aouthdr_ext->o_sntext);
650
148
  aouthdr_int->o_sndata   = H_GET_16 (abfd, aouthdr_ext->o_sndata);
651
148
  aouthdr_int->o_sntoc    = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
652
148
  aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
653
148
  aouthdr_int->o_snbss    = H_GET_16 (abfd, aouthdr_ext->o_snbss);
654
148
  aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
655
148
  aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
656
148
  aouthdr_int->o_modtype  = H_GET_16 (abfd, aouthdr_ext->o_modtype);
657
148
  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
148
  aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
663
148
  aouthdr_int->o_maxdata  = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
664
148
#endif
665
148
#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
148
}
coff-sh.c:coff_swap_aouthdr_in
Line
Count
Source
625
72
{
626
72
  AOUTHDR *aouthdr_ext;
627
72
  struct internal_aouthdr *aouthdr_int;
628
629
72
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
72
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
72
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
72
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
72
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
72
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
72
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
72
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
72
  aouthdr_int->text_start =
638
72
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
72
  aouthdr_int->data_start =
640
72
    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
72
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_aouthdr_in
coff-tic30.c:coff_swap_aouthdr_in
Line
Count
Source
625
120
{
626
120
  AOUTHDR *aouthdr_ext;
627
120
  struct internal_aouthdr *aouthdr_int;
628
629
120
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
120
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
120
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
120
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
120
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
120
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
120
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
120
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
120
  aouthdr_int->text_start =
638
120
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
120
  aouthdr_int->data_start =
640
120
    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
120
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_aouthdr_in
coff-tic54x.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-z80.c:coff_swap_aouthdr_in
Line
Count
Source
625
32
{
626
32
  AOUTHDR *aouthdr_ext;
627
32
  struct internal_aouthdr *aouthdr_int;
628
629
32
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
32
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
32
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
32
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
32
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
32
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
32
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
32
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
32
  aouthdr_int->text_start =
638
32
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
32
  aouthdr_int->data_start =
640
32
    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
32
}
coff-z8k.c:coff_swap_aouthdr_in
Line
Count
Source
625
174
{
626
174
  AOUTHDR *aouthdr_ext;
627
174
  struct internal_aouthdr *aouthdr_int;
628
629
174
  aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
630
174
  aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
631
174
  aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
632
174
  aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
633
174
  aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
634
174
  aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
635
174
  aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
636
174
  aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
637
174
  aouthdr_int->text_start =
638
174
    GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
639
174
  aouthdr_int->data_start =
640
174
    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
174
}
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
956k
{
766
956k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
956k
  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
956k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
956k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
956k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
956k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
956k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
956k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
956k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
956k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
956k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
956k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
8.78k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
#endif
787
956k
}
coff-alpha.c:alpha_ecoff_swap_scnhdr_in
Line
Count
Source
765
2.53k
{
766
2.53k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
2.53k
  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.53k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
2.53k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
2.53k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
2.53k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
2.53k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
2.53k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
2.53k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
2.53k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
2.53k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
2.53k
  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.53k
}
coff-x86_64.c:coff_swap_scnhdr_in
Line
Count
Source
765
371k
{
766
371k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
371k
  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
371k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
371k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
371k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
371k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
371k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
371k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
371k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
371k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
371k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
371k
  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
371k
}
coff64-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
70.8k
{
766
70.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
70.8k
  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
70.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
70.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
70.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
70.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
70.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
70.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
70.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
70.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
70.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
70.8k
  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
70.8k
}
cf-i386lynx.c:coff_swap_scnhdr_in
Line
Count
Source
765
187k
{
766
187k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
187k
  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
187k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
187k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
187k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
187k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
187k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
187k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
187k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
187k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
187k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
187k
  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
187k
}
Unexecuted instantiation: coff-go32.c:coff_swap_scnhdr_in
coff-i386.c:coff_swap_scnhdr_in
Line
Count
Source
765
187k
{
766
187k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
187k
  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
187k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
187k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
187k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
187k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
187k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
187k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
187k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
187k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
187k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
187k
  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
187k
}
coff-mips.c:mips_ecoff_swap_scnhdr_in
Line
Count
Source
765
24.8k
{
766
24.8k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
24.8k
  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
24.8k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
24.8k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
24.8k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
24.8k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
24.8k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
24.8k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
24.8k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
24.8k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
24.8k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
24.8k
  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
24.8k
}
coff-rs6000.c:coff_swap_scnhdr_in
Line
Count
Source
765
28.5k
{
766
28.5k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
28.5k
  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
28.5k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
28.5k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
28.5k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
28.5k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
28.5k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
28.5k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
28.5k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
28.5k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
28.5k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
28.5k
  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
28.5k
}
coff-sh.c:coff_swap_scnhdr_in
Line
Count
Source
765
10.2k
{
766
10.2k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
10.2k
  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.2k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
10.2k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
10.2k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
10.2k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
10.2k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
10.2k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
10.2k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
10.2k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
10.2k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
10.2k
  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.2k
}
Unexecuted instantiation: coff-stgo32.c:coff_swap_scnhdr_in
coff-tic30.c:coff_swap_scnhdr_in
Line
Count
Source
765
6.64k
{
766
6.64k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
6.64k
  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.64k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
6.64k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
6.64k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
6.64k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
6.64k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
6.64k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
6.64k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
6.64k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
6.64k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
6.64k
  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.64k
}
Unexecuted instantiation: coff-tic4x.c:coff_swap_scnhdr_in
coff-tic54x.c:coff_swap_scnhdr_in
Line
Count
Source
765
8.78k
{
766
8.78k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
8.78k
  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.78k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
8.78k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
8.78k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
8.78k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
8.78k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
8.78k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
8.78k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
8.78k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
8.78k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
8.78k
  scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
784
8.78k
#ifdef COFF_ADJUST_SCNHDR_IN_POST
785
8.78k
  COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
786
8.78k
#endif
787
8.78k
}
coff-z80.c:coff_swap_scnhdr_in
Line
Count
Source
765
54.1k
{
766
54.1k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
54.1k
  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
54.1k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
54.1k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
54.1k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
54.1k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
54.1k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
54.1k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
54.1k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
54.1k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
54.1k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
54.1k
  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
54.1k
}
coff-z8k.c:coff_swap_scnhdr_in
Line
Count
Source
765
3.82k
{
766
3.82k
  SCNHDR *scnhdr_ext = (SCNHDR *) ext;
767
3.82k
  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
3.82k
  memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
773
774
3.82k
  scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
775
3.82k
  scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
776
3.82k
  scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
777
778
3.82k
  scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
779
3.82k
  scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
780
3.82k
  scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
781
3.82k
  scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
782
3.82k
  scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
783
3.82k
  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
3.82k
}
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