<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - obj2yaml symbol output missing section index for SHN_ABS and SHN_COMMON symbols"
href="https://bugs.llvm.org/show_bug.cgi?id=40786">40786</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>obj2yaml symbol output missing section index for SHN_ABS and SHN_COMMON symbols
</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>Windows NT
</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>jh7370.2008@my.bristol.ac.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>If you run obj2yaml on an object containing absolute and/or common symbols, the
yaml output contains no section index for them, resulting in them being
undefined symbols, if yaml2obj were run on the output. We should fix this!
Example failing test:
# RUN: yaml2obj %s > %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Symbols:
# CHECK-NEXT: Global:
# CHECK-NEXT: - Name: absolute1
# CHECK-NEXT: Index: SHN_ABS <--- Missing
# CHECK-NEXT: - Name: absolute2
# CHECK-NEXT: Index: SHN_ABS <--- Missing
# CHECK-NEXT: - Name: common1
# CHECK-NEXT: Index: SHN_COMMON <--- Missing
# CHECK-NEXT: - Name: common2
# CHECK-NEXT: Index: SHN_COMMON <--- Missing
# CHECK-NEXT: - Name: valid_index
# CHECK-NEXT: Section: .text
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Symbols:
Global:
- Name: absolute1
Index: SHN_ABS
Value: 0x1234
- Name: absolute2
Index: 0xfff1
Value: 0x4321
- Name: common1
Index: SHN_COMMON
- Name: common2
Index: 0xfff2
- Name: valid_index
Index: 0x1</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>