<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 --- - Corrupted section contents when using linker scripts"
href="https://llvm.org/bugs/show_bug.cgi?id=28976">28976</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Corrupted section contents when using linker scripts
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wallbraker@gmail.com
</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>Created <span class=""><a href="attachment.cgi?id=16948" name="attach_16948" title="Somewhat reduced test">attachment 16948</a> <a href="attachment.cgi?id=16948&action=edit" title="Somewhat reduced test">[details]</a></span>
Somewhat reduced test
I'm using a linker script along with "objdump -O binary" to create a kernel
binary to use with QEMU, source is available here:
<a href="https://github.com/VoltLang/metal">https://github.com/VoltLang/metal</a> . To complicate things even more it is
written in a language of my own making.
When updating from a checkout from the 3rd of August to now I get corruptions
both in the ELF file and in the resulting binary. I comped the ELF files and
binaries with hd and diff. I have bisected the issue down to these commits:
last good:
SVN: 278446, git: 39ea174062a6954a5e551f12690e654b00ec0c73
bad-1:
SVN: 278449, git: 38c706b1e4887d7dc5cbf8ef0de93b3a581cf489
bad-2:
SVN: 278461, git: 17258232b07c4ce3c73b70e9ce162d2141d2f861
bad-1 has a different set of corruptions from bad-2.
For example here is part of the boot_text section from the ELF files:
good:
00001180 00 00 00 e8 ad 01 00 00 bf fc 03 00 00 be 0b 00 |................|
00001190 00 00 e8 9e 01 00 00 5d c3 42 6f 6f 74 20 4d 65 |.......].Boot Me|
000011a0 74 61 6c 0a 00 00 00 00 00 00 00 00 00 00 00 00 |tal.............|
bad-2:
00001180 00 00 00 e8 ad 01 00 00 bf fc 03 00 00 be 0b 0d |................|
00001190 ff ff ff 9e 01 00 00 5d c3 42 52 01 00 00 4d 65 |.......].BR...Me|
000011a0 74 61 6c 0a 00 00 00 00 00 00 00 00 00 00 00 00 |tal.............|</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>