diff options
Diffstat (limited to 'contrib/gcc/varasm.c')
-rw-r--r-- | contrib/gcc/varasm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/gcc/varasm.c b/contrib/gcc/varasm.c index d172071..21b6904 100644 --- a/contrib/gcc/varasm.c +++ b/contrib/gcc/varasm.c @@ -5876,9 +5876,10 @@ default_binds_local_p_1 (tree exp, int shlib) else if (DECL_WEAK (exp)) local_p = false; /* If PIC, then assume that any global name can be overridden by - symbols resolved from other modules. */ + symbols resolved from other modules, unless we are compiling with + -fwhole-program, which assumes that names are local. */ else if (shlib) - local_p = false; + local_p = flag_whole_program; /* Uninitialized COMMON variable may be unified with symbols resolved from other modules. */ else if (DECL_COMMON (exp) |