This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
.init_array/.fini_array
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: binutils at sources dot redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 09:37:34 -0700 (PDT)
- Subject: .init_array/.fini_array
- Reply-to: sje at cup dot hp dot com
I have a question about the .init_array and .fini_array ELF sections.
In gas/config/obj-elf.c these are defined as standard SHT_PROGBITS
sections instead of special SHT_INIT_ARRAY or SHT_FINI_ARRAY sections.
The file contains the comment:
/* 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
I was wondering if there has been any change in this status? On HP-UX
IA64 I am using the HP linker and it handles these sections so I would
like them to have their correct definitions.
Rather then use
.section .init_array
in GCC I am currently putting out:
.section .init_array, "aw", "init_array"
for this section based on CTORS_SECTION_ASM_OP in config/ia64/hpux.h and
I need the correct definition of .init_array/.fini_array/.preinit_array
for this to work.
Steve Ellcey
sje@cup.hp.com