On Wed, Mar 31, 2010 at 05:50:14PM +0200, Paolo Bonzini wrote:
>
>>>> [MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
>>>> libgcc_ext.10.5.dylib | grep emutls
>>>> 00013e70 T ___emutls_get_address
>>>> 00014070 T ___emutls_register_common
>>>
>>> I suppose they are not exported.
>>>
>>> Richard.
>>
>> Richard,
>>      Shouldn't these still show up in the output from...
>>
>> nm libgcc_s.1.dylib | grep emutls
>>
>> with a lower case symbol type?
>
> Not if they end up as private_extern symbols (i.e. hidden in GCC/ELF  
> parlance).
>
> Paolo

Paolo,
   So are you saying that we need to use...

Index: gcc/tree-profile.c
===================================================================
--- gcc/tree-profile.c  (revision 157873)
+++ gcc/tree-profile.c  (working copy)
@@ -79,7 +79,7 @@
                  get_identifier ("__gcov_indirect_call_callee"),
                  ptr_void);
   TREE_STATIC (ic_void_ptr_var) = 1;
-  TREE_PUBLIC (ic_void_ptr_var) = 0;
+  TREE_PUBLIC (ic_void_ptr_var) = 1;
   DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
   DECL_INITIAL (ic_void_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var);
@@ -91,7 +91,7 @@
                  get_identifier ("__gcov_indirect_call_counters"),
                  gcov_type_ptr);
   TREE_STATIC (ic_gcov_type_ptr_var) = 1;
-  TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
+  TREE_PUBLIC (ic_gcov_type_ptr_var) = 1;
   DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
   DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_gcov_type_ptr_var) = decl_default_tls_model 
(ic_gcov_type_ptr_var);

I assume also adding...

Index: tree-profile.c
===================================================================
--- tree-profile.c      (revision 157873)
+++ tree-profile.c      (working copy)
@@ -64,8 +64,8 @@
 /* Do initialization work for the edge profiler.  */
 
 /* Add code:
-   static gcov*        __gcov_indirect_call_counters; // pointer to actual 
counter
-   static void*        __gcov_indirect_call_callee; // actual callee address
+   static gcov*        __gcov_indirect_call_counters __attribute__ 
((visibility("default")); // pointer to actual counter
+   static void*        __gcov_indirect_call_callee __attribute__ 
((visibility("default")); // actual callee address
 */
 static void
 tree_init_ic_make_global_vars (void)

would be redundant. Or do we just really need to delete the TREE_PUBLIC's 
instead...

Index: tree-profile.c
===================================================================
--- tree-profile.c      (revision 157873)
+++ tree-profile.c      (working copy)
@@ -79,7 +79,6 @@
                  get_identifier ("__gcov_indirect_call_callee"),
                  ptr_void);
   TREE_STATIC (ic_void_ptr_var) = 1;
-  TREE_PUBLIC (ic_void_ptr_var) = 0;
   DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
   DECL_INITIAL (ic_void_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var);
@@ -91,7 +90,6 @@
                  get_identifier ("__gcov_indirect_call_counters"),
                  gcov_type_ptr);
   TREE_STATIC (ic_gcov_type_ptr_var) = 1;
-  TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
   DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
   DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_gcov_type_ptr_var) = decl_default_tls_model 
(ic_gcov_type_ptr_var);

Thanks in advance for any advice on this.
              Jack

Reply via email to