<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 - i686 mingw-w64 comdat functions use wrong .text section name"
href="https://bugs.llvm.org/show_bug.cgi?id=39218">39218</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>i686 mingw-w64 comdat functions use wrong .text section name
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rnk@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>If you simply build and run the example from the original mingw-w64 comdat ABI
compatibility bug
(<a href="https://github.com/Alexpux/MINGW-packages/issues/1677#issuecomment-394906508">https://github.com/Alexpux/MINGW-packages/issues/1677#issuecomment-394906508</a>,
also below) for i686, it shows we don't use the right section names:
$ cat a.cpp
inline int foo(int a, int b) { return a + b; }
int bar(void);
int main() { return foo(1, 2) + bar(); }
$ cat b.cpp
inline int foo(int a, int b) { return a + b; }
int bar() { return foo(3, 4); }
$ gcc -m32 a.cpp -c -o a.o && clang --target=i686-w64-windows-gnu -c b.cpp -o
b.o
$ dumpbin a.o | grep text
34 .text
10 .text$_Z3fooii
$ dumpbin b.o | grep text
1F .text
1F .text$__Z3fooii
Clang adds the extra '_' for Windows C symbol mangling, but GCC does not.
A user emailed me directly to report that they were getting linker errors, but
I have not been able to observe any problems caused by this mismatch.</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>