This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[arm] Give _init and _fini correct type
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>,Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 1 Oct 2004 02:26:29 +0100
- Subject: [arm] Give _init and _fini correct type
- Organization: CodeSourcery
The patch below gives the _init and _fini symbols function type.
This is required to make sure the linker interworks these symbols properly.
Tested with cross to am-none-eabi.
Ok for csl-arm-branch and mainline?
Paul
2004-09-30 Paul Brook <paul@codesourcery.com>
* config/arm/crti.asm: Give _init and _fini function type.
Index: config/arm/crti.asm
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/crti.asm,v
retrieving revision 1.3.24.1
diff -u -p -r1.3.24.1 crti.asm
--- config/arm/crti.asm 4 May 2004 11:35:39 -0000 1.3.24.1
+++ config/arm/crti.asm 1 Oct 2004 01:14:58 -0000
@@ -35,6 +35,12 @@
# .init sections. Users may put any desired instructions in those
# sections.
+#ifdef __ELF__
+#define TYPE(x) .type x,function
+#else
+#defien TYPE(x)
+#endif
+
# Note - this macro is complemented by the FUNC_END macro
# in crtn.asm. If you change this macro you must also change
# that macro match.
@@ -60,6 +66,7 @@
#ifdef __thumb__
.thumb_func
#endif
+ TYPE(_init)
_init:
FUNC_START
@@ -70,6 +77,7 @@ _init:
#ifdef __thumb__
.thumb_func
#endif
+ TYPE(_fini)
_fini:
FUNC_START