public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dougsemler at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/44139] New: Exporting emutls symbols from a DLL broken on w32 targets Date: Fri, 14 May 2010 14:23:00 -0000 [thread overview] Message-ID: <bug-44139-17370@http.gcc.gnu.org/bugzilla/> (raw) Windows targets that use emutls add a "." character as a separator from the _emutls_{t,v} and the true symbol name. However, exporting these symbol names from a DLL is problematic (i.e. a thread local data variable), because the "." in the symbol name tells the Windows loader to treat the symbol as a forwarding RVA to a second DLL (in this case, it will look for the symbol "varname" in __emutls_v.dll, the symbol exported is __emutls_v.varname). Note that this is a runtime issue, not a compile/link issue. This can be worked around by #define TARGET_EMUTLS_VAR_PREFIX "__emutls_v_" #define TARGET_EMUTLS_TMPL_PREFIX "__emutls_t_" in the config header (e.g. config/i386/cygming.h or config/i386/mingw-w64.h, etc). However, this breaks backward compatibility with object files that were built with previous versions of the compiler (e.g libold.a would have a global name of __emutls_v.varname, while the patch would cause gcc to look for __emutls_v_varname, which would cause linker errors). -- Summary: Exporting emutls symbols from a DLL broken on w32 targets Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dougsemler at gmail dot com GCC target triplet: i686-pc-mingw32 x86_64-*-mingw32 i686-pc-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44139
next reply other threads:[~2010-05-14 14:23 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-14 14:23 dougsemler at gmail dot com [this message] 2010-05-15 9:06 ` [Bug target/44139] " davek at gcc dot gnu dot org 2010-05-15 9:34 ` davek at gcc dot gnu dot org 2010-05-15 9:37 ` davek at gcc dot gnu dot org 2010-05-15 9:38 ` davek at gcc dot gnu dot org 2010-05-15 9:38 ` davek at gcc dot gnu dot org 2010-05-15 9:38 ` davek at gcc dot gnu dot org 2010-05-15 9:45 ` davek at gcc dot gnu dot org 2010-05-15 13:03 ` dougsemler at gmail dot com 2010-05-15 13:48 ` davek at gcc dot gnu dot org 2010-05-17 18:26 ` davek at gcc dot gnu dot org 2010-05-17 18:26 ` davek at gcc dot gnu dot org 2010-05-18 14:22 ` ktietz at gcc dot gnu dot org 2010-05-18 14:29 ` davek at gcc dot gnu dot org 2010-05-18 14:33 ` davek at gcc dot gnu dot org 2010-05-18 15:18 ` ktietz at gcc dot gnu dot org 2010-05-18 15:26 ` davek at gcc dot gnu dot org 2010-05-18 16:28 ` dominiq at lps dot ens dot fr 2010-05-18 22:43 ` dannysmith at users dot sourceforge dot net 2010-05-19 9:15 ` ktietz at gcc dot gnu dot org 2010-05-19 15:41 ` dje at gcc dot gnu dot org 2010-05-19 16:18 ` ktietz at gcc dot gnu dot org 2010-05-20 17:52 ` dje at gcc dot gnu dot org 2010-05-21 11:28 ` ktietz at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-44139-17370@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).