Coverage Report

Created: 2025-06-24 06:45

/src/binutils-gdb/bfd/ecoffswap.h
Line
Count
Source (jump to first uncovered line)
1
/* Generic ECOFF swapping routines, for BFD.
2
   Copyright (C) 1992-2025 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
23
/* NOTE: This is a header file, but it contains executable routines.
24
   This is done this way because these routines are substantially
25
   similar, but are not identical, for all ECOFF targets.
26
27
   These are routines to swap the ECOFF symbolic information in and
28
   out.  The routines are defined statically.  You can set breakpoints
29
   on them in gdb by naming the including source file; e.g.,
30
   'coff-mips.c':ecoff_swap_hdr_in.
31
32
   Before including this header file, one of ECOFF_32, ECOFF_64,
33
   ECOFF_SIGNED_32 or ECOFF_SIGNED_64 must be defined.  These are
34
   checked when swapping information that depends upon the target
35
   size.  This code works for 32 bit and 64 bit ECOFF, but may need to
36
   be generalized in the future.
37
38
   Some header file which defines the external forms of these
39
   structures must also be included before including this header file.
40
   Currently this is either coff/mips.h or coff/alpha.h.
41
42
   If the symbol TEST is defined when this file is compiled, a
43
   comparison is made to ensure that, in fact, the output is
44
   bit-for-bit the same as the input.  Of course, this symbol should
45
   only be defined when deliberately testing the code on a machine
46
   with the proper byte sex and such.  */
47
48
#ifdef ECOFF_32
49
178k
#define ECOFF_GET_OFF H_GET_32
50
0
#define ECOFF_PUT_OFF H_PUT_32
51
#endif
52
#ifdef ECOFF_64
53
52.1k
#define ECOFF_GET_OFF H_GET_64
54
0
#define ECOFF_PUT_OFF H_PUT_64
55
#endif
56
#ifdef ECOFF_SIGNED_32
57
1.18M
#define ECOFF_GET_OFF H_GET_S32
58
0
#define ECOFF_PUT_OFF H_PUT_S32
59
#endif
60
#ifdef ECOFF_SIGNED_64
61
1.15M
#define ECOFF_GET_OFF H_GET_S64
62
0
#define ECOFF_PUT_OFF H_PUT_S64
63
#endif
64
65
/* ECOFF auxiliary information swapping routines.  These are the same
66
   for all ECOFF targets, so they are defined in ecofflink.c.  */
67
68
extern void _bfd_ecoff_swap_tir_in
69
  (int, const struct tir_ext *, TIR *);
70
extern void _bfd_ecoff_swap_tir_out
71
  (int, const TIR *, struct tir_ext *);
72
extern void _bfd_ecoff_swap_rndx_in
73
  (int, const struct rndx_ext *, RNDXR *);
74
extern void _bfd_ecoff_swap_rndx_out
75
  (int, const RNDXR *, struct rndx_ext *);
76
77
/* Prototypes for functions defined in this file.  */
78
79
static void ecoff_swap_hdr_in (bfd *, void *, HDRR *);
80
static void ecoff_swap_hdr_out (bfd *, const HDRR *, void *);
81
static void ecoff_swap_fdr_in (bfd *, void *, FDR *);
82
static void ecoff_swap_fdr_out (bfd *, const FDR *, void *);
83
static void ecoff_swap_pdr_in (bfd *, void *, PDR *);
84
static void ecoff_swap_pdr_out (bfd *, const PDR *, void *);
85
static void ecoff_swap_sym_in (bfd *, void *, SYMR *);
86
static void ecoff_swap_sym_out (bfd *, const SYMR *, void *);
87
static void ecoff_swap_ext_in (bfd *, void *, EXTR *);
88
static void ecoff_swap_ext_out (bfd *, const EXTR *, void *);
89
static void ecoff_swap_rfd_in (bfd *, void *, RFDT *);
90
static void ecoff_swap_rfd_out (bfd *, const RFDT *, void *);
91
static void ecoff_swap_opt_in (bfd *, void *, OPTR *);
92
static void ecoff_swap_opt_out (bfd *, const OPTR *, void *);
93
static void ecoff_swap_dnr_in (bfd *, void *, DNR *);
94
static void ecoff_swap_dnr_out (bfd *, const DNR *, void *);
95
96
/* Swap in the symbolic header.  */
97
98
static void
99
ecoff_swap_hdr_in (bfd *abfd, void * ext_copy, HDRR *intern)
100
6.93k
{
101
6.93k
  struct hdr_ext ext[1];
102
103
6.93k
  *ext = *(struct hdr_ext *) ext_copy;
104
105
6.93k
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
6.93k
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
6.93k
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
6.93k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
6.93k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
6.93k
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
6.93k
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
6.93k
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
6.93k
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
6.93k
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
6.93k
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
6.93k
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
6.93k
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
6.93k
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
6.93k
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
6.93k
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
6.93k
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
6.93k
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
6.93k
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
6.93k
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
6.93k
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
6.93k
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
6.93k
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
6.93k
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
6.93k
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
6.93k
}
coff-alpha.c:ecoff_swap_hdr_in
Line
Count
Source
100
2.14k
{
101
2.14k
  struct hdr_ext ext[1];
102
103
2.14k
  *ext = *(struct hdr_ext *) ext_copy;
104
105
2.14k
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
2.14k
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
2.14k
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
2.14k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
2.14k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
2.14k
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
2.14k
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
2.14k
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
2.14k
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
2.14k
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
2.14k
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
2.14k
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
2.14k
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
2.14k
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
2.14k
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
2.14k
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
2.14k
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
2.14k
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
2.14k
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
2.14k
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
2.14k
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
2.14k
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
2.14k
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
2.14k
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
2.14k
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
2.14k
}
elf32-mips.c:ecoff_swap_hdr_in
Line
Count
Source
100
50
{
101
50
  struct hdr_ext ext[1];
102
103
50
  *ext = *(struct hdr_ext *) ext_copy;
104
105
50
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
50
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
50
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
50
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
50
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
50
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
50
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
50
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
50
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
50
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
50
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
50
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
50
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
50
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
50
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
50
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
50
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
50
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
50
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
50
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
50
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
50
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
50
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
50
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
50
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
50
}
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_hdr_in
elf64-mips.c:ecoff_swap_hdr_in
Line
Count
Source
100
3.52k
{
101
3.52k
  struct hdr_ext ext[1];
102
103
3.52k
  *ext = *(struct hdr_ext *) ext_copy;
104
105
3.52k
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
3.52k
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
3.52k
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
3.52k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
3.52k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
3.52k
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
3.52k
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
3.52k
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
3.52k
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
3.52k
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
3.52k
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
3.52k
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
3.52k
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
3.52k
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
3.52k
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
3.52k
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
3.52k
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
3.52k
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
3.52k
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
3.52k
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
3.52k
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
3.52k
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
3.52k
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
3.52k
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
3.52k
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
3.52k
}
elfn32-mips.c:ecoff_swap_hdr_in
Line
Count
Source
100
46
{
101
46
  struct hdr_ext ext[1];
102
103
46
  *ext = *(struct hdr_ext *) ext_copy;
104
105
46
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
46
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
46
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
46
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
46
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
46
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
46
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
46
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
46
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
46
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
46
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
46
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
46
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
46
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
46
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
46
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
46
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
46
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
46
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
46
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
46
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
46
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
46
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
46
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
46
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
46
}
coff-mips.c:ecoff_swap_hdr_in
Line
Count
Source
100
1.16k
{
101
1.16k
  struct hdr_ext ext[1];
102
103
1.16k
  *ext = *(struct hdr_ext *) ext_copy;
104
105
1.16k
  intern->magic   = H_GET_S16  (abfd, ext->h_magic);
106
1.16k
  intern->vstamp  = H_GET_S16  (abfd, ext->h_vstamp);
107
1.16k
  intern->ilineMax  = H_GET_32  (abfd, ext->h_ilineMax);
108
1.16k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->h_cbLine);
109
1.16k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
110
1.16k
  intern->idnMax  = H_GET_32  (abfd, ext->h_idnMax);
