2004  5  25 ո


      Sun[tm] Studio 9ʽӱ༭ļ


            Ŀ¼

       1. 
       2.  Sun Studio 9ʽӱ༭
       3. Ժ͸ĵ
       4. 
       5. ͽ취
       6. ƺͲ
       7. ĵ

     

    ------------------------------------------------------------------------


            A. 

    ĵй Sun Studio 9 аʽӱ༭ (ILD) Ϣ
    ĵ˱а汾һЩ¹ܣ˷а汾
    г֪⡢ƺͲԡĵеϢڴ˷а汾
    еϢ

    Ʒĵ

        * Solaris ƽ̨ķ˵ͨ Sun Studio 9 վ
          http://developers.sun.com/tools/cc/documentation/ss9_docs/release_notes.html
          ô˷˵˵еϢºչļе
          Ϣ
        * Sun Studio 9 ĵƷֲҳļ HTML 汾Լֲ
          Դ /installation_directory/SUNWspro/docs/index.html з
          ʡȱʡװĿ¼Ϊ /optԴ index.html ҳĵ
              o C ļ
              o C++ ļ
              o C ûָ
              o C++ ûָ
              o ѧļ
              o ֵָ
              o Sun ܿļ
              o Sun ܿοֲ
              o Fortran  C  Sun ܿûָ
        * ɿ (IDE) ĵSun Studio 9 IDE 
           IDE е [] ˵зʡ
        * ԱԴŻйؼ¡ĵ֪ʶ⣬μ
          ԱŻַhttp://developers.sun.com/prodtech/cc

    Ҫ鿴ıʽļµ

       more /opt/SUNWspro/READMEs/ild

    Ҫ鿴 HTML ʽļʹȱʡװĿ¼

file:/opt/SUNWspro/docs/index.html

    ע⡪ Sun Studio 9 δװȱʡ /opt Ŀ¼Уѯϵͳ
    ԱԻϵͳеĵȼ·

     

    ------------------------------------------------------------------------


            B.  Sun Studio 9 ӱ༭

    ˷а汾 ILD  Solaris[tm]  (SPARC(R);Platform
    Edition) 89  10 Beta 汾Լ Solaris  (x86 Platform
    Edition) 89  10 Beta 汾

    ע⡪ڱĵУIAָ Intel 32 λϵṹ
    PentiumPentium ProPentium IIPentium II XeonCeleronPentium
    III  Pentium III Xeon Լ AMD  Cyrix ļ΢

     

    ------------------------------------------------------------------------


            C. Ժ͸ĵ

     ILD ͸ĵĹܡЩܺ͸ĵĹܼ¼
    ÿһһгıʶ Bugtraq+ ݿС

    Ҳת http://docs.sun.com ʴֲᡣ

        * ILD ֧ͨC ûָϡ͡C++ ûָϡṩ˵
          Ҳ֧ͨ -xldscope ѡ
          


        * ILD ͨ .stab.sbfocus  .stab.sbfocusstr ӵ
          ִļУ֧ DWARF ʽԴϢ
           DWARF ʽĸϢμC ûָϡ cc(1) е
          -xdebugformat


        * ILD ͨ SPARC ƽ̨ǿ ILD ̴ֱ֧߳洢

          ڱ̴߳洢ϸϢμC ûָϡ͡C++ ûָϡ
          ṩ˵ҲԲ鿴 -xthreadvar ѡĽ͡

     

    ------------------------------------------------------------------------


            D. 

    ϸ˵

        * 4783169
          ILD Ѿ£Աͬʱи¡Ӻ͵ڶθļĲ
          ͬʱЩᵼ ILD ܼ⵽ļĶ
          £ st_mtime ֲ䣩


        * 4754134
          ILD Ѿ£ɾ .stab.index%* й N_OBJ stabs Ŀ
          һ裬ü赼˴ comdat stabs


        * 4695562
          ILD Ѿ£Աܹȷɷηŵضλ

     

    ------------------------------------------------------------------------


            E. ͽ취

    ֪⼰ܵĽڸºͲ
    ϢַΪ
    http://developers.sun.com/prodtech/cc/support_index.html

        * ILD ֶ֧ԼĴŶֻӲԡһζ
          ļʹüĴţôԸļ޸Ļᵼ ILD ִȫӣ
          ʽӡ


        * ʹŻ -g Ե¶ԼĴŵʹáң
          ûʹ -g бĳһʹʱҪ ILD 
          ҪСġ


        * ILD ʹһ͹鵵ļʱǣȷЩļ
          ¹κοжͬŵĶζ壬 ILD 
          ȷȻͬһһеĶζʹ ILD
          ޷ֱ档Щ£ILD ֻһĳ


        * -m ѡһڴӳ䣬ǲڱ׼һ
          Ķضб


        * һһļӹ鵵ļȡӵһʽִг
          ôʹɾ˶ãļҲһֱִ
          УֱһγʼӡĲ£һ
          һָ myfunc1  myfunc2 áone.o  two.o ӹ鵵
          ļȷȡ鿴󲿷ֵĴ롣

