<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - llvm-objdump -t includes reserved undefined symbol in output, compared with GNU objdump"
href="https://llvm.org/bugs/show_bug.cgi?id=26892">26892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-objdump -t includes reserved undefined symbol in output, compared with GNU objdump
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>emaste@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Index 0 in the symbol table is special:
<span class="quote">> Index 0 in any symbol table is used to represent undefined symbols. This first entry in a symbol table is always completely zeroed. The symbol type is therefore STT_NOTYPE.</span >
From
<a href="https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter6-79797/index.html">https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter6-79797/index.html</a>
GNU objdump hides the special symbol entry:
loader.sym: file format elf64-x86-64-freebsd
SYMBOL TABLE:
000000000000a7e0 l F .text 00000000000003f9 bi_copymodules
000000000004b1f0 l O .data 000000000000002c howto_masks
...
llvm-objdump does not hide the entry:
loader.sym: file format ELF64-x86-64
SYMBOL TABLE:
0000000000000000 *UND* 00000000
000000000000a7e0 l F .text 000003f9 bi_copymodules
000000000004b1f0 l .data 0000002c howto_masks
...
Note that "readelf -s" (both GNU and ELF Tool Chain) show this symbol as well
Symbol table '.symtab' contains 1282 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 000000000000a7e0 1017 FUNC LOCAL DEFAULT 3 bi_copymodules
2: 000000000004b1f0 44 OBJECT LOCAL DEFAULT 4 howto_masks
...
I discovered this because the build process for the FreeBSD boot components
invokes objdump -t and looks for *UND* in the output in order to report failure
in case of actual unresolved syms.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>