This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: PR 797: Alignment in empty section changes the output layout
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 5 May 2005 12:07:17 +0930
- Subject: Re: PATCH: PR 797: Alignment in empty section changes the output layout
- References: <20050504180941.GA9401@lucon.org>
On Wed, May 04, 2005 at 11:09:41AM -0700, H. J. Lu wrote:
> + if (command_line.relax || !link_info.relocatable)
> + {
> /* Final extra sizing to report errors. */
> lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
> + if (!link_info.relocatable)
> + {
> + lang_mark_used_section ();
> + /* Do it here so that the unused output_sections won't affect
> + memory layout. */
> + strip_unused_output_sections ();
> + }
Can you please look at merging lang_mark_used_section and
strip_unused_output_sections into strip_excluded_output_sections?
I think it should be possible if you call lang_do_assignments before
bfd_gc_sections to ensure that linker script symbols defined inside
output sections are in the hash table.
--
Alan Modra
IBM OzLabs - Linux Technology Centre