Commit ebd97b96 by David Edelsohn Committed by David Edelsohn

rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Handle DECL_WEAK for function descriptors.

        * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Handle
        DECL_WEAK for function descriptors.
        * config/rs6000/xcoff.h (HANDLE_PRAGMA_WEAK): Define if assembler
        weak support present.
        (ASM_WEAKEN_LABEL): Same.

From-SVN: r48027
parent 103c41c1
2001-12-14 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Handle
DECL_WEAK for function descriptors.
* config/rs6000/xcoff.h (HANDLE_PRAGMA_WEAK): Define if assembler
weak support present.
(ASM_WEAKEN_LABEL): Same.
2001-12-14 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md (anonymous pattern): Add a missing
......
......@@ -2469,8 +2469,13 @@ extern int toc_initialized;
} \
}
/* This implementes the `alias' attribute. */
#ifdef HAVE_GAS_WEAK
#define RS6000_WEAK 1
#else
#define RS6000_WEAK 0
#endif
/* This implementes the `alias' attribute. */
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE,decl,target) \
do { \
const char * alias = XSTR (XEXP (DECL_RTL (decl), 0), 0); \
......@@ -2480,9 +2485,18 @@ do { \
{ \
if (TREE_PUBLIC (decl)) \
{ \
fputs ("\t.globl .", FILE); \
assemble_name (FILE, alias); \
putc ('\n', FILE); \
if (RS6000_WEAK && DECL_WEAK (decl)) \
{ \
fputs ("\t.weak .", FILE); \
assemble_name (FILE, alias); \
putc ('\n', FILE); \
} \
else \
{ \
fputs ("\t.globl .", FILE); \
assemble_name (FILE, alias); \
putc ('\n', FILE); \
} \
} \
else \
{ \
......
......@@ -438,9 +438,6 @@ toc_section () \
fprintf ((FILE), ",%d\n", (SIZE)); \
} while (0)
/* Used by definition of ASM_OUTPUT_DOUBLE_INT */
#define DOUBLE_INT_ASM_OP "\t.llong "
/* This says how to output an assembler line
to define a local common symbol.
Alignment cannot be specified, but we can try to maintain
......@@ -454,9 +451,25 @@ toc_section () \
xcoff_bss_section_name); \
} while (0)
/* Output a weak symbol, if weak support present. */
#ifdef HAVE_GAS_WEAK
#define HANDLE_PRAGMA_WEAK 1
#define ASM_WEAKEN_LABEL(FILE, NAME) \
do \
{ \
fputs ("\t.weak ", (FILE)); \
assemble_name ((FILE), (NAME)); \
fputc ('\n', (FILE)); \
} \
while (0)
#endif /* HAVE_GAS_WEAK */
/* This is how we tell the assembler that two symbols have the same value. */
#define SET_ASM_OP "\t.set "
#define SET_ASM_OP "\t.set\t"
/* Used by definition of ASM_OUTPUT_DOUBLE_INT */
#define DOUBLE_INT_ASM_OP "\t.llong "
/* These are various definitions for DWARF output. They could just
use '.long' or '.word', but that aligns to a 4-byte boundary which
......
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