This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,committed] AIX alias fix
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Sep 2013 12:01:11 -0400
- Subject: [PATCH,committed] AIX alias fix
- Authentication-results: sourceware.org; auth=none
varasm.c do_assemble_alias() calls globalize_decl() before creating an
alias for a global symbol. For FUNCTION_DECLs
ASM_OUTPUT_DEF_FROM_DECLS on AIX globalizes the code label in addition
to the function descriptor globalized by varasm.c. For
non-TREE_PUBLIC decls, the alias is declared as .lglobl for the code
label, but nothing emits the equivalent for the function descriptor.
The appended patch emits the additional lglobl.
Bootstrapped on powerpc-ibm-aix7.1.0.0
Thanks, David
* config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Emit lglobl for
function descriptor.
Index: rs6000.h
===================================================================
--- rs6000.h (revision 202225)
+++ rs6000.h (working copy)
@@ -2142,6 +2142,9 @@
fputs ("\t.lglobl\t.", FILE); \
RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \
+ fputs ("\t.lglobl\t", FILE); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
+ putc ('\n', FILE); \
} \
fputs ("\t.set\t.", FILE); \
RS6000_OUTPUT_BASENAME (FILE, alias); \