111
1.16k
  intern->cbDnOffset  = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
112
1.16k
  intern->ipdMax  = H_GET_32  (abfd, ext->h_ipdMax);
113
1.16k
  intern->cbPdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
114
1.16k
  intern->isymMax = H_GET_32  (abfd, ext->h_isymMax);
115
1.16k
  intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
116
1.16k
  intern->ioptMax = H_GET_32  (abfd, ext->h_ioptMax);
117
1.16k
  intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
118
1.16k
  intern->iauxMax = H_GET_32  (abfd, ext->h_iauxMax);
119
1.16k
  intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
120
1.16k
  intern->issMax  = H_GET_32  (abfd, ext->h_issMax);
121
1.16k
  intern->cbSsOffset  = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
122
1.16k
  intern->issExtMax = H_GET_32  (abfd, ext->h_issExtMax);
123
1.16k
  intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
124
1.16k
  intern->ifdMax  = H_GET_32  (abfd, ext->h_ifdMax);
125
1.16k
  intern->cbFdOffset  = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
126
1.16k
  intern->crfd    = H_GET_32  (abfd, ext->h_crfd);
127
1.16k
  intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
128
1.16k
  intern->iextMax = H_GET_32  (abfd, ext->h_iextMax);
129
1.16k
  intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
130
131
#ifdef TEST
132
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
133
    abort ();
134
#endif
135
1.16k
}
136
137
/* Swap out the symbolic header.  */
138
139
static void
140
ecoff_swap_hdr_out (bfd *abfd, const HDRR *intern_copy, void * ext_ptr)
141
0
{
142
0
  struct hdr_ext *ext = (struct hdr_ext *) ext_ptr;
143
0
  HDRR intern[1];
144
145
0
  *intern = *intern_copy;
146
147
0
  H_PUT_S16  (abfd, intern->magic,       ext->h_magic);
148
0
  H_PUT_S16  (abfd, intern->vstamp,        ext->h_vstamp);
149
0
  H_PUT_32  (abfd, intern->ilineMax,      ext->h_ilineMax);
150
0
  ECOFF_PUT_OFF (abfd, intern->cbLine,       ext->h_cbLine);
151
0
  ECOFF_PUT_OFF (abfd, intern->cbLineOffset,  ext->h_cbLineOffset);
152
0
  H_PUT_32  (abfd, intern->idnMax,        ext->h_idnMax);
153
0
  ECOFF_PUT_OFF (abfd, intern->cbDnOffset,    ext->h_cbDnOffset);
154
0
  H_PUT_32  (abfd, intern->ipdMax,        ext->h_ipdMax);
155
0
  ECOFF_PUT_OFF (abfd, intern->cbPdOffset,    ext->h_cbPdOffset);
156
0
  H_PUT_32  (abfd, intern->isymMax,       ext->h_isymMax);
157
0
  ECOFF_PUT_OFF (abfd, intern->cbSymOffset,   ext->h_cbSymOffset);
158
0
  H_PUT_32  (abfd, intern->ioptMax,       ext->h_ioptMax);
159
0
  ECOFF_PUT_OFF (abfd, intern->cbOptOffset,   ext->h_cbOptOffset);
160
0
  H_PUT_32  (abfd, intern->iauxMax,       ext->h_iauxMax);
161
0
  ECOFF_PUT_OFF (abfd, intern->cbAuxOffset,   ext->h_cbAuxOffset);
162
0
  H_PUT_32  (abfd, intern->issMax,        ext->h_issMax);
163
0
  ECOFF_PUT_OFF (abfd, intern->cbSsOffset,    ext->h_cbSsOffset);
164
0
  H_PUT_32  (abfd, intern->issExtMax,     ext->h_issExtMax);
165
0
  ECOFF_PUT_OFF (abfd, intern->cbSsExtOffset, ext->h_cbSsExtOffset);
166
0
  H_PUT_32  (abfd, intern->ifdMax,        ext->h_ifdMax);
167
0
  ECOFF_PUT_OFF (abfd, intern->cbFdOffset,    ext->h_cbFdOffset);
168
0
  H_PUT_32  (abfd, intern->crfd,        ext->h_crfd);
169
0
  ECOFF_PUT_OFF (abfd, intern->cbRfdOffset,   ext->h_cbRfdOffset);
170
0
  H_PUT_32  (abfd, intern->iextMax,       ext->h_iextMax);
171
0
  ECOFF_PUT_OFF (abfd, intern->cbExtOffset,   ext->h_cbExtOffset);
172
173
#ifdef TEST
174
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
175
    abort ();
176
#endif
177
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_hdr_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_hdr_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_hdr_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_hdr_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_hdr_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_hdr_out
178
179
/* Swap in the file descriptor record.  */
180
181
static void
182
ecoff_swap_fdr_in (bfd *abfd, void * ext_copy, FDR *intern)
183
61.8k
{
184
61.8k
  struct fdr_ext ext[1];
185
186
61.8k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
61.8k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
61.8k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
38.5k
  if (intern->rss == (signed long) 0xffffffff)
192
1.81k
    intern->rss = -1;
193
#endif
194
61.8k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
61.8k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
61.8k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
61.8k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
61.8k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
61.8k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
61.8k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
61.8k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
23.2k
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
23.2k
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
#endif
206
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
38.5k
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
38.5k
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
#endif
210
61.8k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
61.8k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
61.8k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
61.8k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
61.8k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
61.8k
  else
227
61.8k
    {
228
61.8k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
61.8k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
61.8k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
61.8k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
61.8k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
61.8k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
61.8k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
61.8k
    }
236
61.8k
  intern->reserved = 0;
237
238
61.8k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
61.8k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
61.8k
}
coff-alpha.c:ecoff_swap_fdr_in
Line
Count
Source
183
6.58k
{
184
6.58k
  struct fdr_ext ext[1];
185
186
6.58k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
6.58k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
6.58k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
6.58k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
6.58k
  if (intern->rss == (signed long) 0xffffffff)
192
172
    intern->rss = -1;
193
6.58k
#endif
194
6.58k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
6.58k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
6.58k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
6.58k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
6.58k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
6.58k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
6.58k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
6.58k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
#endif
206
6.58k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
6.58k
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
6.58k
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
6.58k
#endif
210
6.58k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
6.58k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
6.58k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
6.58k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
6.58k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
6.58k
  else
227
6.58k
    {
228
6.58k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
6.58k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
6.58k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
6.58k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
6.58k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
6.58k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
6.58k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
6.58k
    }
236
6.58k
  intern->reserved = 0;
237
238
6.58k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
6.58k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
6.58k
}
elf32-mips.c:ecoff_swap_fdr_in
Line
Count
Source
183
6.06k
{
184
6.06k
  struct fdr_ext ext[1];
185
186
6.06k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
6.06k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
6.06k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
  if (intern->rss == (signed long) 0xffffffff)
192
    intern->rss = -1;
193
#endif
194
6.06k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
6.06k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
6.06k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
6.06k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
6.06k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
6.06k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
6.06k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
6.06k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
6.06k
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
6.06k
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
6.06k
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
6.06k
#endif
206
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
#endif
210
6.06k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
6.06k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
6.06k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
6.06k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
6.06k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
6.06k
  else
227
6.06k
    {
228
6.06k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
6.06k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
6.06k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
6.06k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
6.06k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
6.06k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
6.06k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
6.06k
    }
236
6.06k
  intern->reserved = 0;
237
238
6.06k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
6.06k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
6.06k
}
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_fdr_in
elf64-mips.c:ecoff_swap_fdr_in
Line
Count
Source
183
31.9k
{
184
31.9k
  struct fdr_ext ext[1];
185
186
31.9k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
31.9k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
31.9k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
31.9k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
31.9k
  if (intern->rss == (signed long) 0xffffffff)
192
1.63k
    intern->rss = -1;
193
31.9k
#endif
194
31.9k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
31.9k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
31.9k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
31.9k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
31.9k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
31.9k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
31.9k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
31.9k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
#endif
206
31.9k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
31.9k
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
31.9k
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
31.9k
#endif
210
31.9k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
31.9k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
31.9k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
31.9k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
31.9k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
31.9k
  else
227
31.9k
    {
228
31.9k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
31.9k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
31.9k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
31.9k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
31.9k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
31.9k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
31.9k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
31.9k
    }
236
31.9k
  intern->reserved = 0;
237
238
31.9k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
31.9k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
31.9k
}
elfn32-mips.c:ecoff_swap_fdr_in
Line
Count
Source
183
12.8k
{
184
12.8k
  struct fdr_ext ext[1];
185
186
12.8k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
12.8k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
12.8k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
  if (intern->rss == (signed long) 0xffffffff)
192
    intern->rss = -1;
193
#endif
194
12.8k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
12.8k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
12.8k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
12.8k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
12.8k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
12.8k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
12.8k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
12.8k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
12.8k
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
12.8k
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
12.8k
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
12.8k
#endif
206
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
#endif
210
12.8k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
12.8k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
12.8k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
12.8k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
12.8k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
12.8k
  else
227
12.8k
    {
228
12.8k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
12.8k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
12.8k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
12.8k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
12.8k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
12.8k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
12.8k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
12.8k
    }
236
12.8k
  intern->reserved = 0;
237
238
12.8k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
12.8k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
12.8k
}
coff-mips.c:ecoff_swap_fdr_in
Line
Count
Source
183
4.41k
{
184
4.41k
  struct fdr_ext ext[1];
185
186
4.41k
  *ext = *(struct fdr_ext *) ext_copy;
187
188
4.41k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->f_adr);
189
4.41k
  intern->rss   = H_GET_32 (abfd, ext->f_rss);
190
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
191
  if (intern->rss == (signed long) 0xffffffff)
192
    intern->rss = -1;
193
#endif
194
4.41k
  intern->issBase = H_GET_32 (abfd, ext->f_issBase);
195
4.41k
  intern->cbSs    = ECOFF_GET_OFF (abfd, ext->f_cbSs);
196
4.41k
  intern->isymBase  = H_GET_32 (abfd, ext->f_isymBase);
197
4.41k
  intern->csym    = H_GET_32 (abfd, ext->f_csym);
198
4.41k
  intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
199
4.41k
  intern->cline   = H_GET_32 (abfd, ext->f_cline);
200
4.41k
  intern->ioptBase  = H_GET_32 (abfd, ext->f_ioptBase);
201
4.41k
  intern->copt    = H_GET_32 (abfd, ext->f_copt);
202
4.41k
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
203
4.41k
  intern->ipdFirst  = H_GET_16 (abfd, ext->f_ipdFirst);
204
4.41k
  intern->cpd   = H_GET_16 (abfd, ext->f_cpd);
205
4.41k
#endif
206
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
207
  intern->ipdFirst  = H_GET_32 (abfd, ext->f_ipdFirst);
208
  intern->cpd   = H_GET_32 (abfd, ext->f_cpd);
209
#endif
210
4.41k
  intern->iauxBase  = H_GET_32 (abfd, ext->f_iauxBase);
211
4.41k
  intern->caux    = H_GET_32 (abfd, ext->f_caux);
212
4.41k
  intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
213
4.41k
  intern->crfd    = H_GET_32 (abfd, ext->f_crfd);
214
215
  /* Now the fun stuff...  */
216
4.41k
  if (bfd_header_big_endian (abfd))
217
0
    {
218
0
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
219
0
          >> FDR_BITS1_LANG_SH_BIG);
220
0
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
221
0
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
222
0
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
223
0
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
224
0
          >> FDR_BITS2_GLEVEL_SH_BIG);
