summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/linux64.h
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-21 01:40:00 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-21 01:40:00 +0000
commit66ebfa671af5f4ba43964e7faee89b30a089193a (patch)
tree59847964b19ce34a89d09442325d0bd276be829e /gcc/config/rs6000/linux64.h
parentc07315202d597a3d1e04dda8552efee2f6776f59 (diff)
downloadgcc-66ebfa671af5f4ba43964e7faee89b30a089193a.tar.gz
* config/rs6000/linux64.h (DOT_SYMBOLS): Define.
(CRT_CALL_STATIC_FUNCTION): Define !DOT_SYMBOLS version. (ASM_DECLARE_FUNCTION_SIZE): Modify for !DOT_SYMBOLS. (ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Likewise. (RS6000_ABI_NAME): Define as "linux". (SUBSUBTARGET_OVERRIDE_OPTIONS): Set dot_symbols. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Select ABI_AIX when rs6000_abi_name is "linux" and TARGET_64BIT. * config/rs6000/rs6000-protos.h (rs6000_output_function_entry): Decl. * config/rs6000/rs6000.c (dot_symbols): New global var. (rs6000_output_function_entry): New function, modified for !DOT_SYMBOLS.. (print_operand <case 'z'>): ..extracted from here. (rs6000_assemble_visibility): Modify for !DOT_SYMBOLS. (rs6000_output_function_epilogue): Likewise. (rs6000_elf_declare_function_name): Likewise. * config/rs6000/rs6000.h (DOT_SYMBOLS): Define. (ASM_WEAKEN_DECL, ASM_OUTPUT_DEF_FROM_DECLS): Modify for !DOT_SYMBOLS. * configure.ac (HAVE_LD_NO_DOT_SYMS): Add new AC_DEFINE. * configure: Regenerate. * config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/linux64.h')
-rw-r--r--gcc/config/rs6000/linux64.h50
1 files changed, 32 insertions, 18 deletions
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 5ebc19c818b..f87f10ebfb1 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -50,6 +50,13 @@
#undef TARGET_AIX
#define TARGET_AIX TARGET_64BIT
+#ifdef HAVE_LD_NO_DOT_SYMS
+/* New ABI uses a local sym for the function entry point. */
+extern int dot_symbols;
+#undef DOT_SYMBOLS
+#define DOT_SYMBOLS dot_symbols
+#endif
+
#undef PROCESSOR_DEFAULT64
#define PROCESSOR_DEFAULT64 PROCESSOR_PPC630
@@ -57,7 +64,7 @@
#define TARGET_RELOCATABLE (!TARGET_64BIT && (target_flags & MASK_RELOCATABLE))
#undef RS6000_ABI_NAME
-#define RS6000_ABI_NAME (TARGET_64BIT ? "aixdesc" : "sysv")
+#define RS6000_ABI_NAME "linux"
#define INVALID_64BIT "-m%s not supported in this configuration"
#define INVALID_32BIT INVALID_64BIT
@@ -75,6 +82,7 @@
rs6000_current_abi = ABI_AIX; \
error (INVALID_64BIT, "call"); \
} \
+ dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
if (target_flags & MASK_RELOCATABLE) \
{ \
target_flags &= ~MASK_RELOCATABLE; \
@@ -386,11 +394,19 @@
object files, each potentially with a different TOC pointer. For
that reason, place a nop after the call so that the linker can
restore the TOC pointer if a TOC adjusting call stub is needed. */
+#if DOT_SYMBOLS
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
asm (SECTION_OP "\n" \
" bl ." #FUNC "\n" \
" nop\n" \
" .previous");
+#else
+#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
+ asm (SECTION_OP "\n" \
+" bl " #FUNC "\n" \
+" nop\n" \
+" .previous");
+#endif
#endif
/* FP save and restore routines. */
@@ -415,13 +431,11 @@
if (!flag_inhibit_size_directive) \
{ \
fputs ("\t.size\t", (FILE)); \
- if (TARGET_64BIT) \
+ if (TARGET_64BIT && DOT_SYMBOLS) \
putc ('.', (FILE)); \
assemble_name ((FILE), (FNAME)); \
fputs (",.-", (FILE)); \
- if (TARGET_64BIT) \
- putc ('.', (FILE)); \
- assemble_name ((FILE), (FNAME)); \
+ rs6000_output_function_entry (FILE, FNAME); \
putc ('\n', (FILE)); \
} \
} \
@@ -465,14 +479,13 @@
do \
{ \
char temp[256]; \
+ const char *s; \
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER); \
fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
assemble_name (FILE, temp); \
putc ('-', FILE); \
- if (TARGET_64BIT) \
- putc ('.', FILE); \
- assemble_name (FILE, \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
+ s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
+ rs6000_output_function_entry (FILE, s); \
putc ('\n', FILE); \
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
} \
@@ -482,19 +495,20 @@ while (0)
#define DBX_OUTPUT_BRAC(FILE, NAME, BRAC) \
do \
{ \
- const char *flab; \
+ const char *s; \
fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC); \
assemble_name (FILE, NAME); \
putc ('-', FILE); \
if (current_function_func_begin_label != NULL_TREE) \
- flab = IDENTIFIER_POINTER (current_function_func_begin_label); \
+ { \
+ s = IDENTIFIER_POINTER (current_function_func_begin_label); \
+ assemble_name (FILE, s); \
+ } \
else \
{ \
- if (TARGET_64BIT) \
- putc ('.', FILE); \
- flab = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
+ s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
+ rs6000_output_function_entry (FILE, s); \
} \
- assemble_name (FILE, flab); \
putc ('\n', FILE); \
} \
while (0)
@@ -506,12 +520,12 @@ while (0)
#define DBX_OUTPUT_NFUN(FILE, LSCOPE, DECL) \
do \
{ \
+ const char *s; \
fprintf (FILE, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN); \
assemble_name (FILE, LSCOPE); \
putc ('-', FILE); \
- if (TARGET_64BIT) \
- putc ('.', FILE); \
- assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \
+ s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
+ rs6000_output_function_entry (FILE, s); \
putc ('\n', FILE); \
} \
while (0)