This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld output_section_statment related tidy
- From: Andreas Schwab <schwab at suse dot de>
- To: binutils <binutils at sourceware dot org>
- Date: Thu, 12 Feb 2009 17:21:58 +0100
- Subject: Re: ld output_section_statment related tidy
- References: <48B41673.4020106@linux.intel.com> <48B41919.6080800@redhat.com> <48B42354.50306@linux.intel.com> <48B42A54.4020809@redhat.com> <48B42B90.9070709@linux.intel.com> <48B43034.9070204@redhat.com> <48B43287.7030808@linux.intel.com> <20080826191933.GA7838@caradoc.them.org> <6dc9ffc80808261245y30d8b0e8u8c5cdaffada33aac@mail.gmail.com> <20080827002101.GA4989@bubble.grove.modra.org> <20080907040432.GB4700@bubble.grove.modra.org>
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."