<html>
<head>
<base href="http://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 --- - -fasynchronous-unwind-tables different result .c -> .so versus .c -> .s -> .so"
href="http://llvm.org/bugs/show_bug.cgi?id=15448">15448</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-fasynchronous-unwind-tables different result .c -> .so versus .c -> .s -> .so
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tijl@coosemans.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Starting with the following C code test.c:
----
int func( void ) {
return( 0 );
}
----
Create libtest-1.so:
clang -o libtest-1.so test.c -shared -fasynchronous-unwind-tables -fPIC
Create libtest-2.so:
clang -S test.c -fasynchronous-unwind-tables -fPIC
clang -o libtest-2.so test.s -shared
These two libraries are different. Moreover libtest-2.so contains text
relocations (DF_TEXTREL).
Running the same commands with gcc 4.7 results in two identical libraries.
When comparing the object files test-1.o and test-2.o there's a difference in
the .rel.eh_frame section:
clang -o test-1.o -c test.c -fasynchronous-unwind-tables -fPIC
clang -o test-2.o -c test.s
readelf -r test-1.o
Relocation section '.rel.eh_frame' at offset 0x2e0 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000020 00000202 R_386_PC32 00000000 .text
readelf -r test-2.o
Relocation section '.rel.eh_frame' at offset 0x364 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000020 00000201 R_386_32 00000000 .text
With gcc the type of the relocation is R_386_PC32 in both cases.
OS: FreeBSD 10.0 x86</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>