Commit a0c21029 by Rainer Orth Committed by Rainer Orth

sysv4.h (PUSHSECTION_FORMAT): Remove undef.

	* config/sparc/sysv4.h (PUSHSECTION_FORMAT): Remove undef.
	(PUSHSECTION_ASM_OP): Remove.
	(POPSECTION_ASM_OP): Remove.
	(PUSHSECTION_FORMAT): Remove.
	* config/sol2.h (PUSHSECTION_FORMAT): Define.
	* config/sparc/sol2.h [!USE_GAS] (PUSHSECTION_FORMAT): Redefine.
	* config/sol2.c (solaris_output_init_fini): Use it.

From-SVN: r157861
parent a3f410a2
2010-03-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sparc/sysv4.h (PUSHSECTION_FORMAT): Remove undef.
(PUSHSECTION_ASM_OP): Remove.
(POPSECTION_ASM_OP): Remove.
(PUSHSECTION_FORMAT): Remove.
* config/sol2.h (PUSHSECTION_FORMAT): Define.
* config/sparc/sol2.h [!USE_GAS] (PUSHSECTION_FORMAT): Redefine.
* config/sol2.c (solaris_output_init_fini): Use it.
2010-03-31 Jie Zhang <jie@codesourcery.com>
PR 43574
......
......@@ -105,14 +105,14 @@ solaris_output_init_fini (FILE *file, tree decl)
{
if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))
{
fprintf (file, "\t.pushsection\t\".init\"\n");
fprintf (file, PUSHSECTION_FORMAT, ".init");
ASM_OUTPUT_CALL (file, decl);
fprintf (file, "\t.popsection\n");
}
if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))
{
fprintf (file, "\t.pushsection\t\".fini\"\n");
fprintf (file, PUSHSECTION_FORMAT, ".fini");
ASM_OUTPUT_CALL (file, decl);
fprintf (file, "\t.popsection\n");
}
......
......@@ -254,6 +254,10 @@ __enable_execute_stack (void *addr) \
{ "init", 0, 0, true, false, false, NULL }, \
{ "fini", 0, 0, true, false, false, NULL }
/* Solaris/x86 as and gas support the common ELF .section/.pushsection
syntax. */
#define PUSHSECTION_FORMAT "\t.pushsection\t%s\n"
/* This is how to declare the size of a function. For Solaris, we output
any .init or .fini entries here. */
#undef ASM_DECLARE_FUNCTION_SIZE
......
/* Definitions of target machine for GCC, for SPARC running Solaris 2
Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
2006, 2007, 2008, 2010 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@netcom.com).
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
......@@ -181,4 +181,11 @@ along with GCC; see the file COPYING3. If not see
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION sparc_solaris_elf_asm_named_section
/* Solaris/SPARC as uses a non-standard .section/.pushsection syntax.
While gas supports it, too, we prefer the standard variant. */
#ifndef USE_GAS
#undef PUSHSECTION_FORMAT
#define PUSHSECTION_FORMAT "\t.pushsection\t\"%s\"\n"
#endif
#define MD_UNWIND_SUPPORT "config/sparc/sol2-unwind.h"
......@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see
#undef FINI_SECTION_ASM_OP
#undef READONLY_DATA_SECTION_ASM_OP
#undef TYPE_OPERAND_FMT
#undef PUSHSECTION_FORMAT
#undef STRING_ASM_OP
#undef COMMON_ASM_OP
#undef SKIP_ASM_OP
......@@ -63,19 +62,12 @@ along with GCC; see the file COPYING3. If not see
#define STRING_ASM_OP "\t.asciz\t"
#define COMMON_ASM_OP "\t.common\t"
#define SKIP_ASM_OP "\t.skip\t"
#define PUSHSECTION_ASM_OP "\t.pushsection\t"
#define POPSECTION_ASM_OP "\t.popsection"
/* This is the format used to print the second operand of a .type pseudo-op
for the SPARC/svr4 assembler. */
#define TYPE_OPERAND_FMT "#%s"
/* This is the format used to print a .pushsection pseudo-op (and its operand)
for the SPARC/svr4 assembler. */
#define PUSHSECTION_FORMAT "%s\"%s\"\n"
#undef ASM_OUTPUT_CASE_LABEL
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \
......
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