Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / docs / ui-cmds / cmd_load_symbols.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>SPARC Architectural Model: User Commands</title>
</head>
<body bgcolor="#FFFFFF" LANG="en-US">
<div STYLE="margin-bottom: 0cm"></div>&nbsp;
<h2>
load_symbols
</h2>
<h4>
NAME
</h4>
<ul>
load_symbols - load a symbol table
</ul>
<h4>SYNOPSIS</h4>
<tt>
<ul>
load_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>]
</ul>
</tt>
<h4>DESCRIPTION</h4>
<ul>
Loads a symbol table <i>file_name</i>.
The following options define how <i>file_name</i> is loaded.
<div>
<table cellpadding="5%">
<tr>
<td>
-f&nbsp;<i>file_name</i>
<td>
Loads the symbol table file <i>file_name</i>.
</td>
</tr>
<tr>
<td>
-elffile
</td>
<td>
Specifiies that <i>file_name</i> is an elfile.
</td>
</tr>
<tr>
<td valign="top">
-elfsym
</td>
<td>
Specifiies that <i>file_name</i> was generated by nm -xvs <i>file</i>,
so that each line has the format:
<br>
[<i>Index</i>] | <i>Value</i> | <i>Size</i> | <i>Type</i> | <i>Bind</i> | <i>Other</i> | <i>Shname</i> | <i>Name</i>
</td>
</tr>
<tr>
<td valign="top">
-vsym
</td>
<td>special symbol file for diags, where each line has format
<br>
<i>sym_name</i> <i>va</i> <i>ra</i> <i>pa</i>
</td>
</tr>
<tr>
<td valign="top">
-ctx
</td>
<td> context in which symbols will be interpreted.
If <i>context-id</i> is numeric and greater than 0, then the context is
non-previleged (i.e. user) context.
A <i>context-id</i> equal to 0 or <code>k</code> implies nucleus
context and <i>context-id</i> equal to <code>hv</code> is
hyperprivileged context.
If -ctx is not specified, then this set of symbols may match
any context.
</td>
</tr>
<tr>
<td>
-x
</td>
<td>
starting physical address of the text segment
</td>
</tr>
<tr>
<td>
-d
</td>
<td>
starting address of the data segment
</td>
</td>
</tr>
</table>
</div>
<p>
For a relocatable ELF file, the -x and -d flags are required to
specify the starting text and data addresses. For an absolute ELF
file, the text and data addresses are taken from the file's section header.
<p>
Examples:</p>
load_symbols -elffile -f q -x 0x0100000 -d 0x0100000 -ctx hv
<br>load_symbols -elffile -f ks/unix -ctx k
<br>load_symbols -elffile -f ks/krtld -x 0x1081a58 -d 0x1855328 -ctx k
<br>load_symbols -elffile -f ks/genunix -x 0x109a6a0 -d 0x185abc0 -ctx k
<br>load_symbols -elffile -f ks/platmod -x 0x11f88c8 -d 0x18ad1b0 -ctx k
<p>
where ks/krtld is a relocatable ELF
file and ks/unix is an absolute ELF file. Whether or not an ELF file is relocatable can be obtained by
running the file utility. For example,
</p>
$ file ks/krtld
<br>
ks/krtld: ELF 64-bit MSB relocatable SPARCV9 Version 1
<br>
$ file ks/unix
<br>
ks/unix: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped
<br>
<p>
In this case, ks/krtld is relocatable and ks/unix is absolute.
</ul>
<h4>RETURN VALUES</h4>
<ul>
None.
</ul>
<h4>SEE ALSO</h4>
<ul><a href="cmd_unload_symbols.html">unload_symbols</a></ul>
<ul><a href="cmd_sym.html">sym</a></ul>
<hr>
</body>
</html>