<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Sep 12, 2007, at 3:56 PM, Dound wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR><BR><DIV><SPAN class="gmail_quote">On 9/12/07, <B class="gmail_sendername">Chris Lattner</B> <<A href="mailto:sabre@nondot.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sabre@nondot.org </A>> wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On Wed, 12 Sep 2007, Dound wrote:<BR>> I am trying compile a libc with llvm (currently uclibc).  I am able to<BR>> compile uclibc by changing the Rules.mak to use llvm-gcc, llvm-ar, llvm-ad,<BR>> and not using strip.  (I also use the --emit-llvm flag for llvm-gcc).  When <BR>> I run llvm-nm on libc.a (or try to use libc.a) I run into problems.  For<BR>> example, strlen is not defined -- llvm-nm shows that strlen.os has<BR>> __GI_strlen while if I compile with the "normal" tools (gcc, ar, ...) <BR>> strlen.os has __GI_strlen as well as strlen listed (both have the symbol<BR>> value 00000000).<BR>><BR>> Any ideas why the archive I create with llvm doesn't define the strlen (and<BR>> most other) symbols but does define the __GI_strlen? <BR><BR>Can you paste the output of nm for the native GCC version?  It's possible<BR>that uclibc is using aliases for these, and it seems very likely that<BR>llvm-nm just isn't printing aliases at all.  Anton, do you want to see if <BR>llvm-nm should be extended by this?</BLOCKQUOTE><DIV><BR>Sure, thanks for your thoughts ... it is  a little long so I'll just include links to the nm output:<BR><BR>nm on the gcc generated native archive: <A href="http://www.dound.com/tmp/nm-native.txt"> http://www.dound.com/tmp/nm-native.txt</A><BR>llvm-nm on the llvm generated archive: <A href="http://www.dound.com/tmp/nm-llvm.txt">http://www.dound.com/tmp/nm-llvm.txt</A></DIV></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><BR>Okay, this doesn't look like an alias issue :).  WIthout more information, I can't tell what is going on.  Please build the file that produces strlen.os with the -E option to get preprocessed output, and attach it to a bugzilla entry.  With that we can figure out what is happening.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-Chris</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR></BODY></HTML>