diff options
author | Alan Modra <amodra@gmail.com> | 2002-10-22 10:56:45 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-10-22 10:56:45 +0000 |
commit | 7ed1d3463ed9ab59cb3f7e2e454d0e214b743c85 (patch) | |
tree | 477b1c9040d9b52cf1a8560d9cc08f727af7ecad | |
parent | 8ec413174a2a218576cf5905cc5934f78502c1f7 (diff) | |
download | fsf-binutils-gdb-7ed1d3463ed9ab59cb3f7e2e454d0e214b743c85.zip fsf-binutils-gdb-7ed1d3463ed9ab59cb3f7e2e454d0e214b743c85.tar.gz fsf-binutils-gdb-7ed1d3463ed9ab59cb3f7e2e454d0e214b743c85.tar.bz2 |
* config/obj-elf.c (special_sections): Use correct types for init
array sections.
(obj_elf_change_section): Don't mess with init array section type.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 29 |
2 files changed, 16 insertions, 19 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index adbcfa7..6159ef2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2002-10-22 Alan Modra <amodra@bigpond.net.au> + + * config/obj-elf.c (special_sections): Use correct types for init + array sections. + (obj_elf_change_section): Don't mess with init array section type. + 2002-10-21 Richard Sandiford <rsandifo@redhat.com> * config/tc-mips.c (mips_need_elf_addend_fixup): Return true diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 799e44f..259785d 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -617,27 +617,9 @@ static struct special_section const special_sections[] = { ".tbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, { ".tdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, { ".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 @@ -707,7 +689,16 @@ obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push) type = special_sections[i].type; else if (type != special_sections[i].type) { - if (old_sec == NULL) + if (old_sec == NULL + /* FIXME: gcc, as of 2002-10-22, will emit + + .section .init_array,"aw",@progbits + + for __attribute__ ((section (".init_array"))). + "@progbits" is incorrect. */ + && special_sections[i].type != SHT_INIT_ARRAY + && special_sections[i].type != SHT_FINI_ARRAY + && special_sections[i].type != SHT_PREINIT_ARRAY) { as_warn (_("setting incorrect section type for %s"), name); } |