PR middle-end/25445
* varasm.c (default_binds_local_p_1): Consult flag_whole_program
if we are compiling with -fPIC.
From-SVN: r127162
+2007-08-02 Nathan Froyd <froydnj@codesourcery.com>
+
+ PR middle-end/25445
+ * varasm.c (default_binds_local_p_1): Consult flag_whole_program
+ if we are compiling with -fPIC.
+
2007-08-02 Sandra Loosemore <sandra@codesourcery.com>
Nigel Stephens <nigel@mips.com>
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)