225
0
    }
226
4.41k
  else
227
4.41k
    {
228
4.41k
      intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
229
4.41k
          >> FDR_BITS1_LANG_SH_LITTLE);
230
4.41k
      intern->fMerge     = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
231
4.41k
      intern->fReadin    = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
232
4.41k
      intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
233
4.41k
      intern->glevel     = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
234
4.41k
          >> FDR_BITS2_GLEVEL_SH_LITTLE);
235
4.41k
    }
236
4.41k
  intern->reserved = 0;
237
238
4.41k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
239
4.41k
  intern->cbLine  = ECOFF_GET_OFF (abfd, ext->f_cbLine);
240
241
#ifdef TEST
242
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
243
    abort ();
244
#endif
245
4.41k
}
246
247
/* Swap out the file descriptor record.  */
248
249
static void
250
ecoff_swap_fdr_out (bfd *abfd, const FDR *intern_copy, void * ext_ptr)
251
0
{
252
0
  struct fdr_ext *ext = (struct fdr_ext *) ext_ptr;
253
0
  FDR intern[1];
254
255
  /* Make it reasonable to do in-place.  */
256
0
  *intern = *intern_copy;
257
258
0
  ECOFF_PUT_OFF (abfd, intern->adr,       ext->f_adr);
259
0
  H_PUT_32      (abfd, intern->rss,       ext->f_rss);
260
0
  H_PUT_32      (abfd, intern->issBase,   ext->f_issBase);
261
0
  ECOFF_PUT_OFF (abfd, intern->cbSs,      ext->f_cbSs);
262
0
  H_PUT_32      (abfd, intern->isymBase,  ext->f_isymBase);
263
0
  H_PUT_32      (abfd, intern->csym,      ext->f_csym);
264
0
  H_PUT_32      (abfd, intern->ilineBase, ext->f_ilineBase);
265
0
  H_PUT_32      (abfd, intern->cline,     ext->f_cline);
266
0
  H_PUT_32      (abfd, intern->ioptBase,  ext->f_ioptBase);
267
0
  H_PUT_32      (abfd, intern->copt,      ext->f_copt);
268
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
269
0
  H_PUT_16      (abfd, intern->ipdFirst,  ext->f_ipdFirst);
270
0
  H_PUT_16      (abfd, intern->cpd,       ext->f_cpd);
271
#endif
272
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
273
0
  H_PUT_32      (abfd, intern->ipdFirst,  ext->f_ipdFirst);
274
0
  H_PUT_32      (abfd, intern->cpd,       ext->f_cpd);
275
#endif
276
0
  H_PUT_32      (abfd, intern->iauxBase,  ext->f_iauxBase);
277
0
  H_PUT_32      (abfd, intern->caux,      ext->f_caux);
278
0
  H_PUT_32      (abfd, intern->rfdBase,   ext->f_rfdBase);
279
0
  H_PUT_32      (abfd, intern->crfd,      ext->f_crfd);
280
281
  /* Now the fun stuff...  */
282
0
  if (bfd_header_big_endian (abfd))
283
0
    {
284
0
      ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
285
0
        & FDR_BITS1_LANG_BIG)
286
0
       | (intern->fMerge ? FDR_BITS1_FMERGE_BIG : 0)
287
0
       | (intern->fReadin ? FDR_BITS1_FREADIN_BIG : 0)
288
0
       | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_BIG : 0));
