Evaluate __start_* and __stop_* symbol PROVIDE expressions early
authorAlan Modra <amodra@gmail.com>
Tue, 27 Oct 2015 01:31:55 +0000 (12:01 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 27 Oct 2015 02:24:59 +0000 (12:54 +1030)
commit321df0656c7557004a232b4ac3d8c354a59de364
tree3aec2b2461c111ac10685f16931e7a7fe5757aae
parentd7f3ff3ea7830389f458be7c5eadb5d4a4e0a90b
Evaluate __start_* and __stop_* symbol PROVIDE expressions early

Makes these symbols defined before bfd_elf_size_dynamic_sections, to
avoid horrible hacks elsewhere.  The exp_fold_tree undefweak change
is necessary to define undefweak symbols early too.  The comment was
wrong.  PROVIDE in fact defines undefweak symbols, via
bfd_elf_record_link_assignment.

PR ld/19175
* ldlang.c (lang_insert_orphan): Evaluate __start_* and __stop_*
symbol PROVIDE expressions.
* ldexp.c (exp_fold_tree_1 <etree_provide>): Define undefweak
references.
ld/ChangeLog
ld/ldexp.c
ld/ldlang.c