2002-03-04 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 4 Mar 2002 20:40:48 +0000 (20:40 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 4 Mar 2002 20:40:48 +0000 (20:40 +0000)
* config/obj-elf.c (special_section): Add .init_array,
.fini_array and .preinit_array.

* config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove
.init_array and .fini_array.

gas/ChangeLog
gas/config/obj-elf.c
gas/config/tc-ia64.h

index 4eea4919e835a0b0a9b1135a20f0027b5c80e376..221c592f3e45452eae027690a89e52692121e72e 100644 (file)
@@ -1,3 +1,11 @@
+2002-03-04  H.J. Lu <hjl@gnu.org>
+
+       * config/obj-elf.c (special_section): Add .init_array,
+       .fini_array and .preinit_array.
+
+       * config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove
+       .init_array and .fini_array.
+
 2002-03-01  Jakub Jelinek  <jakub@redhat.com>
 
        * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy
index dcbff5d8a213c0d35bb780c142fe9c40593bca89..0597eb783e54d071d80b0004b540dac379efb4a2 100644 (file)
@@ -595,6 +595,27 @@ static struct special_section const special_sections[] =
   { ".rodata", SHT_PROGBITS,   SHF_ALLOC                       },
   { ".rodata1",        SHT_PROGBITS,   SHF_ALLOC                       },
   { ".text",   SHT_PROGBITS,   SHF_ALLOC + SHF_EXECINSTR       },
+#if 0
+  /* FIXME: The current gcc, as of 2002-03-03, will emit
+
+       .section .init_array,"aw",@progbits
+
+     for __attribute__ ((section (".init_array"))). "@progbits" marks
+     the incorrect section type. For now, we make them with
+     SHT_PROGBITS. BFD will fix the section type. Gcc should be changed
+     to emit
+
+       .section .init_array
+
+   */
+  { ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE         }, 
+  { ".fini_array",SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE         },
+  { ".preinit_array",SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE   }, 
+#else
+  { ".init_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE         }, 
+  { ".fini_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE         },
+  { ".preinit_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE   }, 
+#endif
 
 #ifdef ELF_TC_SPECIAL_SECTIONS
   ELF_TC_SPECIAL_SECTIONS
index 53dab86447a94ff9e461455c6f56ca2b9e8b6436..7b03e26b3f4e1b192290cf17e851c420f9e21c7b 100644 (file)
@@ -124,8 +124,6 @@ extern void ia64_after_parse_args PARAMS ((void));
 #define WORKING_DOT_WORD       /* don't do broken word processing for now */
 
 #define ELF_TC_SPECIAL_SECTIONS                                                   \
-{ ".init_array",SHT_INIT_ARRAY,        SHF_ALLOC + SHF_WRITE                   }, \
-{ ".fini_array",SHT_FINI_ARRAY,        SHF_ALLOC + SHF_WRITE                   }, \
 { ".sbss",     SHT_NOBITS,     SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, \
 { ".sdata",    SHT_PROGBITS,   SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },