Commit 5d7f4d9c by Jan Hubicka Committed by Jan Hubicka

lto-streamer-out.c (write_symbol): Fix visibilities of external references.


	* lto-streamer-out.c (write_symbol): Fix visibilities of external
	references.

From-SVN: r162497
parent 67d8bd24
2010-07-23 Jan Hubicka <jh@suse.cz>
* lto-streamer-out.c (write_symbol): Fix visibilities of external
references.
2010-07-23 Le-Chun Wu <lcwu@google.com> 2010-07-23 Le-Chun Wu <lcwu@google.com>
* omega.c (omega_eliminate_redundant): Remove a self-assign statement. * omega.c (omega_eliminate_redundant): Remove a self-assign statement.
......
...@@ -2352,6 +2352,17 @@ write_symbol (struct lto_streamer_cache_d *cache, ...@@ -2352,6 +2352,17 @@ write_symbol (struct lto_streamer_cache_d *cache,
&& cgraph_get_node (t)->analyzed)); && cgraph_get_node (t)->analyzed));
} }
/* Imitate what default_elf_asm_output_external do.
When symbol is external, we need to output it with DEFAULT visibility
when compiling with -fvisibility=default, while with HIDDEN visibility
when symbol has attribute (visibility("hidden")) specified.
targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
right. */
if (DECL_EXTERNAL (t)
&& !targetm.binds_local_p (t))
visibility = GCCPV_DEFAULT;
else
switch (DECL_VISIBILITY(t)) switch (DECL_VISIBILITY(t))
{ {
case VISIBILITY_DEFAULT: case VISIBILITY_DEFAULT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment