This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,committed] AIX alias fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]