% cc -c main1.c main2.c one.c two.c
% ar cr libfoo.a one.o two.o
% rm -f a.out
% cp main2.o main.o # references myfunc1 and myfunc2
% cc -xildon main.o libfoo.a # first link (initial link)
% ./a.out
Calling myfunc1!
myfunc1 called!
Calling myfunc2!
myfunc2 called!
% nm a.out | grep myfunc
[59]    |    68912|      32|FUNC |GLOB|0    |8     |myfunc1
[60]    |    68960|      32|FUNC |GLOB|0    |8     |myfunc2



          ڵڶУmyfunc2 ѾٱãȻڿִ
          Уκ two.0 жķҲһģȻͨɾ
           a.outǿƽµĳʼӣӲٰ myfunc2

% cp main1.o main.o          # myfunc2 no longer referenced
% cc -xildon main.o libfoo.a # second link (incremental link)
% ./a.out
Calling myfunc1
myfunc1 called!
% nm a.out | grep myfunc
[59]    |    68912|      32|FUNC |GLOB|0    |8     |myfunc1
[60]    |    68960|      32|FUNC |GLOB|0    |8     |myfunc2


# Removing a.out fixes the problem.

% rm a.out                     # force a new initial link
% cc -xildon main.o libfoo.a   # third link (initial link)
% nm a.out | grep myfunc
[58]    |    68832|      32|FUNC |GLOB|0    |8     |myfunc1



          ᵼ³⣺

          ڳطһЩѾ two.o жıʶ
          two.oִضķŴ

          dbx  a.out ĹȻ⵽ two.o 磬
          ڵڶӵ dxb myfun2 ֹͣʵ
          ʲ⣬Կܲɻ

          Ҳص˵two.o ڳֻܹԹ鵵
          ļгֵķŵãԸļĲ
          ҪĳȡЩµĹ鵵Ҳܳг⡣

          룺

% cat main1.c
#include <stdio.h>
extern void myfunc1(void);

int main(void)
{
(void)printf("Calling myfunc1\n"); myfunc1();
return 0;
}

% cat main2.c
#include <stdio.h>

extern void myfunc1(void), myfunc2(void);

int main(void)
{

(void)printf("Calling myfunc1!\n"); myfunc1();
(void)printf("Calling myfunc2!\n"); myfunc2();
return 0;
}

% cat one.c
#include <stdio.h>

void myfunc1(void)
{
(void)printf("myfunc1 called!\n");
}

% cat two.c
#include <stdio.h>

void myfunc2(void)
{
(void)printf("myfunc2 called!\n");
}

     

    ------------------------------------------------------------------------


            F. ƺͲ

    ϵͳƺͲݡйش Sun Studio 9 а
    Ϣμ Sun Studio 9 ˵ַΪ
    http://developers.sun.com/tools/cc/documentation/ss9_docs/release_notes.html


     

    ------------------------------------------------------------------------


            G. ĵ

    ĿǰûµϢ

     

    ------------------------------------------------------------------------

    Ȩ (c) 2004 Sun Microsystems, Inc. Ȩ
	֤ʹá