289
0
      ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_BIG)
290
0
       & FDR_BITS2_GLEVEL_BIG);
291
0
      ext->f_bits2[1] = 0;
292
0
      ext->f_bits2[2] = 0;
293
0
    }
294
0
  else
295
0
    {
296
0
      ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_LITTLE)
297
0
        & FDR_BITS1_LANG_LITTLE)
298
0
       | (intern->fMerge ? FDR_BITS1_FMERGE_LITTLE : 0)
299
0
       | (intern->fReadin ? FDR_BITS1_FREADIN_LITTLE : 0)
300
0
       | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_LITTLE : 0));
301
0
      ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_LITTLE)
302
0
       & FDR_BITS2_GLEVEL_LITTLE);
303
0
      ext->f_bits2[1] = 0;
304
0
      ext->f_bits2[2] = 0;
305
0
    }
306
307
0
  ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->f_cbLineOffset);
308
0
  ECOFF_PUT_OFF (abfd, intern->cbLine, ext->f_cbLine);
309
310
#ifdef TEST
311
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
312
    abort ();
313
#endif
314
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_fdr_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_fdr_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_fdr_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_fdr_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_fdr_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_fdr_out
315
316
/* Swap in the procedure descriptor record.  */
317
318
static void
319
ecoff_swap_pdr_in (bfd *abfd, void * ext_copy, PDR *intern)
320
1.11M
{
321
1.11M
  struct pdr_ext ext[1];
322
323
1.11M
  *ext = *(struct pdr_ext *) ext_copy;
324
325
1.11M
  memset ((void *) intern, 0, sizeof (*intern));
326
327
1.11M
  intern->adr   = ECOFF_GET_OFF (abfd, ext->p_adr);
328
1.11M
  intern->isym    = H_GET_32 (abfd, ext->p_isym);
329
1.11M
  intern->iline   = H_GET_32 (abfd, ext->p_iline);
330
1.11M
  intern->regmask = H_GET_32 (abfd, ext->p_regmask);
331
1.11M
  intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
332
1.11M
  intern->iopt    = H_GET_S32 (abfd, ext->p_iopt);
333
1.11M
  intern->fregmask  = H_GET_32 (abfd, ext->p_fregmask);
334
1.11M
  intern->fregoffset  = H_GET_S32 (abfd, ext->p_fregoffset);
335
1.11M
  intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
336
1.11M
  intern->framereg  = H_GET_16 (abfd, ext->p_framereg);
337
1.11M
  intern->pcreg   = H_GET_16 (abfd, ext->p_pcreg);
338
1.11M
  intern->lnLow   = H_GET_32 (abfd, ext->p_lnLow);
339
1.11M
  intern->lnHigh  = H_GET_32 (abfd, ext->p_lnHigh);
340
1.11M
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
341
342
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
343
492k
  if (intern->isym == (signed long) 0xffffffff)
344
9.30k
    intern->isym = -1;
345
492k
  if (intern->iline == (signed long) 0xffffffff)
346
7.70k
    intern->iline = -1;
347
348
492k
  intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
349
492k
  if (bfd_header_big_endian (abfd))
350
0
    {
351
0
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
352
0
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_BIG);
353
0
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_BIG);
354
0
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_BIG)
355
0
         << PDR_BITS1_RESERVED_SH_LEFT_BIG)
356
0
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_BIG)
357
0
           >> PDR_BITS2_RESERVED_SH_BIG));
358
0
    }
359
492k
  else
360
492k
    {
361
492k
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_LITTLE);
362
492k
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_LITTLE);
363
492k
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_LITTLE);
364
492k
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_LITTLE)
365
492k
         >> PDR_BITS1_RESERVED_SH_LITTLE)
366
492k
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
367
492k
           << PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
368
492k
    }
369
492k
  intern->localoff = H_GET_8 (abfd, ext->p_localoff);
370
#endif
371
372
#ifdef TEST
373
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
374
    abort ();
375
#endif
376
1.11M
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_pdr_in
elf32-mips.c:ecoff_swap_pdr_in
Line
Count
Source
320
152k
{
321
152k
  struct pdr_ext ext[1];
322
323
152k
  *ext = *(struct pdr_ext *) ext_copy;
324
325
152k
  memset ((void *) intern, 0, sizeof (*intern));
326
327
152k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->p_adr);
328
152k
  intern->isym    = H_GET_32 (abfd, ext->p_isym);
329
152k
  intern->iline   = H_GET_32 (abfd, ext->p_iline);
330
152k
  intern->regmask = H_GET_32 (abfd, ext->p_regmask);
331
152k
  intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
332
152k
  intern->iopt    = H_GET_S32 (abfd, ext->p_iopt);
333
152k
  intern->fregmask  = H_GET_32 (abfd, ext->p_fregmask);
334
152k
  intern->fregoffset  = H_GET_S32 (abfd, ext->p_fregoffset);
335
152k
  intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
336
152k
  intern->framereg  = H_GET_16 (abfd, ext->p_framereg);
337
152k
  intern->pcreg   = H_GET_16 (abfd, ext->p_pcreg);
338
152k
  intern->lnLow   = H_GET_32 (abfd, ext->p_lnLow);
339
152k
  intern->lnHigh  = H_GET_32 (abfd, ext->p_lnHigh);
340
152k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
341
342
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
343
  if (intern->isym == (signed long) 0xffffffff)
344
    intern->isym = -1;
345
  if (intern->iline == (signed long) 0xffffffff)
346
    intern->iline = -1;
347
348
  intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
349
  if (bfd_header_big_endian (abfd))
350
    {
351
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
352
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_BIG);
353
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_BIG);
354
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_BIG)
355
         << PDR_BITS1_RESERVED_SH_LEFT_BIG)
356
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_BIG)
357
           >> PDR_BITS2_RESERVED_SH_BIG));
358
    }
359
  else
360
    {
361
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_LITTLE);
362
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_LITTLE);
363
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_LITTLE);
364
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_LITTLE)
365
         >> PDR_BITS1_RESERVED_SH_LITTLE)
366
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
367
           << PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
368
    }
369
  intern->localoff = H_GET_8 (abfd, ext->p_localoff);
370
#endif
371
372
#ifdef TEST
373
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
374
    abort ();
375
#endif
376
152k
}
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_pdr_in
elf64-mips.c:ecoff_swap_pdr_in
Line
Count
Source
320
492k
{
321
492k
  struct pdr_ext ext[1];
322
323
492k
  *ext = *(struct pdr_ext *) ext_copy;
324
325
492k
  memset ((void *) intern, 0, sizeof (*intern));
326
327
492k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->p_adr);
328
492k
  intern->isym    = H_GET_32 (abfd, ext->p_isym);
329
492k
  intern->iline   = H_GET_32 (abfd, ext->p_iline);
330
492k
  intern->regmask = H_GET_32 (abfd, ext->p_regmask);
331
492k
  intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
332
492k
  intern->iopt    = H_GET_S32 (abfd, ext->p_iopt);
333
492k
  intern->fregmask  = H_GET_32 (abfd, ext->p_fregmask);
334
492k
  intern->fregoffset  = H_GET_S32 (abfd, ext->p_fregoffset);
335
492k
  intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
336
492k
  intern->framereg  = H_GET_16 (abfd, ext->p_framereg);
337
492k
  intern->pcreg   = H_GET_16 (abfd, ext->p_pcreg);
338
492k
  intern->lnLow   = H_GET_32 (abfd, ext->p_lnLow);
339
492k
  intern->lnHigh  = H_GET_32 (abfd, ext->p_lnHigh);
