This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gccgo] Only use protected visibility on ELF targets


I committed this patch to the gccgo branch to only use protected
visibility on ELF targets.

Ian

diff -r 17981b4e2404 go/gogo-tree.cc
--- a/go/gogo-tree.cc	Thu Feb 25 09:11:00 2010 -0800
+++ b/go/gogo-tree.cc	Thu Feb 25 13:46:35 2010 -0800
@@ -2787,12 +2787,14 @@
     }
   else
     {
+#ifdef OBJECT_FORMAT_ELF
       // Give the decl protected visibility.  This avoids out-of-range
       // references with shared libraries with the x86_64 small model
       // when the type descriptor gets a COPY reloc into the main
       // executable.
       DECL_VISIBILITY(decl) = VISIBILITY_PROTECTED;
       DECL_VISIBILITY_SPECIFIED(decl) = 1;
+#endif
 
       TREE_PUBLIC(decl) = 1;
     }
@@ -3673,11 +3675,13 @@
   // may be defined in multiple packages.
   if (has_hidden_methods)
     {
+#ifdef OBJECT_FORMAT_ELF
       // Give the decl protected visibility.  This avoids out-of-range
       // references with shared libraries with the x86_64 small model
       // when the table gets a COPY reloc into the main executable.
       DECL_VISIBILITY(decl) = VISIBILITY_PROTECTED;
       DECL_VISIBILITY_SPECIFIED(decl) = 1;
+#endif
 
       TREE_PUBLIC(decl) = 1;
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]