Thanks for your answer. But I don't think setting the symbol weak will resolve the problem.

If I create a dummy symbol and recreate it once I know its size the problem is that IPA renames the two symbols with a different name since they don't have the same index in the global table.

Moreover, if the first symbol is of type CLASS_NAME, I get many DevWarnings:
WN_verifier Error (STID_check_st_class): ST of the STID is not CLASS: VAR, PREG or Block but 6.

The only hack I found is to prevent the symbol from being allocated as long as I don't know its final size and once the size is known, I create a new symbol with the right size and the same index (Set_ST_st_idx(copy_st, ST_st_idx(st));). So that IPA renames it with the same name (my symbol is static so renamed by IPA).

Do you know a better way for that?
Thierry


Guojin He wrote:
 
 
Which DevWarning did you get?
 
Maybe you could try to set the symbol as weak.  
 
 
======== 2005-09-21 11:09:47 You've written: ========
 
Send Open64-devel mailing list submissions to
 
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
 
You can reach the person managing the list at
 
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Open64-devel digest..."
 
 
Today's Topics:
 
   1. how to create a symbol without knowing its size? (Thierry BIDAULT)
 
--__--__--
 
Message: 1
Date: Tue, 20 Sep 2005 11:37:42 +0200
From: Thierry BIDAULT < thierry.bidault@st.com>
Subject: [Open64-devel] how to create a symbol without knowing its size?
 
Hi,
 
I working to port gcc coverage utilities in the open64, and I need to 
instrument the whirl and create a bss array for counters (edge profiling 
counters).
So I would like to create a symbol in the global symbol table without 
knowing its size. The size is known only once all the PUs have been 
compiled.
 
For the moment I'm creating a symbol of type CLASS_NAME without 
allocating it and recreate it with the right type and size at the very 
end of the compilation, once I know its size, However this method raises 
many DevWarn during afterwards.
 
To you know a better way to proceed?
 
Thanks for your help!
 
Thierry Bidault
Stmicroelectronics
 
 
 
--__--__--
 
_______________________________________________
Open64-devel mailing list
 
 
End of Open64-devel Digest
 
.

= = = = = = = = = = = = = = = = = = = = = =

Best regards  

              Guojin He

              heguojin@ict.ac.cn
               2005-09-21