OSDN Git Service

Add SORT_BY_INIT_PRIORITY.
authorhjl <hjl>
Wed, 15 Dec 2010 23:56:35 +0000 (23:56 +0000)
committerhjl <hjl>
Wed, 15 Dec 2010 23:56:35 +0000 (23:56 +0000)
commitc11c9e89f1e05e8fb8ab70e668b0a07aea2a1632
tree0f4ef15b01584ed26f7a6252c9b8757673bf1b6a
parent7d8ec6cbb75899a58a46dbb9e39e8696815d3f3f
Add SORT_BY_INIT_PRIORITY.

bfd/

2010-12-15  H.J. Lu  <hongjiu.lu@intel.com>

* elf.c (_bfd_elf_new_section_hook): Special handling for
.init_array/.fini_array output sections.

ld/

2010-12-15  H.J. Lu  <hongjiu.lu@intel.com>

* Makefile.am (GENSCRIPTS): Add @enable_initfini_array@.

* NEWS: Mention SORT_BY_INIT_PRIORITY.

* configure.in: Add AC_CANONICAL_BUILD.
Add --enable-initfini-array.

* genscripts.sh (ENABLE_INITFINI_ARRAY): New.

* ld.h (sort_type): Add by_init_priority.

* ld.texinfo: Document SORT_BY_INIT_PRIORITY.

* ldgram.y (SORT_BY_INIT_PRIORITY): New.
(wildcard_spec): Handle SORT_BY_INIT_PRIORITY.

* ldlang.c (get_init_priority): New.
(compare_section): Use get_init_priority for by_init_priority.

* ldlex.l (SORT_BY_INIT_PRIORITY): New.

* scripttempl/elf.sc: Support ENABLE_INITFINI_ARRAY.

* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* config.in: Likewise.
* configure: Likewise.

ld/testsuite/

2010-12-15  H.J. Lu  <hongjiu.lu@intel.com>

* ld-elf/elf.exp (array_tests): Add init-mixed.
(array_tests_static): Likewise.
Also delete tmpdir/init-mixed.

* ld-elf/init-mixed.c: New.
* ld-elf/init-mixed.out: Likewise.
20 files changed:
bfd/ChangeLog
bfd/elf.c
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/NEWS
ld/config.in
ld/configure
ld/configure.in
ld/genscripts.sh
ld/ld.h
ld/ld.texinfo
ld/ldgram.y
ld/ldlang.c
ld/ldlex.l
ld/scripttempl/elf.sc
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/init-mixed.c [new file with mode: 0644]
ld/testsuite/ld-elf/init-mixed.out [new file with mode: 0644]