X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fdbxout.c;h=8b11a9a371d0c1bfc4eb8db869d363056e023134;hp=ad1b3c76eddf13afe9acf08eb5c25a1dc4986aad;hb=e845094d53e25f0adf1b8ff5269638c5d8f20cc7;hpb=250807797b9faaf6acfb083e2ef17d7fca879447 diff --git a/gcc/dbxout.c b/gcc/dbxout.c index ad1b3c76edd..8b11a9a371d 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2332,6 +2332,15 @@ dbxout_expand_expr (tree expr) switch (TREE_CODE (expr)) { case VAR_DECL: + /* We can't handle emulated tls variables, because the address is an + offset to the return value of __emutls_get_address, and there is no + way to express that in stabs. Also, there are name mangling issues + here. We end up with references to undefined symbols if we don't + disable debug info for these variables. */ + if (!targetm.have_tls && DECL_THREAD_LOCAL_P (expr)) + return NULL; + /* FALLTHRU */ + case PARM_DECL: if (DECL_HAS_VALUE_EXPR_P (expr)) return dbxout_expand_expr (DECL_VALUE_EXPR (expr));