ºìÁªLinuxÃÅ»§
Linux°ïÖú

gccµ½µ×ÐèÒª¶àÉÙÎļþ

·¢²¼Ê±¼ä:2008-04-12 12:59:37À´Ô´:ºìÁª×÷Õß:features
ÏëÔÚСϵͳÉÏ·ÅÒ»Ì׿ÉÒÔ±àÒë»ù±¾C³ÌÐòµÄgccϵͳ£¬ÕâÑù¿ÉÒÔÔÚ±ØÒªµÄÇé¿öÏÂÓÃ×îСϵͳҲ¿ÉÒÔ±àÒëһЩС³ÌÐò£¬ÓÚÊÇ×öÁËÈçÏµĹ¤×÷£º

¸´ÖÆÁËÈçϵÄÎļþ
/usr/bin/gcc -- gccµÄÖ´ÐгÌÐò

/usr/lib/gcc/i386-pc-linux-gnu/gcc_version/* -- gcc¶ÔÓ¦±àÒëCÓïÑԵıàÒëÆ÷£¬ÀýÈçcc1£¬cc1plus£¬collect2µÈ£¬»¹ÓÐһЩ.oÎļþ

/usr/lib/libgcc_s.so£¬Õâ¸öµÄ×÷Óò»ÉõÇå³þ£¬ËƺõÊÇÓÃÓÚ±àÒëºóÊä³öÓõģ¬ÔÚlink½×¶Î·¢»Ó×÷ÓÃ

/usr/include/ ÏÂÃæµÄ²¿·ÖÍ·Îļþ£¬Õâ¸ö¿ÉÒÔÓÃrpm -ql glibc-devel | grep "\.h" ÕÒ³öÀ´£¬Õâ¸ö´ó¸ÅÓÐ2.4M×óÓÒ£¬¹À¼Æ»¹ÊÇÓÐÈßÓàµÄ£¬ÒòΪglibc-2.3.5Ô´ÂëϵÄincludeĿ¼ֻÓÐ8xxKBs

/usr/bin/ldºÍ/usr/bin/as£¬»ã±àµÄ±àÒëÆ÷ºÍÁ´½ÓÆ÷£¬ÁíÍ⻹ÓÐÖ§³ÖÆäÔËÐеÄ.soÎļþ£¬ÕâÁ½¸öÊôÓÚbinutils°ü£¬¶ø²»ÊÇgcc°üµÄÄÚÈÝ

/usr/lib/crt?.o£¬°üÀ¨crt1.o£¬crti.o£¬crtn.o£¬Õâ¸öÊǶÔÓ¦glibc¿âµÄÁ´½ÓÄ¿±ê´úÂ룬Ҳ²»ÊôÓÚgcc°üµÄÄÚÈÝ

/usr/lib/libc.soÒÔ¼°/usr/lib/libc_nonshared.a£¬Ç°ÕßÖ»ÊÇÒ»¸ö´¿Îı¾µÄÅäÖÃÃèÊöÎļþ£¬ºóÕßÊÇһЩֻÄÜÓ²Á´½ÓµÄº¯ÊýµÄcode

×ܽáµÄһЩÎļþµÄÁ¥Êô¹Øϵ£º
Éæ¼°µ½Óëgcc°æ±¾Ïà¹ØµÄÓУºgcc£¬Óëcc1¡¢cc1plusµÈÔÚͬһĿ¼ÏµÄËùÓÐÎļþ£¬libgcc_s.soµÈ¡£

Éæ¼°µ½ÓëbinutilsÏà¹ØµÄÓУºasºÍldÒÔ¼°Ö§³ÖËüÃǵĿâÎļþ

Éæ¼°µ½glibc°æ±¾Ïà¹ØµÄÓУº/usr/lib/crt?.oÒÔ¼°/usr/lib/libc.so¡¢libc_nonshared.a£¬¼ÓÉ϶ÔÓ¦glibc°æ±¾µÄ/usr/includeϵÄÍ·Îļþ

×îºóͳ¼ÆÖ®ÉÏËùÓеÄÎļþ´óÔ¼ÓÃÈ¥ÁË26MBsµÄ¿Õ¼ä£¬»¹ÊǺܴóµÄ¡£²»¹ý»¹¿ÉÒÔ°ÑgdbÒ²¸´ÖƹýÀ´Ê¹Óá£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. renwei1986 ÓÚ 2008-04-12 19:18:20·¢±í:

    gcc Ò»°ãÊÇÖ»ÒªÄã°²×°ÁËLinux¾ÍÓеÄ
    ÔÚ³ÌÐòµ±Ç°Ä¿Â¼ÊäÈë gcc -o Ä¿±ê Ô´Îļþ ¾Í¿ÉÒÔÁË