340
492k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
341
342
492k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
343
492k
  if (intern->isym == (signed long) 0xffffffff)
344
9.30k
    intern->isym = -1;
345
492k
  if (intern->iline == (signed long) 0xffffffff)
346
7.70k
    intern->iline = -1;
347
348
492k
  intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
349
492k
  if (bfd_header_big_endian (abfd))
350
0
    {
351
0
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
352
0
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_BIG);
353
0
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_BIG);
354
0
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_BIG)
355
0
         << PDR_BITS1_RESERVED_SH_LEFT_BIG)
356
0
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_BIG)
357
0
           >> PDR_BITS2_RESERVED_SH_BIG));
358
0
    }
359
492k
  else
360
492k
    {
361
492k
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_LITTLE);
362
492k
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_LITTLE);
363
492k
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_LITTLE);
364
492k
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_LITTLE)
365
492k
         >> PDR_BITS1_RESERVED_SH_LITTLE)
366
492k
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
367
492k
           << PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
368
492k
    }
369
492k
  intern->localoff = H_GET_8 (abfd, ext->p_localoff);
370
492k
#endif
371
372
#ifdef TEST
373
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
374
    abort ();
375
#endif
376
492k
}
elfn32-mips.c:ecoff_swap_pdr_in
Line
Count
Source
320
402k
{
321
402k
  struct pdr_ext ext[1];
322
323
402k
  *ext = *(struct pdr_ext *) ext_copy;
324
325
402k
  memset ((void *) intern, 0, sizeof (*intern));
326
327
402k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->p_adr);
328
402k
  intern->isym    = H_GET_32 (abfd, ext->p_isym);
329
402k
  intern->iline   = H_GET_32 (abfd, ext->p_iline);
330
402k
  intern->regmask = H_GET_32 (abfd, ext->p_regmask);
331
402k
  intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
332
402k
  intern->iopt    = H_GET_S32 (abfd, ext->p_iopt);
333
402k
  intern->fregmask  = H_GET_32 (abfd, ext->p_fregmask);
334
402k
  intern->fregoffset  = H_GET_S32 (abfd, ext->p_fregoffset);
335
402k
  intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
336
402k
  intern->framereg  = H_GET_16 (abfd, ext->p_framereg);
337
402k
  intern->pcreg   = H_GET_16 (abfd, ext->p_pcreg);
338
402k
  intern->lnLow   = H_GET_32 (abfd, ext->p_lnLow);
339
402k
  intern->lnHigh  = H_GET_32 (abfd, ext->p_lnHigh);
340
402k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
341
342
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
343
  if (intern->isym == (signed long) 0xffffffff)
344
    intern->isym = -1;
345
  if (intern->iline == (signed long) 0xffffffff)
346
    intern->iline = -1;
347
348
  intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
349
  if (bfd_header_big_endian (abfd))
350
    {
351
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
352
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_BIG);
353
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_BIG);
354
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_BIG)
355
         << PDR_BITS1_RESERVED_SH_LEFT_BIG)
356
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_BIG)
357
           >> PDR_BITS2_RESERVED_SH_BIG));
358
    }
359
  else
360
    {
361
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_LITTLE);
362
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_LITTLE);
363
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_LITTLE);
364
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_LITTLE)
365
         >> PDR_BITS1_RESERVED_SH_LITTLE)
366
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
367
           << PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
368
    }
369
  intern->localoff = H_GET_8 (abfd, ext->p_localoff);
370
#endif
371
372
#ifdef TEST
373
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
374
    abort ();
375
#endif
376
402k
}
coff-mips.c:ecoff_swap_pdr_in
Line
Count
Source
320
64.3k
{
321
64.3k
  struct pdr_ext ext[1];
322
323
64.3k
  *ext = *(struct pdr_ext *) ext_copy;
324
325
64.3k
  memset ((void *) intern, 0, sizeof (*intern));
326
327
64.3k
  intern->adr   = ECOFF_GET_OFF (abfd, ext->p_adr);
328
64.3k
  intern->isym    = H_GET_32 (abfd, ext->p_isym);
329
64.3k
  intern->iline   = H_GET_32 (abfd, ext->p_iline);
330
64.3k
  intern->regmask = H_GET_32 (abfd, ext->p_regmask);
331
64.3k
  intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
332
64.3k
  intern->iopt    = H_GET_S32 (abfd, ext->p_iopt);
333
64.3k
  intern->fregmask  = H_GET_32 (abfd, ext->p_fregmask);
334
64.3k
  intern->fregoffset  = H_GET_S32 (abfd, ext->p_fregoffset);
335
64.3k
  intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
336
64.3k
  intern->framereg  = H_GET_16 (abfd, ext->p_framereg);
337
64.3k
  intern->pcreg   = H_GET_16 (abfd, ext->p_pcreg);
338
64.3k
  intern->lnLow   = H_GET_32 (abfd, ext->p_lnLow);
339
64.3k
  intern->lnHigh  = H_GET_32 (abfd, ext->p_lnHigh);
340
64.3k
  intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
341
342
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
343
  if (intern->isym == (signed long) 0xffffffff)
344
    intern->isym = -1;
345
  if (intern->iline == (signed long) 0xffffffff)
346
    intern->iline = -1;
347
348
  intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
349
  if (bfd_header_big_endian (abfd))
350
    {
351
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
352
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_BIG);
353
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_BIG);
354
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_BIG)
355
         << PDR_BITS1_RESERVED_SH_LEFT_BIG)
356
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_BIG)
357
           >> PDR_BITS2_RESERVED_SH_BIG));
358
    }
359
  else
360
    {
361
      intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_LITTLE);
362
      intern->reg_frame = 0 != (ext->p_bits1[0] & PDR_BITS1_REG_FRAME_LITTLE);
363
      intern->prof = 0 != (ext->p_bits1[0] & PDR_BITS1_PROF_LITTLE);
364
      intern->reserved = (((ext->p_bits1[0] & PDR_BITS1_RESERVED_LITTLE)
365
         >> PDR_BITS1_RESERVED_SH_LITTLE)
366
        | ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
367
           << PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
368
    }
369
  intern->localoff = H_GET_8 (abfd, ext->p_localoff);
370
#endif
371
372
#ifdef TEST
373
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
374
    abort ();
375
#endif
376
64.3k
}
377
378
/* Swap out the procedure descriptor record.  */
379
380
static void
381
ecoff_swap_pdr_out (bfd *abfd, const PDR *intern_copy, void * ext_ptr)
382
0
{
383
0
  struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;
384
0
  PDR intern[1];
385
386
  /* Make it reasonable to do in-place.  */
387
0
  *intern = *intern_copy;
388
389
0
  ECOFF_PUT_OFF (abfd, intern->adr,       ext->p_adr);
390
0
  H_PUT_32  (abfd, intern->isym,       ext->p_isym);
391
0
  H_PUT_32  (abfd, intern->iline,      ext->p_iline);
392
0
  H_PUT_32  (abfd, intern->regmask,      ext->p_regmask);
393
0
  H_PUT_32  (abfd, intern->regoffset,    ext->p_regoffset);
394
0
  H_PUT_32  (abfd, intern->iopt,       ext->p_iopt);
395
0
  H_PUT_32  (abfd, intern->fregmask,     ext->p_fregmask);
396
0
  H_PUT_32  (abfd, intern->fregoffset,   ext->p_fregoffset);
397
0
  H_PUT_32  (abfd, intern->frameoffset,  ext->p_frameoffset);
398
0
  H_PUT_16  (abfd, intern->framereg,     ext->p_framereg);
399
0
  H_PUT_16  (abfd, intern->pcreg,      ext->p_pcreg);
400
0
  H_PUT_32  (abfd, intern->lnLow,      ext->p_lnLow);
401
0
  H_PUT_32  (abfd, intern->lnHigh,       ext->p_lnHigh);
402
0
  ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->p_cbLineOffset);
