This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld output_section_statment related tidy


Alan Modra <amodra@bigpond.net.au> writes:

> 	* ldlang.h (lang_output_section_find): Define.
> 	(lang_output_section_statement_lookup): Update prototype.
> 	* ldlang.c (lang_output_section_find,
> 	lang_output_section_statement_lookup_1): Merge into..
> 	(lang_output_section_statement_lookup): ..here.  Update all callers.
> 	(process_insert_statements): Set constraint negative
> 	for output section statements we might be inserting.  Make error
> 	fatal on not finding insertion section.
> 	(lang_output_section_find): Rather than comparing
> 	output_section_statement.constraint against -1, test whether
> 	it is postive.
> 	(lang_output_section_statement_lookup_1): Likewise.
> 	(output_prev_sec_find, strip_excluded_output_sections): Likewise.

This is causing the linker to crash in bfd_elf_final_link when trying to
iterate over map_head.link_order, because strip_excluded_output_sections
no long clears out this field from all sections and leaves the previous
value in it which is still a bfd_section, not a bfd_link_order.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]