In legion build config, updated path to GNU tools and updated deprecated Sun CC flag...
[OpenSPARC-T2-SAM] / sam-t2 / sam / docs / ui-cmds / cmd_load_symbols.html
CommitLineData
920dae64
AT
1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
4<title>SPARC Architectural Model: User Commands</title>
5</head>
6<body bgcolor="#FFFFFF" LANG="en-US">
7<div STYLE="margin-bottom: 0cm"></div>&nbsp;
8
9<h2>
10load_symbols
11</h2>
12
13<h4>
14NAME
15</h4>
16<ul>
17load_symbols - load a symbol table
18</ul>
19
20<h4>SYNOPSIS</h4>
21<tt>
22<ul>
23load_symbols -f <i>file_name</i> -elffile|-elfsym|-vsym [-x <i>text_start_addr</i>] [-d <i>data_start_addr</i>] [-ctx <i>context-id</i>]
24</ul>
25</tt>
26
27<h4>DESCRIPTION</h4>
28<ul>
29Loads a symbol table <i>file_name</i>.
30The following options define how <i>file_name</i> is loaded.
31<div>
32<table cellpadding="5%">
33<tr>
34<td>
35 -f&nbsp;<i>file_name</i>
36<td>
37Loads the symbol table file <i>file_name</i>.
38</td>
39</tr>
40<tr>
41<td>
42-elffile
43</td>
44<td>
45Specifiies that <i>file_name</i> is an elfile.
46</td>
47</tr>
48<tr>
49<td valign="top">
50-elfsym
51</td>
52<td>
53Specifiies that <i>file_name</i> was generated by nm -xvs <i>file</i>,
54so that each line has the format:
55<br>
56[<i>Index</i>] | <i>Value</i> | <i>Size</i> | <i>Type</i> | <i>Bind</i> | <i>Other</i> | <i>Shname</i> | <i>Name</i>
57</td>
58</tr>
59<tr>
60<td valign="top">
61-vsym
62</td>
63<td>special symbol file for diags, where each line has format
64<br>
65<i>sym_name</i> <i>va</i> <i>ra</i> <i>pa</i>
66</td>
67</tr>
68<tr>
69<td valign="top">
70-ctx
71</td>
72<td> context in which symbols will be interpreted.
73If <i>context-id</i> is numeric and greater than 0, then the context is
74non-previleged (i.e. user) context.
75A <i>context-id</i> equal to 0 or <code>k</code> implies nucleus
76context and <i>context-id</i> equal to <code>hv</code> is
77hyperprivileged context.
78If -ctx is not specified, then this set of symbols may match
79any context.
80</td>
81</tr>
82<tr>
83<td>
84-x
85</td>
86<td>
87starting physical address of the text segment
88</td>
89</tr>
90<tr>
91<td>
92-d
93</td>
94<td>
95starting address of the data segment
96</td>
97</td>
98</tr>
99</table>
100</div>
101
102<p>
103For a relocatable ELF file, the -x and -d flags are required to
104specify the starting text and data addresses. For an absolute ELF
105file, the text and data addresses are taken from the file's section header.
106<p>
107Examples:</p>
108load_symbols -elffile -f q -x 0x0100000 -d 0x0100000 -ctx hv
109<br>load_symbols -elffile -f ks/unix -ctx k
110<br>load_symbols -elffile -f ks/krtld -x 0x1081a58 -d 0x1855328 -ctx k
111<br>load_symbols -elffile -f ks/genunix -x 0x109a6a0 -d 0x185abc0 -ctx k
112<br>load_symbols -elffile -f ks/platmod -x 0x11f88c8 -d 0x18ad1b0 -ctx k
113<p>
114where ks/krtld is a relocatable ELF
115file and ks/unix is an absolute ELF file. Whether or not an ELF file is relocatable can be obtained by
116running the file utility. For example,
117</p>
118$ file ks/krtld
119<br>
120ks/krtld: ELF 64-bit MSB relocatable SPARCV9 Version 1
121<br>
122$ file ks/unix
123<br>
124ks/unix: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped
125<br>
126<p>
127In this case, ks/krtld is relocatable and ks/unix is absolute.
128
129</ul>
130
131<h4>RETURN VALUES</h4>
132<ul>
133None.
134</ul>
135
136<h4>SEE ALSO</h4>
137<ul><a href="cmd_unload_symbols.html">unload_symbols</a></ul>
138<ul><a href="cmd_sym.html">sym</a></ul>
139<hr>
140
141</body>
142</html>