403
404
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
405
0
  H_PUT_8       (abfd, intern->gp_prologue,  ext->p_gp_prologue);
406
407
0
  if (bfd_header_big_endian (abfd))
408
0
    {
409
0
      ext->p_bits1[0] = ((intern->gp_used ? PDR_BITS1_GP_USED_BIG : 0)
410
0
       | (intern->reg_frame ? PDR_BITS1_REG_FRAME_BIG : 0)
411
0
       | (intern->prof ? PDR_BITS1_PROF_BIG : 0)
412
0
       | ((intern->reserved
413
0
           >> PDR_BITS1_RESERVED_SH_LEFT_BIG)
414
0
          & PDR_BITS1_RESERVED_BIG));
415
0
      ext->p_bits2[0] = ((intern->reserved << PDR_BITS2_RESERVED_SH_BIG)
416
0
       & PDR_BITS2_RESERVED_BIG);
417
0
    }
418
0
  else
419
0
    {
420
0
      ext->p_bits1[0] = ((intern->gp_used ? PDR_BITS1_GP_USED_LITTLE : 0)
421
0
       | (intern->reg_frame ? PDR_BITS1_REG_FRAME_LITTLE : 0)
422
0
       | (intern->prof ? PDR_BITS1_PROF_LITTLE : 0)
423
0
       | ((intern->reserved << PDR_BITS1_RESERVED_SH_LITTLE)
424
0
          & PDR_BITS1_RESERVED_LITTLE));
425
0
      ext->p_bits2[0] = ((intern->reserved >>
426
0
        PDR_BITS2_RESERVED_SH_LEFT_LITTLE)
427
0
       & PDR_BITS2_RESERVED_LITTLE);
428
0
    }
429
0
  H_PUT_8 (abfd, intern->localoff, ext->p_localoff);
430
#endif
431
432
#ifdef TEST
433
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
434
    abort ();
435
#endif
436
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_pdr_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_pdr_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_pdr_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_pdr_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_pdr_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_pdr_out
437
438
/* Swap in a symbol record.  */
439
440
static void
441
ecoff_swap_sym_in (bfd *abfd, void * ext_copy, SYMR *intern)
442
20.7k
{
443
20.7k
  struct sym_ext ext[1];
444
445
20.7k
  *ext = *(struct sym_ext *) ext_copy;
446
447
20.7k
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
20.7k
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
2.18k
  if (intern->iss == (signed long) 0xffffffff)
452
257
    intern->iss = -1;
453
#endif
454
455
  /* Now the fun stuff...  */
456
20.7k
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
20.7k
  else
471
20.7k
    {
472
20.7k
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
20.7k
               >> SYM_BITS1_ST_SH_LITTLE;
474
20.7k
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
20.7k
               >> SYM_BITS1_SC_SH_LITTLE)
476
20.7k
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
20.7k
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
20.7k
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
20.7k
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
20.7k
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
20.7k
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
20.7k
        | ((unsigned int) ext->s_bits4[0]
483
20.7k
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
20.7k
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
20.7k
}
coff-alpha.c:ecoff_swap_sym_in
Line
Count
Source
442
17
{
443
17
  struct sym_ext ext[1];
444
445
17
  *ext = *(struct sym_ext *) ext_copy;
446
447
17
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
17
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
17
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
17
  if (intern->iss == (signed long) 0xffffffff)
452
6
    intern->iss = -1;
453
17
#endif
454
455
  /* Now the fun stuff...  */
456
17
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
17
  else
471
17
    {
472
17
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
17
               >> SYM_BITS1_ST_SH_LITTLE;
474
17
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
17
               >> SYM_BITS1_SC_SH_LITTLE)
476
17
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
17
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
17
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
17
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
17
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
17
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
17
        | ((unsigned int) ext->s_bits4[0]
483
17
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
17
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
17
}
elf32-mips.c:ecoff_swap_sym_in
Line
Count
Source
442
118
{
443
118
  struct sym_ext ext[1];
444
445
118
  *ext = *(struct sym_ext *) ext_copy;
446
447
118
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
118
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
  if (intern->iss == (signed long) 0xffffffff)
452
    intern->iss = -1;
453
#endif
454
455
  /* Now the fun stuff...  */
456
118
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
118
  else
471
118
    {
472
118
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
118
               >> SYM_BITS1_ST_SH_LITTLE;
474
118
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
118
               >> SYM_BITS1_SC_SH_LITTLE)
476
118
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
118
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
118
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
118
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
118
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
118
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
118
        | ((unsigned int) ext->s_bits4[0]
483
118
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
118
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
118
}
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_sym_in
elf64-mips.c:ecoff_swap_sym_in
Line
Count
Source
442
2.16k
{
443
2.16k
  struct sym_ext ext[1];
444
445
2.16k
  *ext = *(struct sym_ext *) ext_copy;
446
447
2.16k
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
2.16k
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
2.16k
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
2.16k
  if (intern->iss == (signed long) 0xffffffff)
452
251
    intern->iss = -1;
453
2.16k
#endif
454
455
  /* Now the fun stuff...  */
456
2.16k
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
2.16k
  else
471
2.16k
    {
472
2.16k
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
2.16k
               >> SYM_BITS1_ST_SH_LITTLE;
474
2.16k
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
2.16k
               >> SYM_BITS1_SC_SH_LITTLE)
476
2.16k
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
2.16k
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
2.16k
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
2.16k
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
2.16k
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
2.16k
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
2.16k
        | ((unsigned int) ext->s_bits4[0]
483
2.16k
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
2.16k
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
2.16k
}
elfn32-mips.c:ecoff_swap_sym_in
Line
Count
Source
442
190
{
443
190
  struct sym_ext ext[1];
444
445
190
  *ext = *(struct sym_ext *) ext_copy;
446
447
190
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
190
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
  if (intern->iss == (signed long) 0xffffffff)
452
    intern->iss = -1;
453
#endif
454
455
  /* Now the fun stuff...  */
456
190
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
190
  else
471
190
    {
472
190
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
190
               >> SYM_BITS1_ST_SH_LITTLE;
474
190
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
190
               >> SYM_BITS1_SC_SH_LITTLE)
476
190
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
190
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
190
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
190
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
190
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
190
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
190
        | ((unsigned int) ext->s_bits4[0]
483
190
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
190
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
190
}
coff-mips.c:ecoff_swap_sym_in
Line
Count
Source
442
18.2k
{
443
18.2k
  struct sym_ext ext[1];
444
445
18.2k
  *ext = *(struct sym_ext *) ext_copy;
446
447
18.2k
  intern->iss   = H_GET_32 (abfd, ext->s_iss);
448
18.2k
  intern->value   = ECOFF_GET_OFF (abfd, ext->s_value);
449
450
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
451
  if (intern->iss == (signed long) 0xffffffff)
452
    intern->iss = -1;
453
#endif
454
455
  /* Now the fun stuff...  */
456
18.2k
  if (bfd_header_big_endian (abfd))
457
0
    {
458
0
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
459
0
               >> SYM_BITS1_ST_SH_BIG;
460
0
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
461
0
               << SYM_BITS1_SC_SH_LEFT_BIG)
462
0
        | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
463
0
               >> SYM_BITS2_SC_SH_BIG);
464
0
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
465
0
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
466
0
               << SYM_BITS2_INDEX_SH_LEFT_BIG)
467
0
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
468
0
        | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
469
0
    }
470
18.2k
  else
471
18.2k
    {
472
18.2k
      intern->st    =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
473
18.2k
               >> SYM_BITS1_ST_SH_LITTLE;
474
18.2k
      intern->sc    = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
475
18.2k
               >> SYM_BITS1_SC_SH_LITTLE)
476
18.2k
        | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
477
18.2k
               << SYM_BITS2_SC_SH_LEFT_LITTLE);
478
18.2k
      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
479
18.2k
      intern->index   = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
480
18.2k
               >> SYM_BITS2_INDEX_SH_LITTLE)
481
18.2k
        | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
482
18.2k
        | ((unsigned int) ext->s_bits4[0]
483
18.2k
           << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
484
18.2k
    }
485
486
#ifdef TEST
487
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
488
    abort ();
489
#endif
490
18.2k
}
491
492
/* Swap out a symbol record.  */
493
494
static void
495
ecoff_swap_sym_out (bfd *abfd, const SYMR *intern_copy, void * ext_ptr)
496
0
{
497
0
  struct sym_ext *ext = (struct sym_ext *) ext_ptr;
498
0
  SYMR intern[1];
499
500
  /* Make it reasonable to do in-place.  */
501
0
  *intern = *intern_copy;
502
503
0
  H_PUT_32 (abfd, intern->iss, ext->s_iss);
504
0
  ECOFF_PUT_OFF (abfd, intern->value, ext->s_value);
505
506
  /* Now the fun stuff...  */
507
0
  if (bfd_header_big_endian (abfd))
508
0
    {
509
0
      ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG)
510
0
        & SYM_BITS1_ST_BIG)
