aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-11-02 20:18:42 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2006-11-02 20:18:42 +0000
commit50603eedf716e6c8be93ba1ae203a2607bd6d63b (patch)
tree0d36cc25780d6f6657a271379c304a86136a93f2 /gcc
parent88852cb5127cf6c6a4c165dfb2d935972d203b79 (diff)
downloadgcc-50603eedf716e6c8be93ba1ae203a2607bd6d63b.zip
gcc-50603eedf716e6c8be93ba1ae203a2607bd6d63b.tar.gz
gcc-50603eedf716e6c8be93ba1ae203a2607bd6d63b.tar.bz2
arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED from priority argument.
2006-11-02 Paul Brook <paul@codesourcery.com> gcc/ * config/arm/arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED from priority argument. Use different section for non-default priority. * config/arm/elf.h: Remove definition of SUPPORTS_INIT_PRIORITY. From-SVN: r118425
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/arm/arm.c15
-rw-r--r--gcc/config/arm/elf.h2
3 files changed, 21 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 92b9048..a88142b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2006-11-02 Paul Brook <paul@codesourcery.com>
+
+ gcc/
+ * config/arm/arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED
+ from priority argument. Use different section for non-default
+ priority.
+ * config/arm/elf.h: Remove definition of SUPPORTS_INIT_PRIORITY.
+
2006-11-02 Eric Botcazou <ebotcazou@adacore.com>
PR other/29639
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 1d646c7..7c82fcf 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -11349,8 +11349,10 @@ 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)
{
+ section *s;
+
if (!TARGET_AAPCS_BASED)
{
default_named_section_asm_out_constructor (symbol, priority);
@@ -11358,7 +11360,16 @@ arm_elf_asm_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
}
/* Put these in the .init_array section, using a special relocation. */
- switch_to_section (ctors_section);
+ if (priority != DEFAULT_INIT_PRIORITY)
+ {
+ char buf[18];
+ sprintf (buf, ".init_array.%.5u", priority);
+ s = get_section (buf, SECTION_WRITE, NULL_TREE);
+ }
+ else
+ s = ctors_section;
+
+ switch_to_section (s);
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 ae3d533..03e57db 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)