diff options
author | Paul Brook <paul@codesourcery.com> | 2006-01-20 14:27:32 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-01-20 14:27:32 +0000 |
commit | d494aa40d8a45982f24cb1d19b2508e639d0b4c3 (patch) | |
tree | 041e0d0c24a2a42cfa84efcd220ae4a8b7e41b58 /gcc | |
parent | b7c89517aafe900bed51737770c2f2774407f648 (diff) |
2006-01-20 Paul Brook <paul@codesourcery.com>
Merge from csl-arm-branch.
2005-10-20 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED
from priority argument. Use different section names for non-default
priority.
* config/arm/elf.h: Remove definition of SUPPORTS_INIT_PRIORITY.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@110024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.c | 11 | ||||
-rw-r--r-- | gcc/config/arm/elf.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 6165545ae4f..21f8a2c9115 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -11292,7 +11292,7 @@ arm_assemble_integer (rtx x, unsigned int size, int aligned_p) /* Add a function to the list of static constructors. */ static void -arm_elf_asm_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) +arm_elf_asm_constructor (rtx symbol, int priority) { if (!TARGET_AAPCS_BASED) { @@ -11301,7 +11301,14 @@ arm_elf_asm_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) } /* Put these in the .init_array section, using a special relocation. */ - ctors_section (); + if (priority != DEFAULT_INIT_PRIORITY) + { + char buf[18]; + sprintf (buf, ".init_array.%.5u", priority); + named_section_flags (buf, SECTION_WRITE); + } + else + ctors_section (); assemble_align (POINTER_SIZE); fputs ("\t.word\t", asm_out_file); output_addr_const (asm_out_file, symbol); diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h index ae3d5338d8f..03e57db8bf9 100644 --- a/gcc/config/arm/elf.h +++ b/gcc/config/arm/elf.h @@ -149,5 +149,3 @@ } \ while (0) -/* The EABI doesn't provide a way of implementing init_priority. */ -#define SUPPORTS_INIT_PRIORITY (!TARGET_AAPCS_BASED) |