ld: do not export __dso_handle for PE

Message ID 1407784979-9732-1-git-send-email-yselkowi@redhat.com
State New
Headers show

Commit Message

Yaakov Selkowitz Aug. 11, 2014, 7:22 p.m.
* pe-dll.c (autofilter_symbollist_i386): Add __dso_handle.
---
This is necessary for adding __cxa_atexit support for Cygwin in GCC
without exporting __dso_handle from every DLL.  (On ELF platforms,
__dso_handle is marked hidden visibility, but we don't have support
for that yet on PE platforms.)

 ld/pe-dll.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nick Clifton Aug. 13, 2014, 10:45 a.m. | #1
Hi Yaakov,

>   necessary for adding __cxa_atexit support for Cygwin in GCC
> without exporting __dso_handle from every DLL.  (On ELF platforms,
> __dso_handle is marked hidden visibility, but we don't have support
> for that yet on PE platforms.)

Approved and applied.

Cheers
   Nick

Patch

diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index d38f30d..61d8fa5 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -235,6 +235,7 @@  static const autofilter_entry_type autofilter_symbollist_i386[] =
   { STRING_COMMA_LEN ("_impure_ptr") },
   { STRING_COMMA_LEN ("_fmode") },
   { STRING_COMMA_LEN ("environ") },
+  { STRING_COMMA_LEN ("__dso_handle") },
   { NULL, 0 }
 };