<div class="gmail_quote">On Fri, Mar 30, 2012 at 15:22, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On Fri, Mar 30, 2012 at 12:12 PM, Sean Hunt <<a href="mailto:scshunt@csclub.uwaterloo.ca">scshunt@csclub.uwaterloo.ca</a>> wrote:<br>
> Why is it that high (>127) bytes in symbol names get mangled by LLVM into<br>
> _XX_, where XX is the hex representation of the character? Is this required<br>
> by ELF or some similar standard? This behavior is inconsistent with GCC.<br>
<br>
</div></div>I think it's just so that we have a way to actually write out the<br>
symbol into the assembly file.  What does gcc do?<br>
<span class="HOEnZb"><font color="#888888"><br>
-Eli<br>
<br>
</font></span></blockquote></div><br>It emits the high bits literally. The consequence is that UTF-8-encoded identifiers come out in UTF-8:<br><br>scshunt@natural-flavours:~$ gcc -fextended-identifiers -std=c99 -x c -c -o test.o -<br>

int i\u03bb;<br>scshunt@natural-flavours:~$ nm test.o<br>00000004 C iλ<br>scshunt@natural-flavours:~$ <br><br>As you can see, the nm output includes the literal lambda.<br><br>Sean<br>