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: Use .fini_array on ARM EABI


Paul --

I applied this (obvious) patch which you wrote for our GNU/Linux work to the
csl-arm-branch and added it to the queued-for-4.1 page.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2005-01-21  Paul Brook  <paul@codesourcery.com>

	* config/arm/arm.h (ARM_DTORS_SECTION_ASM_OP): Define. 
	(DTORS_SECTION_ASM_OP): Conditionalize on TARGET_AAPCS_BASED.

Index: arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.210.2.49
retrieving revision 1.210.2.49.2.1
diff -c -5 -p -r1.210.2.49 -r1.210.2.49.2.1
*** arm.h	5 Jan 2005 16:56:28 -0000	1.210.2.49
--- arm.h	20 Jan 2005 09:49:34 -0000	1.210.2.49.2.1
*************** typedef struct
*** 2124,2139 ****
--- 2124,2144 ----
    "\t.section\t.init_array,\"aw\",%init_array"
  #define ARM_EABI_DTORS_SECTION_OP \
    "\t.section\t.fini_array,\"aw\",%fini_array"
  #define ARM_CTORS_SECTION_OP \
    "\t.section\t.ctors,\"aw\",%progbits"
+ #define ARM_DTORS_SECTION_OP \
+   "\t.section\t.dtors,\"aw\",%progbits"
  
  /* Define CTORS_SECTION_ASM_OP.  */
  #undef CTORS_SECTION_ASM_OP
+ #undef DTORS_SECTION_ASM_OP
  #ifndef IN_LIBGCC2
  # define CTORS_SECTION_ASM_OP \
     (TARGET_AAPCS_BASED ? ARM_EABI_CTORS_SECTION_OP : ARM_CTORS_SECTION_OP)
+ # define DTORS_SECTION_ASM_OP \
+    (TARGET_AAPCS_BASED ? ARM_EABI_DTORS_SECTION_OP : ARM_DTORS_SECTION_OP)
  #else /* !defined (IN_LIBGCC2) */
    /* In libgcc, CTORS_SECTION_ASM_OP must be a compile-time constant,
       so we cannot use the definition above.  */ 
  # ifdef __ARM_EABI__
      /* The .ctors section is not part of the EABI, so we do not define
*************** typedef struct
*** 2149,2158 ****
--- 2154,2164 ----
  #   define CTOR_LIST_END /* empty */
  #   define DTOR_LIST_BEGIN asm (ARM_EABI_DTORS_SECTION_OP)
  #   define DTOR_LIST_END /* empty */
  # else /* !defined (__ARM_EABI__) */
  #   define CTORS_SECTION_ASM_OP ARM_CTORS_SECTION_OP
+ #   define DTORS_SECTION_ASM_OP ARM_DTORS_SECTION_OP
  # endif /* !defined (__ARM_EABI__) */
  #endif /* !defined (IN_LIBCC2) */
  
  #define ARM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)	\
    arm_encode_call_attribute (DECL, SHORT_CALL_FLAG_CHAR)


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