* 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.
This commit is contained in:
Paul Brook 2004-09-08 20:52:49 +00:00
parent b26a6851b5
commit 10b016c223
4 changed files with 22 additions and 6 deletions

View 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.

View 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
{

View 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
}

View 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.