Linker part of PR16563 fix

Presents .eh_frame input sections to the optimisation machinery in
elf-eh-frame.c in the order they are given by the linker script.

	PR 16563
bfd/
	* elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
	in the order they are mapped to output sections.
ld/
	* ldlang.c (map_head_is_link_order): Rename from
	stripped_excluded_sections.
	(lang_clear_os_map): New function, extracted from..
	(strip_excluded_output_sections): ..here.
	* ldlang.h (lang_clear_os_map): Declare.
	* ldwrite.c (ldwrite): Call lang_clear_os_map.
	* emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
	Likewise.
This commit is contained in:
Alan Modra
2014-08-14 13:49:31 +09:30
parent b879806f2f
commit 18cd5bce47
7 changed files with 128 additions and 61 deletions

View File

@@ -636,6 +636,8 @@ extern void *stat_alloc
(size_t);
extern void strip_excluded_output_sections
(void);
extern void lang_clear_os_map
(void);
extern void dprint_statement
(lang_statement_union_type *, int);
extern void lang_size_sections