511
0
       | ((intern->sc >> SYM_BITS1_SC_SH_LEFT_BIG)
512
0
          & SYM_BITS1_SC_BIG));
513
0
      ext->s_bits2[0] = (((intern->sc << SYM_BITS2_SC_SH_BIG)
514
0
        & SYM_BITS2_SC_BIG)
515
0
       | (intern->reserved ? SYM_BITS2_RESERVED_BIG : 0)
516
0
       | ((intern->index >> SYM_BITS2_INDEX_SH_LEFT_BIG)
517
0
          & SYM_BITS2_INDEX_BIG));
518
0
      ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_BIG) & 0xff;
519
0
      ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_BIG) & 0xff;
520
0
    }
521
0
  else
522
0
    {
523
0
      ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_LITTLE)
524
0
        & SYM_BITS1_ST_LITTLE)
525
0
       | ((intern->sc << SYM_BITS1_SC_SH_LITTLE)
526
0
          & SYM_BITS1_SC_LITTLE));
527
0
      ext->s_bits2[0] = (((intern->sc >> SYM_BITS2_SC_SH_LEFT_LITTLE)
528
0
        & SYM_BITS2_SC_LITTLE)
529
0
       | (intern->reserved ? SYM_BITS2_RESERVED_LITTLE : 0)
530
0
       | ((intern->index << SYM_BITS2_INDEX_SH_LITTLE)
531
0
          & SYM_BITS2_INDEX_LITTLE));
532
0
      ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_LITTLE) & 0xff;
533
0
      ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_LITTLE) & 0xff;
534
0
    }
535
536
#ifdef TEST
537
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
538
    abort ();
539
#endif
540
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_sym_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_sym_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_sym_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_sym_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_sym_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_sym_out
541
542
/* Swap in an external symbol record.  */
543
544
static void
545
ecoff_swap_ext_in (bfd *abfd, void * ext_copy, EXTR *intern)
546
18.0k
{
547
18.0k
  struct ext_ext ext[1];
548
549
18.0k
  *ext = *(struct ext_ext *) ext_copy;
550
551
  /* Now the fun stuff...  */
552
18.0k
  if (bfd_header_big_endian (abfd))
553
0
    {
554
0
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
555
0
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
556
0
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);
557
0
    }
558
18.0k
  else
559
18.0k
    {
560
18.0k
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);
561
18.0k
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);
562
18.0k
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);
563
18.0k
    }
564
18.0k
  intern->reserved = 0;
565
566
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
567
18.0k
  intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
568
#endif
569
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
570
56
  intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
571
#endif
572
573
18.0k
  ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
574
575
#ifdef TEST
576
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
577
    abort ();
578
#endif
579
18.0k
}
coff-alpha.c:ecoff_swap_ext_in
Line
Count
Source
546
9
{
547
9
  struct ext_ext ext[1];
548
549
9
  *ext = *(struct ext_ext *) ext_copy;
550
551
  /* Now the fun stuff...  */
552
9
  if (bfd_header_big_endian (abfd))
553
0
    {
554
0
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
555
0
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
556
0
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);
557
0
    }
558
9
  else
559
9
    {
560
9
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);
561
9
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);
562
9
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);
563
9
    }
564
9
  intern->reserved = 0;
565
566
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
567
  intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
568
#endif
569
9
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
570
9
  intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
571
9
#endif
572
573
9
  ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
574
575
#ifdef TEST
576
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
577
    abort ();
578
#endif
579
9
}
Unexecuted instantiation: elf32-mips.c:ecoff_swap_ext_in
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_ext_in
elf64-mips.c:ecoff_swap_ext_in
Line
Count
Source
546
47
{
547
47
  struct ext_ext ext[1];
548
549
47
  *ext = *(struct ext_ext *) ext_copy;
550
551
  /* Now the fun stuff...  */
552
47
  if (bfd_header_big_endian (abfd))
553
0
    {
554
0
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
555
0
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
556
0
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);
557
0
    }
558
47
  else
559
47
    {
560
47
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);
561
47
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);
562
47
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);
563
47
    }
564
47
  intern->reserved = 0;
565
566
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
567
  intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
568
#endif
569
47
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
570
47
  intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
571
47
#endif
572
573
47
  ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
574
575
#ifdef TEST
576
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
577
    abort ();
578
#endif
579
47
}
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_ext_in
coff-mips.c:ecoff_swap_ext_in
Line
Count
Source
546
18.0k
{
547
18.0k
  struct ext_ext ext[1];
548
549
18.0k
  *ext = *(struct ext_ext *) ext_copy;
550
551
  /* Now the fun stuff...  */
552
18.0k
  if (bfd_header_big_endian (abfd))
553
0
    {
554
0
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
555
0
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
556
0
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);
557
0
    }
558
18.0k
  else
559
18.0k
    {
560
18.0k
      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);
561
18.0k
      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);
562
18.0k
      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);
563
18.0k
    }
564
18.0k
  intern->reserved = 0;
565
566
18.0k
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
567
18.0k
  intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
568
18.0k
#endif
569
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
570
  intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
571
#endif
572
573
18.0k
  ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
574
575
#ifdef TEST
576
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
577
    abort ();
578
#endif
579
18.0k
}
580
581
/* Swap out an external symbol record.  */
582
583
static void
584
ecoff_swap_ext_out (bfd *abfd, const EXTR *intern_copy, void * ext_ptr)
585
0
{
586
0
  struct ext_ext *ext = (struct ext_ext *) ext_ptr;
587
0
  EXTR intern[1];
588
589
  /* Make it reasonable to do in-place.  */
590
0
  *intern = *intern_copy;
591
592
  /* Now the fun stuff...  */
593
0
  if (bfd_header_big_endian (abfd))
594
0
    {
595
0
      ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0)
596
0
        | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0)
597
0
        | (intern->weakext ? EXT_BITS1_WEAKEXT_BIG : 0));
598
0
      ext->es_bits2[0] = 0;
599
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
600
      ext->es_bits2[1] = 0;
601
      ext->es_bits2[2] = 0;
602
#endif
603
0
    }
604
0
  else
605
0
    {
606
0
      ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_LITTLE : 0)
607
0
        | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_LITTLE : 0)
