diff mbox

[committed] AIX alias fix

Message ID CAGWvnymBEv93+OKc_m2DB3BsP6-hE-+24s4QBnK9akiAZQkE6A@mail.gmail.com
State New
Headers show

Commit Message

David Edelsohn Sept. 3, 2013, 4:01 p.m. UTC
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.
diff mbox

Patch

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);                         \