1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "msg.h"
#include "_debug.h"
#include "libld.h"
void
Dbg_move_data(Rt_map *lmp)
{
Lm_list *lml = LIST(lmp);
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_FILE), NAME(lmp));
dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE2));
}
void
Dbg_move_adjexpandreloc(Lm_list *lml, Xword offset, const char *name)
{
if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
return;
if (DBG_NOTDETAIL())
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_ADJEXPAND), Dbg_demangle_name(name),
EC_XWORD(offset));
}
void
Dbg_move_adjmovereloc(Lm_list *lml, Xword offset1, Xword offset2,
const char *name)
{
if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
return;
if (DBG_NOTDETAIL())
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_ADJMOVE), Dbg_demangle_name(name),
EC_XWORD(offset1), EC_XWORD(offset2));
}
void
Dbg_move_outsctadj(Lm_list *lml, Sym_desc *sdp)
{
if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
return;
if (DBG_NOTDETAIL())
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_OUTSCTADJ),
Dbg_demangle_name(sdp->sd_name));
}
void
Dbg_move_parexpn(Lm_list *lml, const char *name, const char *reason)
{
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
Dbg_util_nl(lml, DBG_NL_STD);
dbg_print(lml, MSG_INTL(MSG_MOVE_PAREXPN), name, reason);
dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
}
void
Dbg_move_outmove(Lm_list *lml, const char *name)
{
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
Dbg_util_nl(lml, DBG_NL_STD);
dbg_print(lml, MSG_INTL(MSG_MOVE_OUTMOVE), name);
dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
}
void
Dbg_move_expand(Lm_list *lml, Move *mv, Addr addr)
{
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_EXPAND), EC_ADDR(addr),
EC_LWORD(mv->m_value));
}
void
Dbg_move_input(Lm_list *lml, const char *name)
{
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
Dbg_util_nl(lml, DBG_NL_STD);
dbg_print(lml, MSG_INTL(MSG_MOVE_INPUT), name);
dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
}
void
Dbg_move_entry1(Lm_list *lml, int which, Move *mv, Sym_desc *s)
{
const char *str;
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
if (which)
str = MSG_INTL(MSG_MOVE_ENTRYIN);
else
str = MSG_INTL(MSG_MOVE_ENTRYOUT);
dbg_print(lml, str, EC_XWORD(mv->m_poffset), ELF_M_SIZE(mv->m_info),
mv->m_repeat, mv->m_stride, EC_LWORD(mv->m_value), s->sd_name);
}
void
Dbg_move_entry2(Lm_list *lml, Move *mv, Word st_name, const char *name)
{
const char *sname;
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
if (st_name)
sname = name;
else
sname = MSG_INTL(MSG_STR_UNKNOWN);
dbg_print(lml, MSG_INTL(MSG_MOVE_ENTRYIN), EC_XWORD(mv->m_poffset),
ELF_M_SIZE(mv->m_info), mv->m_repeat, mv->m_stride,
EC_LWORD(mv->m_value), sname);
}
void
Dbg_move_bad(Lm_list *lml, ulong_t num, const char *name, Addr addr)
{
if (DBG_NOTCLASS(DBG_C_MOVE))
return;
dbg_print(lml, MSG_INTL(MSG_MOVE_BAD), EC_XWORD(num), name,
EC_ADDR(addr));
}
|