<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>编译点滴 &#187; ld</title>
	<atom:link href="http://www.lingcc.com/tag/ld/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lingcc.com</link>
	<description>编译器、虚拟机、程序设计语言、体系结构、软件调试、操作系统等等</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:56:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>使用ld的wrap选项替换已有库函数</title>
		<link>http://www.lingcc.com/2011/12/23/11907/</link>
		<comments>http://www.lingcc.com/2011/12/23/11907/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 06:33:37 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[系统软件及库]]></category>
		<category><![CDATA[编译技术]]></category>
		<category><![CDATA[binutils]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[linker]]></category>
		<category><![CDATA[malloc]]></category>
		<category><![CDATA[内存对齐]]></category>
		<category><![CDATA[链接器]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=11907</guid>
		<description><![CDATA[很多时候，可能需要替换已有库函数，或者对其库函数进行修改。 为了避免对那些静态链接库或者动态链接库文件大动干戈，我们可以使用ld提供的–wrap选项。 例如，想把所有的malloc函数都作修改，以便让malloc出的内存都是32字节对齐的。 我们可以给ld传选项“­­wrap=malloc”， 告诉ld，我们将替换名称为malloc的函数。 接着再如下定义一个新的malloc函数: void * __wrap_malloc( size_t size) { void* result; result=memalign(32, size); return result; } 可以看到，程序中有个类似库函数名称的__wrap_malloc。 ld在遇到__wrap选项后，会使用__wrap_malloc函数名替换所有对malloc的调用。 并以此实现替换的作用。 那麽，如果还向调用原函数怎么办呢？ 可以使用__real_malloc，这个函数名称就对应了原来的malloc。 每次调用malloc时都打印生成的指针地址。 void * __wrap_malloc( size_t size) { void* result; result= __real_malloc( size); printf("Malloc: allocate %d byte mem, start at %p", size, result); return result; } 附完整程序： #include &#60;stdio.h&#62; #include &#60;stdlib.h&#62; void <a href='http://www.lingcc.com/2011/12/23/11907/'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="百度IM内测版界面曝光" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F29%2F9908%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115680.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">百度IM内测版界面曝光</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="领带的11种打法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F29%2F9965%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/07/7840031.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">领带的11种打法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="技术人员处理好管理与被管理的关系" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F11%2F9942%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">技术人员处理好管理与被管理的关系</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VANCL赶超PPG 衬衫直销行业洗牌" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F14%2F9951%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VANCL赶超PPG 衬衫直销行业洗牌</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="如何打领带五种方法加视频" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F04%2F9892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115617.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">如何打领带五种方法加视频</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/12/23/11440/' rel='bookmark' title='字符串基本操作集锦'>字符串基本操作集锦</a></li>
<li><a href='http://www.lingcc.com/2010/01/21/10663/' rel='bookmark' title='小例子&#8211;回眸一笑百媚生'>小例子&#8211;回眸一笑百媚生</a></li>
<li><a href='http://www.lingcc.com/2010/10/12/11305/' rel='bookmark' title='如何让程序屏蔽CTRL+C和CTRL+Z'>如何让程序屏蔽CTRL+C和CTRL+Z</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
<li><a href='http://www.lingcc.com/2009/12/01/10171/' rel='bookmark' title='如何得到当前linux系统的页大小'>如何得到当前linux系统的页大小</a></li>
<li><a href='http://www.lingcc.com/2010/10/09/11296/' rel='bookmark' title='宏和内联函数'>宏和内联函数</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>很多时候，可能需要替换已有库函数，或者对其库函数进行修改。<br />
为了避免对那些静态链接库或者动态链接库文件大动干戈，我们可以使用ld提供的–wrap选项。</p>
<p><span id="more-11907"></span></p>
<p>例如，想把所有的malloc函数都作修改，以便让malloc出的内存都是32字节对齐的。<br />
我们可以给ld传选项“­­wrap=malloc”， 告诉ld，我们将替换名称为malloc的函数。<br />
接着再如下定义一个新的malloc函数:</p>
<pre class="src src-c"><span style="color: #228b22;">void</span> * <span style="color: #0000ff;">__wrap_malloc</span>( <span style="color: #228b22;">size_t</span> <span style="color: #b8860b;">size</span>) {
  <span style="color: #228b22;">void</span>* <span style="color: #b8860b;">result</span>;
  result=memalign(32, size);
  <span style="color: #a020f0;">return</span> result;
}</pre>
<p>可以看到，程序中有个类似库函数名称的__wrap_malloc。<br />
ld在遇到__wrap选项后，会使用__wrap_malloc函数名替换所有对malloc的调用。<br />
并以此实现替换的作用。</p>
<p>那麽，如果还向调用原函数怎么办呢？<br />
可以使用__real_malloc，这个函数名称就对应了原来的malloc。<br />
每次调用malloc时都打印生成的指针地址。</p>
<pre class="src src-c"><span style="color: #228b22;">void</span> * <span style="color: #0000ff;">__wrap_malloc</span>( <span style="color: #228b22;">size_t</span> <span style="color: #b8860b;">size</span>) {
  <span style="color: #228b22;">void</span>* <span style="color: #b8860b;">result</span>;
  result= __real_malloc( size);
  printf(<span style="color: #bc8f8f;">"Malloc: allocate %d byte mem, start at %p"</span>, size, result);

  <span style="color: #a020f0;">return</span> result;
}</pre>
<p>附完整程序：</p>
<pre class="src src-c"><span style="color: #da70d6;">#include</span> <span style="color: #bc8f8f;">&lt;stdio.h&gt;</span>
<span style="color: #da70d6;">#include</span> <span style="color: #bc8f8f;">&lt;stdlib.h&gt;</span>

<span style="color: #228b22;">void</span> * <span style="color: #0000ff;">__wrap_malloc</span>( <span style="color: #228b22;">size_t</span> <span style="color: #b8860b;">size</span>) {
  <span style="color: #228b22;">void</span>* <span style="color: #b8860b;">result</span>;
  <span style="color: #b22222;">//</span><span style="color: #b22222;">result= __real_malloc( size); </span>  result = memalign(32, size);
  printf(<span style="color: #bc8f8f;">"Malloc: allocate %d byte mem, start at %p"</span>, size, result);

  <span style="color: #a020f0;">return</span> result;
}

<span style="color: #228b22;">int</span> <span style="color: #0000ff;">main</span> ()
{
  <span style="color: #228b22;">int</span> <span style="color: #b8860b;">i</span>,<span style="color: #b8860b;">n</span>;
  <span style="color: #228b22;">char</span> * <span style="color: #b8860b;">buffer</span>;

  printf (<span style="color: #bc8f8f;">"How long do you want the string? "</span>);
  <span style="color: #b22222;">//</span><span style="color: #b22222;">scanf ("%d", &amp;i); </span>  i = 200;

  buffer = (<span style="color: #228b22;">char</span>*) malloc (i+1);
  <span style="color: #a020f0;">if</span> (buffer==<span style="color: #5f9ea0;">NULL</span>) exit (1);

  <span style="color: #a020f0;">for</span> (n=0; n&lt;i; n++)
    buffer[n]=rand()%26+<span style="color: #bc8f8f;">'a'</span>;
  buffer[i]=<span style="color: #bc8f8f;">'\0'</span>;

  printf (<span style="color: #bc8f8f;">"Random string: %s\n"</span>,buffer);
  free (buffer);

  <span style="color: #a020f0;">return</span> 0;
}</pre>
<p>编译选项：</p>
<pre class="src src-sh">$<span style="color: #b8860b;">gcc</span> test_malloc.c -Wl,--wrap=malloc</pre>
<h2>参考：</h2>
<ul>
<li><a title="http://sourceware.org/binutils/docs-2.22/ld/Options.html#Options" href="http://sourceware.org/binutils/docs-2.22/ld/Options.html#Options">http://sourceware.org/binutils/docs-2.22/ld/Options.html#Options</a></li>
<li><a title="http://linux.die.net/man/3/memalign" href="http://linux.die.net/man/3/memalign">http://linux.die.net/man/3/memalign</a></li>
</ul>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="百度IM内测版界面曝光" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F29%2F9908%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115680.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">百度IM内测版界面曝光</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="领带的11种打法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F29%2F9965%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/07/7840031.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">领带的11种打法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="技术人员处理好管理与被管理的关系" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F11%2F9942%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">技术人员处理好管理与被管理的关系</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VANCL赶超PPG 衬衫直销行业洗牌" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F14%2F9951%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VANCL赶超PPG 衬衫直销行业洗牌</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="如何打领带五种方法加视频" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F04%2F9892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F23%2F11907%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115617.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">如何打领带五种方法加视频</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/12/23/11440/' rel='bookmark' title='字符串基本操作集锦'>字符串基本操作集锦</a></li>
<li><a href='http://www.lingcc.com/2010/01/21/10663/' rel='bookmark' title='小例子&#8211;回眸一笑百媚生'>小例子&#8211;回眸一笑百媚生</a></li>
<li><a href='http://www.lingcc.com/2010/10/12/11305/' rel='bookmark' title='如何让程序屏蔽CTRL+C和CTRL+Z'>如何让程序屏蔽CTRL+C和CTRL+Z</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
<li><a href='http://www.lingcc.com/2009/12/01/10171/' rel='bookmark' title='如何得到当前linux系统的页大小'>如何得到当前linux系统的页大小</a></li>
<li><a href='http://www.lingcc.com/2010/10/09/11296/' rel='bookmark' title='宏和内联函数'>宏和内联函数</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2011/12/23/11907/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>认识静态链接库</title>
		<link>http://www.lingcc.com/2010/05/25/10951/</link>
		<comments>http://www.lingcc.com/2010/05/25/10951/#comments</comments>
		<pubDate>Tue, 25 May 2010 13:33:01 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[系统软件及库]]></category>
		<category><![CDATA[编译技术]]></category>
		<category><![CDATA[compiler infrastructure]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[工具链]]></category>
		<category><![CDATA[操作系统 Operating system]]></category>
		<category><![CDATA[系统健壮性]]></category>
		<category><![CDATA[编译器]]></category>
		<category><![CDATA[编译器开发]]></category>
		<category><![CDATA[运行时技术]]></category>
		<category><![CDATA[链接]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10951</guid>
		<description><![CDATA[介绍静态链接库是什么，为何要有静态链接库，动态链接库和共享库，如何使用，创建，编辑静态练级库。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F08%2F10609%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GCC中的pie和fpie选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2009%2F11%2F20%2F10065%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gcc和Open64中的-fPIC选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F11%2F11300%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">软链接和硬链接</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GNU工具链学习笔记</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F10%2F9937%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">百度Hi策略的猜想</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/05/07/10916/' rel='bookmark' title='期待未来-一张趣图'>期待未来-一张趣图</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2010/07/16/11081/' rel='bookmark' title='多面体模型是编译器循环优化的未来吗？'>多面体模型是编译器循环优化的未来吗？</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<h4>什么是静态链接库？</h4>
<p>静态链接库，即static library或 statically-linked library。和动态链接库，即dynamic library 或dynamicly-linked library相对，是Windows和Linux系统中比较常用的库文件。Windows中分别用SLL和DLL文件表示，Linux中分别是.a和.so文件.</p>
<p>静态链接库实际是一些object files(.o文件)和头文件的压缩包，通过GNU工具链中的ar(archiver)程序创建。</p>
<h5>静态链接库、动态链接库和共享库</h5>
<p>那为何还要有动态链接库呢？静态练级库虽然能很好的节省编译时间。对于一个简单的ls程序，我们需要有屏幕输出，有字符串和格式操作，有文件系统访问等等函数，都要在一个程序中。此时，这个程序会很大。一个小小的ls可能都会有好几兆。如果还有个rm程序，同样也需要屏幕输出，文件系统访问。那么这两个东西，我们可以放到两个库文件里，在执行ls，或者rm的时候，用到屏幕输出操作，就将相应的函数对应的机器码载入内存中，执行。然后再从内存中释放。接着载入文件系统访问的相关函数。这样我们的程序就能变小很多。这种可以动态装载到内存中的库文件就是动态链接库了。Windows下的DLL文件就是动态链接库。</p>
<p><span id="more-10951"></span></p>
<p>还有个问题，其实ls和rm使用的屏幕输出函数是一样的。内存很小的时候，同时执行ls和rm，有必要同时载入两份相同的代码到内存中吗？于是就有了共享库，不同的程序可以共享相同的代码。都可以访问，执行。于是就有了共享库的概念。Linux下的.so文件就是共享库。</p>
<p>这时候又有个问题，程序执行时，访存，跳转的地址是一定的，那两个程序又如何共享相同的库代码呢？这就靠位置无关的代码生成了。本博曾经写过文章介绍它们，请参考<a href="http://www.lingcc.com/2009/11/20/10065/" target="_blank">Gcc和Open64中的-fPIC选项</a> 和<a href="http://www.lingcc.com/2010/01/08/10609/" target="_blank">GCC中的pie和fpie选项</a>两篇文章。</p>
<p>下图是关于共享库和静态链接库的示意图，可以简单看出些区别。</p>
<div id="attachment_10952" class="wp-caption alignnone" style="width: 351px"><a href="http://www.lingcc.com/wp-content/uploads/2010/05/figure2.gif"><img class="size-full wp-image-10952" title="静态链接库和共享库" src="http://www.lingcc.com/wp-content/uploads/2010/05/figure2.gif" alt="" width="341" height="265" /></a><p class="wp-caption-text">静态链接库和共享库</p></div>
<h4>为什么要有静态链接库？</h4>
<p>首先，随着程序规模的增加，有些常用函数可能不需要每次都编译，于是就可以把它们作为库的方式来存放。这样用户就能很方便的链接生成最后的程序，不用一遍遍的重新编译某些常用程序文件。必须内核，硬件驱动，文件系统，glibc等等库文件，一些基本函数都采用了这种形式。</p>
<p>其次，一些闭源代码，可以通过库的方式来发布，这样可以保证代码不公开。</p>
<p>再次，相比动态链接的程序，或者共享库程序，连接到静态库的程序会快1%-5%左右。</p>
<p>另外，有些特殊环境，必须使用静态链接库。比如在Linux系统，需要chroot到另一个系统环境中时，动态链接库就不再起作用，因为那些是在原来系统的文件树下，如/usr/lib.但在chroot的环境中，无法访问。</p>
<h4>怎么用静态链接库？</h4>
<p>既然静态链接库的出现，是为了缩短编译时间。而普通可执行程序又可以分为静态链和动态链两种形式。因此我们就分开介绍之，原因无他，只是想顺便介绍一下动态链可执行程序和静态链可执行程序在运行时的一些区别。</p>
<p>对于静态链接库的应用，加上-lname，就会链接libname.a这个静态链接库文件。一般静态链接库文件的搜索路径为系统默认的路径，如/usr/lib/和当前路径。你也可以用过-L选项，指定GCC搜索某个特定文件夹。注意-l和-L的参数要加载待编译源码文件之后。</p>
<p>静态链接库既可以在编译时用于生成单个可执行文件，也可以在运行时根据编译或者连接时确定的静态偏移量载入内存中。</p>
<h5>编译静态链接可执行程序</h5>
<p>编译静态链可执行程序,对于gcc，只要加上-static即可。</p>
<p>编译时，程序中若有对库函数的调用，编译器或者连接器就会将库中相应的代码拷贝到目标文件中，生成一个独立的可执行文件。</p>
<h5>编译动态链接可执行程序</h5>
<p>不加-static编译生成的可执行程序都是动态链接的，编译时所做工作很少，仅仅记录了该程序需要什么库函数，以及该库函数在库中到索引。</p>
<p>但对于动态链接程序，在系统启动该可执行程序时，装载器loader必须能找到相应的共享库文件.so文件或者静态链接库文件.a(已经很少使用这种形式了)，并将其载入内存中，一般的，有两种途径可以指定链接库文件的位置，</p>
<ul>
<li>编译动态链接可执行程序时，通过rpath指定，这个可以在编译时增加选项-Wl,-rpath=DIRS.这种方式不需要在运行时做任何修改，该选项会在连接时，写入可执行程序中。</li>
<li>运行时由ld.so指定。默认共享库搜索路径是/usr/local/lib，/usr/lib以及当前目录，你可以通过修改$LD_LIBRARY_PATH变量修改。系统管理员也可以在/etc/profile中修改，以便对所有用户有效。当然修改/etc/ld.so.conf也行，这样所有的程序都将更改寻找链接库文件的路径。</li>
</ul>
<div id="attachment_10953" class="wp-caption alignnone" style="width: 487px"><a href="http://www.lingcc.com/wp-content/uploads/2010/05/confused.jpg"><img class="size-full wp-image-10953" title="很晕吧" src="http://www.lingcc.com/wp-content/uploads/2010/05/confused.jpg" alt="" width="477" height="358" /></a><p class="wp-caption-text">很晕吧</p></div>
<h4>静态链接库的常用操作</h4>
<h5>制作静态链接库</h5>
<p><code>$ar rcs liba.a a.o b.o c.o a_header.h b_header.h</code></p>
<p>上面命令，将a.o, b.o, c.o, a_header.h, b_header.h作成静态链接库liba.a.</p>
<ul>
<li>选项r：将 .o , .h文件插入到liba.a文件中</li>
<li>c:创建一个压缩文件。</li>
<li>s：将.o文件的索引信息写入压缩文件中，或者升级已有索引。这和执行 ranlib liba.a的效果过一样。索引信息会存在压缩包的一个符号文件夹内，连接器可以通过名称找到位置，这样可以加速连接时间。</li>
</ul>
<h5>解压静态链接库</h5>
<p><code>$ar xv liba.a</code></p>
<p>该命令会把liba.a中所有的文件解压缩到当前目录下。</p>
<ul>
<li>x：解压缩该压缩包</li>
<li>v：可视化，解压缩同时输出到屏幕</li>
</ul>
<h5>查看内容</h5>
<p><code>$nm --print-armap liba.a</code></p>
<p>该命令查看liba.a中包含哪些文件，每个文件中包含哪些函数。</p>
<ul>
<li>在列出压缩包中所有文件中的符号，同时包含索引：每个元素到符号的映射</li>
</ul>
<h5>实践：</h5>
<p>本文不再给出具体实践，可以参考<a href="http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html" target="_blank">An Introduction to GCC &#8211; Shared libraries and static libraries</a></p>
<h4>参考：</h4>
<ol>
<li><a href="http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html">http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html</a></li>
<li><a href="http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html"></a><a href="http://en.wikipedia.org/wiki/Static_library">http://en.wikipedia.org/wiki/Static_library</a></li>
<li><a href="http://cpp.codenewbie.com/articles/cpp/1444/Static_Link_Librarys-Page_1.html">http://cpp.codenewbie.com/articles/cpp/1444/Static_Link_Librarys-Page_1.html</a></li>
<li><a href="http://tldp.org/HOWTO/Program-Library-HOWTO/static-libraries.html">http://tldp.org/HOWTO/Program-Library-HOWTO/static-libraries.html</a></li>
<li><a href="http://www.faqs.org/docs/linux_scratch/chapter05/whystatic.html">http://www.faqs.org/docs/linux_scratch/chapter05/whystatic.html</a></li>
<li><a href="http://en.wikipedia.org/wiki/Dynamic-link_library">http://en.wikipedia.org/wiki/Dynamic-link_library</a></li>
<li><a href="http://www.ibm.com/developerworks/linux/library/l-dynamic-libraries/index.html" target="_blank">http://www.ibm.com/developerworks/linux/library/l-dynamic-libraries/index.html</a></li>
</ol>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F08%2F10609%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GCC中的pie和fpie选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2009%2F11%2F20%2F10065%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gcc和Open64中的-fPIC选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F11%2F11300%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">软链接和硬链接</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GNU工具链学习笔记</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F10%2F9937%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">百度Hi策略的猜想</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/05/07/10916/' rel='bookmark' title='期待未来-一张趣图'>期待未来-一张趣图</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2010/07/16/11081/' rel='bookmark' title='多面体模型是编译器循环优化的未来吗？'>多面体模型是编译器循环优化的未来吗？</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/05/25/10951/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装LLVM2.7 step by step</title>
		<link>http://www.lingcc.com/2010/05/03/10884/</link>
		<comments>http://www.lingcc.com/2010/05/03/10884/#comments</comments>
		<pubDate>Mon, 03 May 2010 14:20:26 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[LLVM]]></category>
		<category><![CDATA[编译技术]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[llvm 安装]]></category>
		<category><![CDATA[llvm测试]]></category>
		<category><![CDATA[mit]]></category>
		<category><![CDATA[中间表示]]></category>
		<category><![CDATA[虚拟机]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10884</guid>
		<description><![CDATA[LLVM2.7已经发布好几天了。今天尝试一下：） 1，下载相关源码包： wget -c http://llvm.org/releases/2.7/llvm-2.7.tgz wget -c http://llvm.org/releases/2.7/clang-2.7.tgz wget -c http://llvm.org/releases/2.7/llvm-gcc-4.2-2.7.source.tgz wget -c http://llvm.org/releases/2.7/llvm-test-2.7.tgz llvm-2.7.tgz是LLVM的主要源码包，clang-2.7.tgz：Clang前端，llvm-gcc-4.2-2.7.source.tgz:GCC4.2前端，llvm-test-2.7.tgz：LLVM 测试验证包。 2，接下来就是解压源码： 因为LLVM官方已经很自信clang的正确性了。本博打算只试试clang前端：） 注意，clang和llmv-test需要放在llvm源码中的指定位置。 解压缩LLVM-2.7源码 tar xzf llvm-2.7.tgz 解压缩Clang源码到llvm27/tools/clang/下 tar xzf llvm-tar/clang-2.7.tgz cp -r clang-2.7 llvm-2.7/tools/clang 3，标准姿势，configure,make,make install mkdir llvm-build cd llvm-build ../llvm-2.7/configure --prefix=/home/lingcc --disable-optimize make make install 4.testsuite要特殊对待。 解压缩llvm-test-2.7.tgz到llvm-2.7/projects/test-suite/下 tar xzf llvm-tar/llvm-test-2.7.tgz cp -r llvm-test-2.7 llvm-2.7/projects/test-suite cd llvm-build ../llvm-2.7/configure <a href='http://www.lingcc.com/2010/05/03/10884/'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F20%2F11361%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM居然开始做广告了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F15%2F11963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64、LLVM、GCC源代码行数对比</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F08%2F11882%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">你好，LLVM 3.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F14%2F11333%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Clang可以编译Chromium了</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F28%2F10807%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM 2.7 发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/04/28/10807/' rel='bookmark' title='LLVM 2.7 发布'>LLVM 2.7 发布</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2011/12/08/11882/' rel='bookmark' title='你好，LLVM 3.0'>你好，LLVM 3.0</a></li>
<li><a href='http://www.lingcc.com/2010/10/14/11333/' rel='bookmark' title='Clang可以编译Chromium了'>Clang可以编译Chromium了</a></li>
<li><a href='http://www.lingcc.com/2010/01/03/10573/' rel='bookmark' title='过程间分析(InterProcedural Analysis)很好很强大'>过程间分析(InterProcedural Analysis)很好很强大</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>LLVM2.7已经发布好几天了。今天尝试一下：）</p>
<p>1，下载相关源码包：<br />
<code><br />
wget -c http://llvm.org/releases/2.7/llvm-2.7.tgz<br />
wget -c http://llvm.org/releases/2.7/clang-2.7.tgz<br />
wget -c http://llvm.org/releases/2.7/llvm-gcc-4.2-2.7.source.tgz<br />
wget -c http://llvm.org/releases/2.7/llvm-test-2.7.tgz<br />
</code><br />
llvm-2.7.tgz是LLVM的主要源码包，clang-2.7.tgz：Clang前端，llvm-gcc-4.2-2.7.source.tgz:GCC4.2前端，llvm-test-2.7.tgz：LLVM 测试验证包。<br />
<span id="more-10884"></span> 2，接下来就是解压源码：<br />
因为LLVM官方已经很自信clang的正确性了。本博打算只试试clang前端：）<br />
注意，clang和llmv-test需要放在llvm源码中的指定位置。</p>
<p>解压缩LLVM-2.7源码<br />
<code>tar  xzf  llvm-2.7.tgz </code><br />
解压缩Clang源码到llvm27/tools/clang/下<br />
<code>tar xzf llvm-tar/clang-2.7.tgz<br />
cp -r clang-2.7 llvm-2.7/tools/clang </code><br />
3，标准姿势，configure,make,make install<br />
<code><br />
mkdir llvm-build<br />
cd llvm-build<br />
../llvm-2.7/configure --prefix=/home/lingcc --disable-optimize<br />
make<br />
make install</code><br />
4.testsuite要特殊对待。<br />
解压缩llvm-test-2.7.tgz到llvm-2.7/projects/test-suite/下<br />
<code>tar xzf llvm-tar/llvm-test-2.7.tgz<br />
cp -r llvm-test-2.7 llvm-2.7/projects/test-suite<br />
cd llvm-build<br />
../llvm-2.7/configure --prefix=/home/lingcc --disable-optimize<br />
cd llvm-build/projects/test-suite/<br />
gmake</code><br />
日后的改动，都可以在llvm-build/projects/test-suite/验证正确性。<br />
5.快来！helloworld<br />
<code><br />
#include<br />
int main()<br />
{<br />
printf("hello,LLVM\n");<br />
return 0;<br />
}</code><br />
直接生成可执行文件:<br />
<code>clang hello.c -o hello -v</code><br />
使用-v选项能看到，clang负责生成了汇编文件.s,然后/usr/bin/gcc负责将汇编文件转为.o文件，进而生成hello可执行文件。</p>
<p>生成LLVM中间表示文件.bc:<br />
<code>clang hello.c -c -o hello.bc -emit-llvm -v</code><br />
用LLVM虚拟机执行<br />
<code> lli hello.bc</code><br />
看看输出结果是不是一致：）</p>
<p>转换为可读模式的LLVM中间表示:<br />
<code>llvm-dis &lt; hello.bc</code><br />
将LLVM中间表示转换为汇编语言文件:<br />
<code> llc hello.bc -o hello.s</code><br />
汇编文件就可以直接使用GCC转换为可执行文件了<br />
<code>gcc hello.s -o hello.native</code><br />
执行一下：<br />
<code>./hello.native</code></p>
<p>参考：</p>
<p>http://llvm.org/docs/TestingGuide.html#testsuiterun</p>
<p>http://llvm.org/docs/GettingStarted.html#installcf</p>
<p>http://llvm.org/docs/TestingGuide.html</p>
<p>http://llvm.org/releases/</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F20%2F11361%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM居然开始做广告了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F15%2F11963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64、LLVM、GCC源代码行数对比</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2011%2F12%2F08%2F11882%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">你好，LLVM 3.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F14%2F11333%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Clang可以编译Chromium了</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F28%2F10807%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM 2.7 发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/04/28/10807/' rel='bookmark' title='LLVM 2.7 发布'>LLVM 2.7 发布</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2011/12/08/11882/' rel='bookmark' title='你好，LLVM 3.0'>你好，LLVM 3.0</a></li>
<li><a href='http://www.lingcc.com/2010/10/14/11333/' rel='bookmark' title='Clang可以编译Chromium了'>Clang可以编译Chromium了</a></li>
<li><a href='http://www.lingcc.com/2010/01/03/10573/' rel='bookmark' title='过程间分析(InterProcedural Analysis)很好很强大'>过程间分析(InterProcedural Analysis)很好很强大</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/05/03/10884/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>前瞻-LLVM大事记(2004-2010)</title>
		<link>http://www.lingcc.com/2010/04/30/10822/</link>
		<comments>http://www.lingcc.com/2010/04/30/10822/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 12:04:03 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[LLVM]]></category>
		<category><![CDATA[编译前沿]]></category>
		<category><![CDATA[编译技术]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Chris Lattener]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[compiler infrastructure]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[JIT]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[MIPS]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[N64]]></category>
		<category><![CDATA[Open64]]></category>
		<category><![CDATA[openmp]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[SPEC2000]]></category>
		<category><![CDATA[SSA]]></category>
		<category><![CDATA[x86]]></category>
		<category><![CDATA[中间表示]]></category>
		<category><![CDATA[全时优化]]></category>
		<category><![CDATA[后端]]></category>
		<category><![CDATA[性能]]></category>
		<category><![CDATA[整点]]></category>
		<category><![CDATA[编译器]]></category>
		<category><![CDATA[编译器开发]]></category>
		<category><![CDATA[编译器性能]]></category>
		<category><![CDATA[编译器架构]]></category>
		<category><![CDATA[过程间优化]]></category>
		<category><![CDATA[过程间分析和优化 Inter procedural Analysis]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10822</guid>
		<description><![CDATA[因为之前的两篇博文前瞻-全时优化和LLVM-1和前瞻-全时优化和LLVM-2都是基于Chris Lattner 2004年发表在CGO的文章写的。所以需要介绍一下LLVM从2004到2010这六年的变化，LLVM的开发社区很活跃。 从2004年三月到2010年4月，LLVM共发布了1.2-1.9，2.0-2.7，16个版本，至少每年发布两个版本。详细的历史发布版本和release都能从这里找到。 1.2增加了调试信息支持， 1.3增加精确垃圾收集功能， 1.4增加PowerPC JIT支持，增加通用的编译驱动器和连接器； 1.5增加针对Alpha,IA-64和SPARC-V8的代码生成器，新的指令选择机制； 1.6指令选择能从机器模型中生成，指令调度支持，支持子目标机代码生成器； 1.7向量支持，新的GCC4.0 C/C++前端，Objective C/C++支持，汇编内联支持； 1.8DWARF调试支持,循环优化改进； 1.9新的X86-64后端，连接时优化能和本机连接器交互； 2.0中间表示更新(整型完全无符号化，任意长度位的整型支持),代码生成器更新(软浮点支持),X86,ARM,PowerPC代码生成改进； 2.1.gcc-4.2前端，Fortran，Ada和OpenMP支持，MIPS后端支持； 2.2 Clang启动，CellSPU后端支持，精确垃圾收集代码重构； 2.3, 不再支持gcc4.0前端，vmkit启动(用LLVM实现JVM和CLI)，多返回值支持，llvmc重构，连接时优化起结构重写 2.4，增加优化，并缩短O0编译时间，PIC16微处理器支持 2.5，启动Pure,LLVM D Compiler,Roadsend PHP;XCore后端支持 2.6，启动compiler-rt,KLEE,machine code toolkit,开优化时调试信息行号支持，新MSP430，SystemZ和Blackin后端支持，Gold连接器插件支持 2.7，启动LLVM新logo，MicroBlaze后端支持。 以上就是从04年到10年LLVM每次发行新版本中给出的最要新特性.可以看出，几乎和普通的编译器没有什么两样。所做的无非在增加新前端，编译更多的语言，支持新后端，可以在更多的处理器上运行。增加中间优化，调bug。 LLVM近几年的发展路线已经越来越像一个标准的，前端+后端+优化的编译器。运行时的优化也大部分集中在JIT上，反馈制导优化也没有涉及。 Chris Lattener最近几年发表的文章： “Making Context-sensitive Points-to Analysis with Heap Cloning Practical For The Real World” PLDI 2007, San Diego, CA, June 2007。 “Macroscopic Data <a href='http://www.lingcc.com/2010/04/30/10822/'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F20%2F11361%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM居然开始做广告了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">安装LLVM2.7 step by step</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F28%2F10807%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM 2.7 发布</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F06%2F15%2F10978%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64业内外人士对LLVM和Open64的观点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F15%2F11963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64、LLVM、GCC源代码行数对比</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/04/29/10728/' rel='bookmark' title='前瞻-全时优化和LLVM-2'>前瞻-全时优化和LLVM-2</a></li>
<li><a href='http://www.lingcc.com/2010/04/14/10736/' rel='bookmark' title='探秘CPU性能测试：Spec CPU2000之整点篇'>探秘CPU性能测试：Spec CPU2000之整点篇</a></li>
<li><a href='http://www.lingcc.com/2009/11/18/10000/' rel='bookmark' title='Open64课程-简介，概述和中间表示'>Open64课程-简介，概述和中间表示</a></li>
<li><a href='http://www.lingcc.com/2010/04/07/10721/' rel='bookmark' title='前瞻-全时优化和LLVM-1'>前瞻-全时优化和LLVM-1</a></li>
<li><a href='http://www.lingcc.com/2009/12/28/10469/' rel='bookmark' title='Open64课程-结语'>Open64课程-结语</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>因为之前的两篇博文<a title="Permanent Link: 前瞻-全时优化和LLVM-1" rel="bookmark" href="http://www.lingcc.com/2010/04/07/10721/">前瞻-全时优化和LLVM-1<abbr title="YARPP  中的 5.867000 是指当前文章和关联文章之间的匹配程度。当您以管理员的身份登录时才能查阅，游客等其他权限是不能查阅的。"></abbr></a>和<a href="http://www.lingcc.com/2010/04/29/10728/" target="_blank">前瞻-全时优化和LLVM-2</a>都是基于Chris Lattner 2004年发表在CGO的文章写的。所以需要介绍一下LLVM从2004到2010这六年的变化，LLVM的开发社区很活跃。</p>
<p>从2004年三月到2010年4月，LLVM共发布了1.2-1.9，2.0-2.7，16个版本，至少每年发布两个版本。详细的历史发布版本和release都能从<a href="http://llvm.org/releases/" target="_blank">这里</a>找到。</p>
<p><span id="more-10822"></span></p>
<ul>
<li>1.2增加了调试信息支持，</li>
<li>1.3增加精确垃圾收集功能，</li>
<li>1.4增加PowerPC JIT支持，增加通用的编译驱动器和连接器；</li>
<li>1.5增加针对Alpha,IA-64和SPARC-V8的代码生成器，新的指令选择机制；</li>
<li>1.6指令选择能从机器模型中生成，指令调度支持，支持子目标机代码生成器；</li>
<li>1.7向量支持，新的GCC4.0 C/C++前端，Objective C/C++支持，汇编内联支持；</li>
<li>1.8DWARF调试支持,循环优化改进；</li>
<li>1.9新的X86-64后端，连接时优化能和本机连接器交互；</li>
<li>2.0中间表示更新(整型完全无符号化，任意长度位的整型支持),代码生成器更新(软浮点支持),X86,ARM,PowerPC代码生成改进；</li>
<li>2.1.gcc-4.2前端，Fortran，Ada和OpenMP支持，MIPS后端支持；</li>
<li>2.2 Clang启动，CellSPU后端支持，精确垃圾收集代码重构；</li>
<li>2.3, 不再支持gcc4.0前端，vmkit启动(用LLVM实现JVM和CLI)，多返回值支持，llvmc重构，连接时优化起结构重写</li>
<li>2.4，增加优化，并缩短O0编译时间，PIC16微处理器支持</li>
<li>2.5，启动Pure,LLVM D Compiler,Roadsend PHP;XCore后端支持</li>
<li>2.6，启动compiler-rt,KLEE,machine code toolkit,开优化时调试信息行号支持，新MSP430，SystemZ和Blackin后端支持，Gold连接器插件支持</li>
<li>2.7，启动LLVM新logo，MicroBlaze后端支持。</li>
</ul>
<p>以上就是从04年到10年LLVM每次发行新版本中给出的最要新特性.可以看出，几乎和普通的编译器没有什么两样。所做的无非在增加新前端，编译更多的语言，支持新后端，可以在更多的处理器上运行。增加中间优化，调bug。</p>
<p>LLVM近几年的发展路线已经越来越像一个标准的，前端+后端+优化的编译器。运行时的优化也大部分集中在JIT上，反馈制导优化也没有涉及。</p>
<p>Chris Lattener最近几年发表的文章：</p>
<ol>
<li>“<strong><a href="http://llvm.org/pubs/2007-06-10-PLDI-DSA.html">Making  Context-sensitive  Points-to Analysis with Heap Cloning Practical For The Real World</a></strong>”<br />
<a href="http://ties.ucsd.edu/PLDI/">PLDI 2007</a>, San Diego, CA, June  2007。</li>
<li>“<a href="http://llvm.org/pubs/2005-05-04-LattnerPHDThesis.html"><strong>Macroscopic  Data Structure Analysis and Optimization</strong></a>”<br />
<em>Ph.D. Thesis</em>, <a href="http://www.cs.uiuc.edu/">Computer Science  Dept.</a>, University of Illinois at Urbana-Champaign, May 2005.</li>
<li>“<a href="http://llvm.org/pubs/2005-05-21-PLDI-PoolAlloc.html"><strong>Automatic  Pool  Allocation: Improving Performance by Controlling Data  Structure Layout in the Heap</strong></a>”<br />
<a href="http://research.ihost.com/pldi2005/">PLDI 2005</a>, Chicago, IL, June 2005.<br />
<strong>PLDI&#8217;05 Best paper award.</strong></li>
<li>“<a href="http://llvm.org/pubs/2005-06-12-MSP-PointerComp.html"><strong>Transparent   Pointer Compression for Linked Data Structures</strong></a>”<br />
MSP  2005,  Chicago, IL, June 2005.</li>
</ol>
<p>基本也没有太多触及LLVM整体架构的。</p>
<p>另外，Chris Lattener在近几年的几个邀请报告上也简明扼要的讲解了LLVM的架构。</p>
<ol>
<li>“<a href="http://llvm.org/devmtg/2009-10/">State of Clang</a>”  (shared     talk) and several other pieces of the meeting, such as the  introduction,      open discussion forum, etc.<br />
<em>LLVM Developer Meeting</em>, Cupertino, CA, Oct 2009.</li>
<li>“<a href="http://llvm.org/pubs/2008-10-04-ACAT-LLVM-Intro.html">Introduction  	to the LLVM Compiler System</a>”<br />
Plenary Talk, <em><a href="http://acat2008.cern.ch/">ACAT 2008</a>:  Advanced 	Computing and Analysis Techniques in Physics Research</em>, Erice, Sicily, Italy, November 2008.</li>
<li>“<a href="http://llvm.org/pubs/2008-05-17-BSDCan-LLVMIntro.html">LLVM  and 	Clang: Next Generation Compiler Technology</a>”<br />
<em><a href="http://www.bsdcan.org/2008/">BSDCan 2008</a></em>, Ottawa,  Canada, May 16-17, 2008.</li>
<li>“<a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/12824">The 		LLVM Compiler System</a>”<br />
<em>2007 O&#8217;Reilly Open Source Convention</em>, Portland, OR, July 2007.</li>
<li>“<a href="http://llvm.org/pubs/2007-07-25-LLVM-2.0-and-Beyond.html">LLVM  	2.0 and Beyond!</a>”<br />
<em>Google Tech Talk</em>, Mountain View, CA, July 25, 2007.</li>
<li>“<a href="http://llvm.org/devmtg/2007-05/">LLVM in OpenGL and for  Dynamic  	Languages</a>” (and several others)<br />
<em>LLVM Developer Meeting</em>, Cupertino, CA, May 2007.</li>
<li>“<a href="http://llvm.org/pubs/2007-03-12-BossaLLVMIntro.html">The  LLVM 	Compiler System</a>”<br />
<em>2007 Bossa Conference on Open Source, Mobile Internet and Multimedia</em>, 	Recife, Brazil, March 2007.</li>
<li>“<a href="http://llvm.org/pubs/2006-04-25-GelatoLLVMIntro.html">Introduction  	to the LLVM Compiler Infrastructure</a>”<br />
<em>2006 Itanium Conference and Expo</em>, San Jose, California, April  2006.</li>
</ol>
<p>对比一下Chris最近几年在不同的文献中，对LLVM的架构描述也是很有意思的。</p>
<div id="attachment_10826" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-02.jpg"><img class="size-medium wp-image-10826" title="LLVM from Chris M.S. Thesis  2002" src="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-02-300x66.jpg" alt="" width="300" height="66" /></a><p class="wp-caption-text">llvm-02 from Chris M.S. Thesis  2002</p></div>
<div id="attachment_10731" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-arch1.jpg"><img class="size-medium wp-image-10731" title="llvm-arch" src="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-arch1-300x65.jpg" alt="" width="300" height="65" /></a><p class="wp-caption-text">LLVM CGO2004</p></div>
<div id="attachment_10828" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-06-1.jpg"><img class="size-medium wp-image-10828" title="llvm-06-1" src="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-06-1-300x118.jpg" alt="" width="300" height="118" /></a><p class="wp-caption-text">LLVM 06 Link-Time Optimization</p></div>
<div id="attachment_10829" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-06-2.jpg"><img class="size-medium wp-image-10829" title="llvm-06-2" src="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-06-2-300x123.jpg" alt="" width="300" height="123" /></a><p class="wp-caption-text">LLVM 06 Code Generator</p></div>
<div id="attachment_10830" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-08.jpg"><img class="size-medium wp-image-10830" title="llvm-08" src="http://www.lingcc.com/wp-content/uploads/2010/04/llvm-08-300x118.jpg" alt="" width="300" height="118" /></a><p class="wp-caption-text">LLVM 08</p></div>
<p>LLVM始终坚持的是LLVM代码在代码生成器，解释执行之间的透明性。重点突破的一直是过程间优化。但架构却基本上摒弃了全时优化，开始走经典的静态分析路线。和GCC、Open64相比，在目的上也没有差别了。<br />
LLVM的性能方面，相比于GCC还逊色不少，和Open64就更没法比了.很遗憾，我没有找到将这三个编译器作性能对比的文章.已有的Open64的数据都是非常老的，没什么可比性。而且编译优化这个东西，差距很大。关键是看有没有人做，投入多大经历做，太老的数据没有什么对比意义。</p>
<p>但LLVM和GCC最新版的对比有， LLVM2.7和GCC 4.5的性能对比(图来自<a href="http://vmakarov.fedorapeople.org/spec/" target="_blank">http://vmakarov.fedorapeople.org/spec/</a>）：</p>
<ul>
<li>SPEC 2000 整点(-O2)</li>
</ul>
<p><a href="http://www.lingcc.com/wp-content/uploads/2010/04/GLI2Score32.png"><img class="alignnone size-medium wp-image-10859" title="GLI2Score32" src="http://www.lingcc.com/wp-content/uploads/2010/04/GLI2Score32-300x154.png" alt="" width="300" height="154" /></a></p>
<ul>
<li>SPEC2000浮点(-O2）</li>
</ul>
<p><a href="http://www.lingcc.com/wp-content/uploads/2010/04/GLF2Score32.png"><img class="alignnone size-medium wp-image-10861" title="GLF2Score32" src="http://www.lingcc.com/wp-content/uploads/2010/04/GLF2Score32-300x154.png" alt="" width="300" height="154" /></a></p>
<ul>
<li>SPEC 2000 整点（-O3）</li>
</ul>
<p><a href="http://www.lingcc.com/wp-content/uploads/2010/04/GLI3Score32.png"><img class="alignnone size-medium wp-image-10860" title="GLI3Score32" src="http://www.lingcc.com/wp-content/uploads/2010/04/GLI3Score32-300x154.png" alt="" width="300" height="154" /></a></p>
<ul>
<li>SPEC 2000 浮点(-O3)</li>
</ul>
<p><a href="http://www.lingcc.com/wp-content/uploads/2010/04/GLF3Score32.png"><img class="alignnone size-medium wp-image-10862" title="GLF3Score32" src="http://www.lingcc.com/wp-content/uploads/2010/04/GLF3Score32-300x154.png" alt="" width="300" height="154" /></a></p>
<p>O2和O3优化下，GCC的性能平均都比LLVM 2.7要好大概2%-3%左右。浮点GCC的优势比整点要大.上面数据仅供参考：）</p>
<p>此外上面的网页中也对编译时间做了对比。LLVM比GCC要快30%左右。</p>
<p>以上数据测试平台：2.93Ghz Intel Core I7 with 8GB memory under Fedora Core10. X86 32位系统.</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F20%2F11361%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM居然开始做广告了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F03%2F10884%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">安装LLVM2.7 step by step</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F28%2F10807%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">LLVM 2.7 发布</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F06%2F15%2F10978%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64业内外人士对LLVM和Open64的观点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F15%2F11963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F30%2F10822%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Open64、LLVM、GCC源代码行数对比</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/04/29/10728/' rel='bookmark' title='前瞻-全时优化和LLVM-2'>前瞻-全时优化和LLVM-2</a></li>
<li><a href='http://www.lingcc.com/2010/04/14/10736/' rel='bookmark' title='探秘CPU性能测试：Spec CPU2000之整点篇'>探秘CPU性能测试：Spec CPU2000之整点篇</a></li>
<li><a href='http://www.lingcc.com/2009/11/18/10000/' rel='bookmark' title='Open64课程-简介，概述和中间表示'>Open64课程-简介，概述和中间表示</a></li>
<li><a href='http://www.lingcc.com/2010/04/07/10721/' rel='bookmark' title='前瞻-全时优化和LLVM-1'>前瞻-全时优化和LLVM-1</a></li>
<li><a href='http://www.lingcc.com/2009/12/28/10469/' rel='bookmark' title='Open64课程-结语'>Open64课程-结语</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/04/30/10822/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>走进顶尖大学的计算机科学</title>
		<link>http://www.lingcc.com/2010/04/23/10772/</link>
		<comments>http://www.lingcc.com/2010/04/23/10772/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 02:55:07 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[编译技术]]></category>
		<category><![CDATA[american university]]></category>
		<category><![CDATA[berkely]]></category>
		<category><![CDATA[cmu]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[MIPS]]></category>
		<category><![CDATA[mit]]></category>
		<category><![CDATA[SSA]]></category>
		<category><![CDATA[stanford]]></category>
		<category><![CDATA[top university]]></category>
		<category><![CDATA[USE]]></category>
		<category><![CDATA[并行]]></category>
		<category><![CDATA[并行计算]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[科学计算]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10772</guid>
		<description><![CDATA[2010年美国高校计算机系排行榜出炉&#8211;《U.S. News》公布了新一期美国大学计算机系实力排名。前四：卡内基-梅隆大学(CMU)、麻省理工学院(MIT)、斯坦福大学(Stanford U)和加州大学伯克利分校(UC Berkely). 卡内基-梅隆大学(CMU) CMU的实力排序：编程语言、人工智能、计算机系统、计算理论。李开复、沈向洋、洪小文、黄学东、徐峰雄这些微软牛人清一色来自CMU。CMU的CS在算法、计算机网络、分布式系统、并行处理、程序语言、机器人、自然语言处理和软件工程等领域都有不俗的表现。包括Computer Science Department、Human-Computer Interaction Inst(人机交互相关)、Institute for Software Research(软件工程相关研究)、Lane Ctr for Computational Biology(生物计算相关研究)、Language Technologies Institute(自然语言处理)、Machine Learning Department(统计机器学习)、Robotics Institute、Entertainment Technology Cente(计算机娱乐相关技术，貌似很有意思哈)。CMU的编译研究：Programming Language Research(貌似比较老的网页) 麻省理工学院(MIT) MIT的实力排序：人工智能、计算理论、计算机系统、编程语言。GNU，WWW标准组织，One laptop per Child就最早发源自MIT。MIT的牛人们为计算机科学方面的控制论、人工智能、计算机语言、机器学习、机器人、公钥加密上都起到了奠基作用。别忘了《算法导论》就来自MIT。MIT在CS方向的实验室最大的就是CSAIL了：Computer Science and Artificial Intelligence Laboratory (CSAIL，有50多个组，研究方向有三，人工智能，系统结构和计算机理论)。其中系统结构方面包括：计算机结构、安全、数据库、网络、并行、程序分析、编译等等方向。 斯坦福大学(Stanford U) 斯坦福的实力排序：编程语言，人工智能，计算机系统，计算理论。相对于前四名的其他大学，斯坦福的这几个方面排名相对靠后，可谁让人家身在硅谷，又出了很多大公司呢。斯坦福的CS研究方向:人工只能，机器人，计算理论，科学计算，计算机系统等。(抱歉搜到的资料太少).不过大名鼎鼎的《计算机系统结构&#8211;量化研究方法》的第一作者就是斯坦福大学的校长。MIPS也最早起源于斯坦福，还有曾经的Sun。 加州大学伯克利分校(UC Berkely) UC Berkely的实力排序：计算机系统、编程语言、计算理论、人工智能。研究方向都差不多，包括人工智能，计算机体系结构与工程，图形学，人机交互，计算机操作系统和网络，编程系统，科学计算，计算机安全和计算理论。UC Berkely在CS上的实验室有：Center for Hybrid and Embedded Software Systems (CHESS，异构平台上的实时软件技术研究) 、Center for Intelligent <a href='http://www.lingcc.com/2010/04/23/10772/'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="YY一下量子计算机的编译器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F12%2F23%2F11431%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/29/7110270.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">YY一下量子计算机的编译器</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="zz《人物》:计算机世界第一人 – 艾兰・图灵" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9964%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115589.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">zz《人物》:计算机世界第一人 – 艾兰・图灵</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="说说高通量计算机" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F21%2F11375%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">说说高通量计算机</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="走进Debian和Gentoo中的系统初始化过程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="体系结构这五年--《计算机体系结构-量化研究方法》第5版的新变化" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F01%2F11927%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">体系结构这五年--《计算机体系结构-量化研究方法》第5版的新变化</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/05/04/10878/' rel='bookmark' title='前瞻-主流处理器中的数据并行支持(SIMD)'>前瞻-主流处理器中的数据并行支持(SIMD)</a></li>
<li><a href='http://www.lingcc.com/2010/01/09/10623/' rel='bookmark' title='反汇编器和汇编器'>反汇编器和汇编器</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2010/02/03/10675/' rel='bookmark' title='计算机系统结构方向的顶尖会议'>计算机系统结构方向的顶尖会议</a></li>
<li><a href='http://www.lingcc.com/2010/04/14/10736/' rel='bookmark' title='探秘CPU性能测试：Spec CPU2000之整点篇'>探秘CPU性能测试：Spec CPU2000之整点篇</a></li>
<li><a href='http://www.lingcc.com/2009/12/22/10404/' rel='bookmark' title='有写编译器的冲动？这些资料很重要'>有写编译器的冲动？这些资料很重要</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tektalk.org/2010/04/20/2010%E7%BE%8E%E5%9B%BD%E9%AB%98%E6%A0%A1%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%B3%BB%E6%8E%92%E8%A1%8C%E6%A6%9C%E5%87%BA%E7%82%89/" target="_blank">2010年美国高校计算机系排行榜出炉</a>&#8211;《U.S. News》公布了新一期美国大学计算机系实力排名。前四：卡内基-梅隆大学(CMU)、麻省理工学院(MIT)、斯坦福大学(Stanford U)和加州大学伯克利分校(UC Berkely).</p>
<p><a title="前四名具体排名" href="http://www.lingcc.com/wp-content/uploads/2010/04/20100421-002317-pic1.png"></a></p>
<p><div id="attachment_10775" class="wp-caption alignnone" style="width: 310px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/20100421-002317-pic11.png"><img class="size-medium wp-image-10775" title="前四名具体排名" src="http://www.lingcc.com/wp-content/uploads/2010/04/20100421-002317-pic11-300x87.png" alt="" width="300" height="87" /></a><p class="wp-caption-text">前四名具体排名</p></div><br />
<span id="more-10772"></span><br />
<div id="attachment_10774" class="wp-caption alignnone" style="width: 257px"><a href="http://www.lingcc.com/wp-content/uploads/2010/04/20100421-003207-pic1.png"><img class="size-medium wp-image-10774" title="前20名" src="http://www.lingcc.com/wp-content/uploads/2010/04/20100421-003207-pic1-247x300.png" alt="前20名" width="247" height="300" /></a><p class="wp-caption-text">前20名</p></div></p>
<h4>卡内基-梅隆大学(CMU)</h4>
<p>CMU的实力排序：编程语言、人工智能、计算机系统、计算理论。李开复、沈向洋、洪小文、黄学东、徐峰雄这些微软牛人清一色来自CMU。CMU的CS在算法、计算机网络、分布式系统、并行处理、程序语言、机器人、自然语言处理和软件工程等领域都有不俗的表现。包括<a href="http://www.csd.cs.cmu.edu/" target="_blank">Computer  Science Department</a>、<a href="http://www.hcii.cmu.edu/" target="_blank">Human-Computer  Interaction Inst(人机交互相关)</a>、<a href="http://www.isri.cmu.edu/" target="_blank">Institute  for Software Research(软件工程相关研究</a>)、<a href="http://lane.compbio.cmu.edu/" target="_blank">Lane  Ctr for Computational Biology(生物计算相关研究)</a>、<a href="http://www.lti.cs.cmu.edu/" target="_blank">Language  Technologies Institute(自然语言处理)</a>、<a href="http://www.ml.cmu.edu/" target="_blank">Machine  Learning Department(统计机器学习)</a>、Robotics  Institute、<a href="http://www.etc.cmu.edu" target="_blank">Entertainment  Technology Cente(计算机娱乐相关技术，貌似很有意思哈)</a>。CMU的编译研究：<a href="http://www.cs.cmu.edu/~mleone/language-research.html" target="_blank">Programming Language Research</a>(貌似比较老的网页)</p>
<h4>麻省理工学院(MIT)</h4>
<p>MIT的实力排序：人工智能、计算理论、计算机系统、编程语言。GNU，WWW标准组织，One laptop per Child就最早发源自MIT。MIT的牛人们为计算机科学方面的控制论、人工智能、计算机语言、机器学习、机器人、公钥加密上都起到了奠基作用。别忘了《算法导论》就来自MIT。MIT在CS方向的实验室最大的就是CSAIL了：<a href="http://www.csail.mit.edu/">Computer Science  and Artificial Intelligence Laboratory</a> (CSAIL，有50多个组，研究方向有三，人工智能，系统结构和计算机理论)。其中系统结构方面包括：计算机结构、安全、数据库、网络、并行、程序分析、编译等等方向。</p>
<h4>斯坦福大学(Stanford U)</h4>
<p>斯坦福的实力排序：编程语言，人工智能，计算机系统，计算理论。相对于前四名的其他大学，斯坦福的这几个方面排名相对靠后，可谁让人家身在硅谷，又出了很多大公司呢。斯坦福的CS研究方向:人工只能，机器人，计算理论，科学计算，计算机系统等。(抱歉搜到的资料太少).不过大名鼎鼎的《计算机系统结构&#8211;量化研究方法》的第一作者就是斯坦福大学的校长。MIPS也最早起源于斯坦福，还有曾经的Sun。</p>
<h4>加州大学伯克利分校(UC Berkely)</h4>
<p>UC Berkely的实力排序：计算机系统、编程语言、计算理论、人工智能。研究方向都差不多，包括人工智能，计算机体系结构与工程，图形学，人机交互，计算机操作系统和网络，编程系统，科学计算，计算机安全和计算理论。UC Berkely在CS上的实验室有：<a href="http://chess.eecs.berkeley.edu/">Center for Hybrid and Embedded  Software Systems (CHESS，异构平台上的实时软件技术研究) </a> 、<a href="http://www.eecs.berkeley.edu/CIS/">Center for Intelligent  Systems (CIS，研究计算机交互，人工智能，图形学等)</a>、<a href="http://parlab.eecs.berkeley.edu/" target="_blank">Parallel Computing Laboratory (ParLab，并行计算研究，本博翻译的并行计算前景系列文章来自此实验室。)</a>、<a href="http://www-video.eecs.berkeley.edu/">Video and Image Processing  Lab (VIP Lab，视频图像处理)</a>、<a href="http://webs.cs.berkeley.edu/">Wireless Embedded Systems (WEBS，物联网，无线传感网)</a>。</p>
<h4>总结：</h4>
<p>计算机牛，也就是那几个方向牛：编程语言，计算理论，计算机系统和人工智能。Google了一圈，大家都这么说。都说的挺玄乎，可苦了我这种努力想对比几大高校的人。对比来对比去，也没对比出什么好东西。不过好歹，咱也神游了一把名校，长了见识。尤其是MIT，真是牛！</p>
<p>参考：</p>
<p>http://www.cs.cmu.edu/</p>
<p>http://en.wikipedia.org/wiki/Carnegie_Mellon_School_of_Computer_Science</p>
<p>http://www.eecs.mit.edu/</p>
<p>http://en.wikipedia.org/wiki/Massachusetts_Institute_of_Technology</p>
<p>http://www.csail.mit.edu/</p>
<p>http://www-cs.stanford.edu/</p>
<p>http://en.wikipedia.org/wiki/MIPS_architecture</p>
<p>http://www.cs.berkeley.edu/</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="YY一下量子计算机的编译器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F12%2F23%2F11431%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/29/7110270.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">YY一下量子计算机的编译器</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="zz《人物》:计算机世界第一人 – 艾兰・图灵" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9964%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/30/7115589.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">zz《人物》:计算机世界第一人 – 艾兰・图灵</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="说说高通量计算机" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F10%2F21%2F11375%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">说说高通量计算机</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="走进Debian和Gentoo中的系统初始化过程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="体系结构这五年--《计算机体系结构-量化研究方法》第5版的新变化" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2012%2F01%2F01%2F11927%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F23%2F10772%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">体系结构这五年--《计算机体系结构-量化研究方法》第5版的新变化</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/05/04/10878/' rel='bookmark' title='前瞻-主流处理器中的数据并行支持(SIMD)'>前瞻-主流处理器中的数据并行支持(SIMD)</a></li>
<li><a href='http://www.lingcc.com/2010/01/09/10623/' rel='bookmark' title='反汇编器和汇编器'>反汇编器和汇编器</a></li>
<li><a href='http://www.lingcc.com/2010/04/30/10822/' rel='bookmark' title='前瞻-LLVM大事记(2004-2010)'>前瞻-LLVM大事记(2004-2010)</a></li>
<li><a href='http://www.lingcc.com/2010/02/03/10675/' rel='bookmark' title='计算机系统结构方向的顶尖会议'>计算机系统结构方向的顶尖会议</a></li>
<li><a href='http://www.lingcc.com/2010/04/14/10736/' rel='bookmark' title='探秘CPU性能测试：Spec CPU2000之整点篇'>探秘CPU性能测试：Spec CPU2000之整点篇</a></li>
<li><a href='http://www.lingcc.com/2009/12/22/10404/' rel='bookmark' title='有写编译器的冲动？这些资料很重要'>有写编译器的冲动？这些资料很重要</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/04/23/10772/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gentoo上安装Texlive2009</title>
		<link>http://www.lingcc.com/2010/04/09/10732/</link>
		<comments>http://www.lingcc.com/2010/04/09/10732/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 14:33:38 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[编译技术]]></category>
		<category><![CDATA[ctex]]></category>
		<category><![CDATA[ebuild]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[latex 中文]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[texlive]]></category>
		<category><![CDATA[USE]]></category>
		<category><![CDATA[x86]]></category>
		<category><![CDATA[写论文]]></category>
		<category><![CDATA[字体]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10732</guid>
		<description><![CDATA[最近想折腾用texlive写点东西，而且要支持中文。就冲着texlive-2009了。大学毕业论文就是用latex写的，不过那是在Windoews下，用CTEX包，很是方便，Gentoo就有点不一样了。虽然texlive有自己的iso镜像，有自己的安装工具和包管理工具，但Gentoo还是将它拆分成了很多的packge来装。这样也好，比较灵活。 下面就开始吧。 首先是keywords和use，因为现在2009还不稳定，而我用的是x86就要增加一堆的keyword，如下： app-text/texlive ~x86 app-text/texlive-core ~x86 dev-texlive/texlive-documentation-english ~x86 dev-texlive/texlive-documentation-base ~x86 dev-texlive/texlive-basic ~x86 dev-texlive/texlive-bibtexextra ~x86 dev-texlive/texlive-context ~x86 dev-texlive/texlive-xetex ~x86 dev-texlive/texlive-genericrecommended ~x86 dev-texlive/texlive-genericextra ~x86 dev-texlive/texlive-htmlxml ~x86 media-libs/silgraphite ~x86 app-text/teckit ~x86 dev-texlive/texlive-latexrecommended ~x86 dev-texlive/texlive-latex ~x86 app-text/ptex ~x86 dev-texlive/texlive-texinfo ~x86 dev-texlive/texlive-formatsextra ~x86 dev-texlive/texlive-metapost ~x86 dev-texlive/texlive-mathextra ~x86 dev-texlive/texlive-fontsextra ~x86 dev-texlive/texlive-langcjk ~x86 dev-texlive/texlive-fontsrecommended ~x86 dev-texlive/texlive-fontutils ~x86 app-text/xdvik ~x86 dev-texlive/texlive-music ~x86 <a href='http://www.lingcc.com/2010/04/09/10732/'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F21%2F10761%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo安装texlive2009–字体</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo 沙盘简介</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/04/21/10761/' rel='bookmark' title='Gentoo安装texlive2009&#8211;字体'>Gentoo安装texlive2009&#8211;字体</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2010/04/16/10746/' rel='bookmark' title='来仔细看看GCC 4.5.0'>来仔细看看GCC 4.5.0</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>最近想折腾用texlive写点东西，而且要支持中文。就冲着texlive-2009了。大学毕业论文就是用latex写的，不过那是在Windoews下，用CTEX包，很是方便，Gentoo就有点不一样了。虽然texlive有自己的iso镜像，有自己的安装工具和包管理工具，但Gentoo还是将它拆分成了很多的packge来装。这样也好，比较灵活。</p>
<p>下面就开始吧。</p>
<p>首先是keywords和use，因为现在2009还不稳定，而我用的是x86就要增加一堆的keyword，如下：</p>
<div id="_mcePaste">app-text/texlive ~x86</div>
<div id="_mcePaste">app-text/texlive-core ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-documentation-english ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-documentation-base ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-basic ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-bibtexextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-context ~x86<span id="more-10732"></span></div>
<div id="_mcePaste">dev-texlive/texlive-xetex ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-genericrecommended ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-genericextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-htmlxml ~x86</div>
<div id="_mcePaste">media-libs/silgraphite ~x86</div>
<div id="_mcePaste">app-text/teckit ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-latexrecommended ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-latex ~x86</div>
<div id="_mcePaste">app-text/ptex ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-texinfo ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-formatsextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-metapost ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-mathextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-fontsextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-langcjk ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-fontsrecommended ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-fontutils ~x86</div>
<div id="_mcePaste">app-text/xdvik ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-music ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-omega ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-games ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-publishers ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-humanities ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-science ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-latexextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-latexextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-langcyrillic ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-plainextra ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-documentation-chinese ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-pstricks ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-pictures ~x86</div>
<div id="_mcePaste">dev-texlive/texlive-luatex ~x86</div>
<div id="_mcePaste">dev-lisp/clisp ~x86</div>
<div>至于use，别忘了cjk就行。</div>
<div>然后就能emerge -av  texlive 开始安装了。安装过程中出了几个小问题，有的可能解决方法比较笨，呵呵。如下：</div>
<div>
<ul>
<li>(&#8216;ebuild&#8217;, &#8216;/&#8217;,  &#8216;app-text/texlive-core-2009-r1&#8242;, &#8216;merge&#8217;) pulled in by app-text/texlive-core required by (&#8216;installed&#8217;, &#8216;/&#8217;,  &#8216;virtual/tex-base-0&#8242;, &#8216;nomerge&#8217;) (&#8216;ebuild&#8217;, &#8216;/&#8217;,  &#8216;app-text/ptex-3.1.10_p20090610-r1&#8242;, &#8216;merge&#8217;) pulled in by app-text/ptex required by (&#8216;installed&#8217;, &#8216;/&#8217;, &#8216;virtual/latex-base-1.0&#8242;,  &#8216;nomerge&#8217;)  just emerge -c  all texlive package /卸载所有texlive相关的包</li>
<li> ptex and   dev-texlive/texlive-fontutils Detected file collision(s)   /usr/bin/epstopdf， emerge -C  app-text/ptex</li>
<li>xindy-2.3 build fail. <a class="externalLink" title="External link to http://bugs.gentoo.org/show_bug.cgi?id=281271" href="http://bugs.gentoo.org/show_bug.cgi?id=281271" target="_blank">http://bugs.gentoo.org/show_bug.cgi?id=281271</a>.  add the patch. make pass</li>
</ul>
</div>
<p>如果一切顺利的话，接下来就能用了。别忘了看看自己系统支持的中文字体，使用这个命令<br />
$ fc-list :lang=zh-cn<br />
本博用来测试各个字体的test-fonts.tex文件，其他问题日后遇到了再详谈，enjoy it :)<br />
<code><br />
\documentclass[12pt,a4paper]{article}<br />
\usepackage{fontspec}<br />
\setromanfont{AR PL UMing CN}<br />
\begin{document}<br />
{\setromanfont{WenQuanYi Micro Hei Mono}<br />
不需要安装字体，文泉驿等宽微米黑,文泉驛等寬微米黑,WenQuanYi Micro Hei Mono  \\}<br />
{\setromanfont{WenQuanYi Zen Hei}<br />
不需要安装字体，文泉驿 正黑 \\}<br />
{\setromanfont{WenQuanYi Zen Hei Mono}<br />
不需要安装字体，文泉驿 正黑 Mono \\}<br />
{\setromanfont{WenQuanYi Zen Hei Sharp}<br />
不需要安装字体，文泉驿 正黑 Sharp \\}<br />
{\setromanfont{AR PL UMing TW}<br />
不需要安装字体, AR PL UMing TW \\}<br />
{\setromanfont{AR PL UMing TW MBE}<br />
不需要安装字体, UMing TW MBE \\}<br />
{\setromanfont{AR PL UMing HK}<br />
不需要安装字体, AR PL UMing HK \\}<br />
{\setromanfont{AR PL UMing CN}<br />
不需要安装字体, UMing CN\\}<br />
{\setromanfont{AR PL UKai CN}<br />
不需要安装字体, UKai CN \\}<br />
{\setromanfont{AR PL UKai HK}<br />
不需要安装字体, UKai HK \\}<br />
{\setromanfont{AR PL UKai TW}<br />
不需要安装字体, UKai TW \\}<br />
{\setromanfont{AR PL UKai TW MBE}<br />
不需要安装字体, UKai TW MBE \\}<br />
{\setromanfont{AR PL KaitiM GB}<br />
不需要安装字体, AR PL KaitiM GB \\}<br />
\end{document}</code></p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F21%2F10761%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo安装texlive2009–字体</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo 沙盘简介</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/04/21/10761/' rel='bookmark' title='Gentoo安装texlive2009&#8211;字体'>Gentoo安装texlive2009&#8211;字体</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2010/04/16/10746/' rel='bookmark' title='来仔细看看GCC 4.5.0'>来仔细看看GCC 4.5.0</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/04/09/10732/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNU工具链学习笔记</title>
		<link>http://www.lingcc.com/2010/03/08/10709/</link>
		<comments>http://www.lingcc.com/2010/03/08/10709/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 12:43:40 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[GCC]]></category>
		<category><![CDATA[编译技术]]></category>
		<category><![CDATA[编译理论实践和应用]]></category>
		<category><![CDATA[elf]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[objdump]]></category>
		<category><![CDATA[工具链]]></category>
		<category><![CDATA[链接]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10709</guid>
		<description><![CDATA[1..so为动态链接库，.a为静态连接库。他们在Linux下按照ELF格式存储。ELF有四种文件类型。可重定位文件(Relocatable file,*.o，*.a),包含代码和数据，可用来连接成可执行文件或共享目标文件;可执行文件(Executable File),ELF可执行文件；共享目标文件(Shared Object File,*.so),包含代码和数据；核心转储文件(Core Dump File),进程意外终止时，系统将该进程的地址空间内容和其他信息保存到该文件中。 file命令可以查看。 2，Objdump程序，来自binutils，可以查看Object file内的结构。-h：打印各个段基本信息；-s所有段内容以16进制打印;-d:将所有包含指令的段反汇编。 3, ar -t libc.a；查看libc.a压缩了那些.o文件。 4, collect2 是ld连接器的包装，它调用ld链接目标文件，并对结果做处理，包括收集所有与程序初始化相关的信息并构造初始化结构。 5，readelf：查看ELF文件。 -s:打印符号信息； 6, size *.o : 用于查看ELF文件代码段，数据段和BSS(Block Started by Symbol,为未初始化的全局变量和局部静态变量预留位置)段的长度。 7, nm：查看目标文件的符号信息。 8，C运行时库GlibC,由两部分组成，头文件和二进制库，前者多在/usr/include下，后者主要是C语言的标准库，有静态(/usr/lib/libc.a)和动态(/lib/libc.so.6)两个.另外还有/usr/lib/crt1.o(含程序入口函数_start,负责初始化libc和调用main),/usr/lib/crti.o(负责main函数执行前全局和静态对象的构造)和/usr/lib/crtn.o(负责main函数执行后，全局和静态对象的析构)三个辅助程序运行的库。链接器会收集所有输入目标文件中对全局和静态对象的构造/析构操作，合并到输出文件的构造和析构操作中。 9.GCC中的几个库文件，这些库文件都在GCC的安装目录下，Gentoo系统中的目录为/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/。crtbeginT.o和crtend.o,负责C++全局构造和析构的目标文件，因为glibc只是C语言运行库，GCC实现C++语言，所以C++中构造和析构需要glibc中的C语言构造/析构和GCC中相应的构造/析构。libgcc.a用来对付GCC在多平台上运行时的差异问题；libgcc_eh.a包含了支持C++异常处理的平台相关函数。libgcc_s.so是libgcc.a的动态链接版本。 10.ldd 打印共享库依赖关系。 以上内容摘抄自《程序员的自我修养 &#8211;链接，装载与库》 相关文章： GCC初窥 GCC中的pie和fpie选项 Gentoo中的交叉编译利器&#8211;crossdev zz Linux下的段错误的原因及调试 使用crossdev安装龙芯的O32 gnu交叉工具链 用crossdev装龙芯的n32 gnu交叉工具链<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F08%2F10609%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GCC中的pie和fpie选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F08%2F27%2F9982%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">zz Linux下的段错误的原因及调试</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2009%2F11%2F20%2F10065%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gcc和Open64中的-fPIC选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">认识静态链接库</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/01/08/10609/' rel='bookmark' title='GCC中的pie和fpie选项'>GCC中的pie和fpie选项</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>1..so为动态链接库，.a为静态连接库。他们在Linux下按照ELF格式存储。ELF有四种文件类型。可重定位文件(Relocatable file,*.o，*.a),包含代码和数据，可用来连接成可执行文件或共享目标文件;可执行文件(Executable File),ELF可执行文件；共享目标文件(Shared Object File,*.so),包含代码和数据；核心转储文件(Core Dump File),进程意外终止时，系统将该进程的地址空间内容和其他信息保存到该文件中。<br />
file命令可以查看。<br />
2，Objdump程序，来自binutils，可以查看Object file内的结构。-h：打印各个段基本信息；-s所有段内容以16进制打印;-d:将所有包含指令的段反汇编。<br />
3, ar -t libc.a；查看libc.a压缩了那些.o文件。<br />
4, collect2 是ld连接器的包装，它调用ld链接目标文件，并对结果做处理，包括收集所有与程序初始化相关的信息并构造初始化结构。<br />
5，readelf：查看ELF文件。 -s:打印符号信息；<br />
<span id="more-10709"></span><br />
6, size *.o : 用于查看ELF文件代码段，数据段和BSS(Block Started by Symbol,为未初始化的全局变量和局部静态变量预留位置)段的长度。<br />
7, nm：查看目标文件的符号信息。<br />
8，C运行时库GlibC,由两部分组成，头文件和二进制库，前者多在/usr/include下，后者主要是C语言的标准库，有静态(/usr/lib/libc.a)和动态(/lib/libc.so.6)两个.另外还有/usr/lib/crt1.o(含程序入口函数_start,负责初始化libc和调用main),/usr/lib/crti.o(负责main函数执行前全局和静态对象的构造)和/usr/lib/crtn.o(负责main函数执行后，全局和静态对象的析构)三个辅助程序运行的库。链接器会收集所有输入目标文件中对全局和静态对象的构造/析构操作，合并到输出文件的构造和析构操作中。<br />
9.GCC中的几个库文件，这些库文件都在GCC的安装目录下，Gentoo系统中的目录为/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/。crtbeginT.o和crtend.o,负责C++全局构造和析构的目标文件，因为glibc只是C语言运行库，GCC实现C++语言，所以C++中构造和析构需要glibc中的C语言构造/析构和GCC中相应的构造/析构。libgcc.a用来对付GCC在多平台上运行时的差异问题；libgcc_eh.a包含了支持C++异常处理的平台相关函数。libgcc_s.so是libgcc.a的动态链接版本。<br />
10.ldd 打印共享库依赖关系。</p>
<p>以上内容摘抄自《程序员的自我修养 &#8211;链接，装载与库》</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F08%2F10609%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">GCC中的pie和fpie选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F08%2F27%2F9982%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">zz Linux下的段错误的原因及调试</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2009%2F11%2F20%2F10065%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gcc和Open64中的-fPIC选项</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F25%2F10951%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">认识静态链接库</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F08%2F10709%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2009/12/29/10503/' rel='bookmark' title='GCC初窥'>GCC初窥</a></li>
<li><a href='http://www.lingcc.com/2010/01/08/10609/' rel='bookmark' title='GCC中的pie和fpie选项'>GCC中的pie和fpie选项</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/08/27/9982/' rel='bookmark' title='zz Linux下的段错误的原因及调试'>zz Linux下的段错误的原因及调试</a></li>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/03/08/10709/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gentoo 沙盘简介</title>
		<link>http://www.lingcc.com/2010/03/07/10707/</link>
		<comments>http://www.lingcc.com/2010/03/07/10707/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 11:06:11 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[Linux系统]]></category>
		<category><![CDATA[ebuild]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[操作系统 Operating system]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10707</guid>
		<description><![CDATA[emerge一个软件包时Portage的工作方式: 1,Portage下载源码tar包和补丁(如果需要的话) 2,Portage解压缩tar包到指定位置,所有的编译将在该目录展开,Portage默认使用/var/tmp/portage/packagename/work 3,解压和打补丁(如果需要的话)后(ebuild中的src_unpack()函数),Portage开始编译,一般情况下在特定目录(ebuild使用${WORKDIR}变量指定目录)下执行configure和make命令. 4,编译完成后,portage将所有指定目录下的文件合并到正在运行的系统中.(通常为/,但通过合并时设置ROOT=”/路径”可以修改),为了避免非法或不正确的ebuild对整个文件系统造成不可逆的破坏,我们需要严格限制文件系统的哪个区域允许portage在解压和编译时修改,这就是沙盘工作的路径,默认时,沙盘启动,并限定ebuild(和它执行过程中的明林)都在指定的区域内写磁盘.若ebuild越过沙盘保护的环境,试图在外部区域写磁盘,就构成了沙盘越界. 沙盘的用途: 沙盘是portage用来协助调试ebuild的机制.主要目的是提供一个安全的受保护的环境系统来运行功能未知的程序.实质上,它提供了一个可以用于编译源码包但不会干扰操作系统其他部分运行的环境. 在ebuild的src_unpack,src_compile,src_test和src_install阶段,ebuild.sh都在沙盘内操作. http://bugday.gentoo.org/sandbox.html http://devmanual.gentoo.org/general-concepts/sandbox/index.html 相关文章： 使用crossdev安装龙芯的O32 gnu交叉工具链 Ebuild and emerge gentoo的相关配置-make.conf Gentoo中的交叉编译利器&#8211;crossdev gentoo如何处理被屏蔽(masked)的包 by 杨珂 转自linuxsir 用crossdev装龙芯的n32 gnu交叉工具链<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo上安装Texlive2009</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2008/02/27/9904/' rel='bookmark' title='gentoo的相关配置-make.conf'>gentoo的相关配置-make.conf</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>emerge一个软件包时Portage的工作方式:<br />
1,Portage下载源码tar包和补丁(如果需要的话)<br />
2,Portage解压缩tar包到指定位置,所有的编译将在该目录展开,Portage默认使用/var/tmp/portage/packagename/work<br />
3,解压和打补丁(如果需要的话)后(ebuild中的src_unpack()函数),Portage开始编译,一般情况下在特定目录(ebuild使用${WORKDIR}变量指定目录)下执行configure和make命令.<br />
4,编译完成后,portage将所有指定目录下的文件合并到正在运行的系统中.(通常为/,但通过合并时设置ROOT=”/路径”可以修改),为了避免非法或不正确的ebuild对整个文件系统造成不可逆的破坏,我们需要严格限制文件系统的哪个区域允许portage在解压和编译时修改,这就是沙盘工作的路径,默认时,沙盘启动,并限定ebuild(和它执行过程中的明林)都在指定的区域内写磁盘.若ebuild越过沙盘保护的环境,试图在外部区域写磁盘,就构成了沙盘越界.<br />
<span id="more-10707"></span><br />
沙盘的用途:<br />
沙盘是portage用来协助调试ebuild的机制.主要目的是提供一个安全的受保护的环境系统来运行功能未知的程序.实质上,它提供了一个可以用于编译源码包但不会干扰操作系统其他部分运行的环境.</p>
<p>在ebuild的src_unpack,src_compile,src_test和src_install阶段,ebuild.sh都在沙盘内操作.</p>
<p>http://bugday.gentoo.org/sandbox.html</p>
<p>http://devmanual.gentoo.org/general-concepts/sandbox/index.html</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo上安装Texlive2009</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2008/02/27/9904/' rel='bookmark' title='gentoo的相关配置-make.conf'>gentoo的相关配置-make.conf</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/03/07/10707/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

