* config/obj-elf.c (obj_elf_section_type): Handle init_array,
authorPaul Brook <paul@codesourcery.com>
Wed, 8 Sep 2004 20:52:49 +0000 (20:52 +0000)
committerPaul Brook <paul@codesourcery.com>
Wed, 8 Sep 2004 20:52:49 +0000 (20:52 +0000)
fini_array and preinit_array section types.
* config/tc-ia64.c (ia64_elf_section_type): Remove init_array
and fini_array.
* doc/as.texinfo: Document extra section types.

gas/ChangeLog
gas/config/obj-elf.c
gas/config/tc-ia64.c
gas/doc/as.texinfo

index 13d53fd..dcfe99b 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-08  Paul Brook  <paul@codesourcery.com>
+
+       * config/obj-elf.c (obj_elf_section_type): Handle init_array,
+       fini_array and preinit_array section types.
+       * config/tc-ia64.c (ia64_elf_section_type): Remove init_array
+       and fini_array.
+       * doc/as.texinfo: Document extra section types.
+
 2004-09-02  Mark Mitchell  <mark@codesourcery.com>
 
        * Makefile.am (TARG_ENV_HFILES): Add te-symbian.h.
index 94f53b1..84f5a84 100644 (file)
@@ -771,6 +771,12 @@ obj_elf_section_type (char *str, size_t len)
     return SHT_NOBITS;
   if (len == 4 && strncmp (str, "note", 4) == 0)
     return SHT_NOTE;
+  if (len == 10 && strncmp (str, "init_array", 10) == 0)
+    return SHT_INIT_ARRAY;
+  if (len == 10 && strncmp (str, "fini_array", 10) == 0)
+    return SHT_FINI_ARRAY;
+  if (len == 13 && strncmp (str, "preinit_array", 13) == 0)
+    return SHT_PREINIT_ARRAY;
 
 #ifdef md_elf_section_type
   {
index 1d43e77..b2e599f 100644 (file)
@@ -996,12 +996,6 @@ ia64_elf_section_type (str, len)
   if (STREQ ("unwind"))
     return SHT_IA_64_UNWIND;
 
-  if (STREQ ("init_array"))
-    return SHT_INIT_ARRAY;
-
-  if (STREQ ("fini_array"))
-    return SHT_FINI_ARRAY;
-
   return -1;
 #undef STREQ
 }
index 89868c2..23de55f 100644 (file)
@@ -5291,8 +5291,16 @@ section contains data
 section does not contain data (i.e., section only occupies space)
 @item @@note
 section contains data which is used by things other than the program
+@item @@init_array
+section contains an array of pointers to init functions
+@item @@fini_array
+section contains an array of pointers to finish functions
+@item @@preinit_array
+section contains an array of pointers to pre-init functions
 @end table
 
+Many targets only support the first three section types.
+
 Note on targets where the @code{@@} character is the start of a comment (eg
 ARM) then another character is used instead.  For example the ARM port uses the
 @code{%} character.