608
0
        | (intern->weakext ? EXT_BITS1_WEAKEXT_LITTLE : 0));
609
0
      ext->es_bits2[0] = 0;
610
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
611
      ext->es_bits2[1] = 0;
612
      ext->es_bits2[2] = 0;
613
#endif
614
0
    }
615
616
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
617
0
  H_PUT_S16 (abfd, intern->ifd, ext->es_ifd);
618
#endif
619
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
620
0
  H_PUT_S32 (abfd, intern->ifd, ext->es_ifd);
621
#endif
622
623
0
  ecoff_swap_sym_out (abfd, &intern->asym, &ext->es_asym);
624
625
#ifdef TEST
626
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
627
    abort ();
628
#endif
629
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_ext_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_ext_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_ext_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_ext_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_ext_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_ext_out
630
631
/* Swap in a relative file descriptor.  */
632
633
static void
634
ecoff_swap_rfd_in (bfd *abfd, void * ext_ptr, RFDT *intern)
635
0
{
636
0
  struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
637
638
0
  *intern = H_GET_32 (abfd, ext->rfd);
639
640
#ifdef TEST
641
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
642
    abort ();
643
#endif
644
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_rfd_in
Unexecuted instantiation: elf32-mips.c:ecoff_swap_rfd_in
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_rfd_in
Unexecuted instantiation: elf64-mips.c:ecoff_swap_rfd_in
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_rfd_in
Unexecuted instantiation: coff-mips.c:ecoff_swap_rfd_in
645
646
/* Swap out a relative file descriptor.  */
647
648
static void
649
ecoff_swap_rfd_out (bfd *abfd, const RFDT *intern, void * ext_ptr)
650
0
{
651
0
  struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
652
653
0
  H_PUT_32 (abfd, *intern, ext->rfd);
654
655
#ifdef TEST
656
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
657
    abort ();
658
#endif
659
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_rfd_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_rfd_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_rfd_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_rfd_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_rfd_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_rfd_out
660
661
/* Swap in an optimization symbol.  */
662
663
static void
664
ecoff_swap_opt_in (bfd *abfd, void * ext_copy, OPTR * intern)
665
0
{
666
0
  struct opt_ext ext[1];
667
668
0
  *ext = *(struct opt_ext *) ext_copy;
669
670
0
  if (bfd_header_big_endian (abfd))
671
0
    {
672
0
      intern->ot = ext->o_bits1[0];
673
0
      intern->value = (((unsigned int) ext->o_bits2[0]
674
0
      << OPT_BITS2_VALUE_SH_LEFT_BIG)
675
0
           | ((unsigned int) ext->o_bits3[0]
676
0
        << OPT_BITS2_VALUE_SH_LEFT_BIG)
677
0
           | ((unsigned int) ext->o_bits4[0]
678
0
        << OPT_BITS2_VALUE_SH_LEFT_BIG));
679
0
    }
680
0
  else
681
0
    {
682
0
      intern->ot = ext->o_bits1[0];
683
0
      intern->value = ((ext->o_bits2[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
684
0
           | (ext->o_bits3[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
685
0
           | (ext->o_bits4[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE));
686
0
    }
687
688
0
  _bfd_ecoff_swap_rndx_in (bfd_header_big_endian (abfd),
689
0
         &ext->o_rndx, &intern->rndx);
690
691
0
  intern->offset = H_GET_32 (abfd, ext->o_offset);
692
693
#ifdef TEST
694
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
695
    abort ();
696
#endif
697
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_opt_in
Unexecuted instantiation: elf32-mips.c:ecoff_swap_opt_in
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_opt_in
Unexecuted instantiation: elf64-mips.c:ecoff_swap_opt_in
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_opt_in
Unexecuted instantiation: coff-mips.c:ecoff_swap_opt_in
698
699
/* Swap out an optimization symbol.  */
700
701
static void
702
ecoff_swap_opt_out (bfd *abfd, const OPTR *intern_copy, void * ext_ptr)
703
0
{
704
0
  struct opt_ext *ext = (struct opt_ext *) ext_ptr;
705
0
  OPTR intern[1];
706
707
  /* Make it reasonable to do in-place.  */
708
0
  *intern = *intern_copy;
709
710
0
  if (bfd_header_big_endian (abfd))
711
0
    {
712
0
      ext->o_bits1[0] = intern->ot;
713
0
      ext->o_bits2[0] = intern->value >> OPT_BITS2_VALUE_SH_LEFT_BIG;
714
0
      ext->o_bits3[0] = intern->value >> OPT_BITS3_VALUE_SH_LEFT_BIG;
715
0
      ext->o_bits4[0] = intern->value >> OPT_BITS4_VALUE_SH_LEFT_BIG;
716
0
    }
717
0
  else
718
0
    {
719
0
      ext->o_bits1[0] = intern->ot;
720
0
      ext->o_bits2[0] = intern->value >> OPT_BITS2_VALUE_SH_LEFT_LITTLE;
721
0
      ext->o_bits3[0] = intern->value >> OPT_BITS3_VALUE_SH_LEFT_LITTLE;
722
0
      ext->o_bits4[0] = intern->value >> OPT_BITS4_VALUE_SH_LEFT_LITTLE;
723
0
    }
724
725
0
  _bfd_ecoff_swap_rndx_out (bfd_header_big_endian (abfd),
726
0
          &intern->rndx, &ext->o_rndx);
727
728
0
  H_PUT_32 (abfd, intern->value, ext->o_offset);
729
730
#ifdef TEST
731
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
732
    abort ();
733
#endif
734
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_opt_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_opt_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_opt_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_opt_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_opt_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_opt_out
735
736
/* Swap in a dense number.  */
737
738
static void
739
ecoff_swap_dnr_in (bfd *abfd, void * ext_copy, DNR *intern)
740
0
{
741
0
  struct dnr_ext ext[1];
742
743
0
  *ext = *(struct dnr_ext *) ext_copy;
744
745
0
  intern->rfd = H_GET_32 (abfd, ext->d_rfd);
746
0
  intern->index = H_GET_32 (abfd, ext->d_index);
747
748
#ifdef TEST
749
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
750
    abort ();
751
#endif
752
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_dnr_in
Unexecuted instantiation: elf32-mips.c:ecoff_swap_dnr_in
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_dnr_in
Unexecuted instantiation: elf64-mips.c:ecoff_swap_dnr_in
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_dnr_in
Unexecuted instantiation: coff-mips.c:ecoff_swap_dnr_in
753
754
/* Swap out a dense number.  */
755
756
static void
757
ecoff_swap_dnr_out (bfd *abfd, const DNR *intern_copy, void * ext_ptr)
758
0
{
759
0
  struct dnr_ext *ext = (struct dnr_ext *) ext_ptr;
760
0
  DNR intern[1];
761
762
  /* Make it reasonable to do in-place.  */
763
0
  *intern = *intern_copy;
764
765
0
  H_PUT_32 (abfd, intern->rfd, ext->d_rfd);
766
0
  H_PUT_32 (abfd, intern->index, ext->d_index);
767
768
#ifdef TEST
769
  if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
770
    abort ();
771
#endif
772
0
}
Unexecuted instantiation: coff-alpha.c:ecoff_swap_dnr_out
Unexecuted instantiation: elf32-mips.c:ecoff_swap_dnr_out
Unexecuted instantiation: elf64-alpha.c:ecoff_swap_dnr_out
Unexecuted instantiation: elf64-mips.c:ecoff_swap_dnr_out
Unexecuted instantiation: elfn32-mips.c:ecoff_swap_dnr_out
Unexecuted instantiation: coff-mips.c:ecoff_swap_dnr_out