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: Tue, 29 Mar 2005 08:12:31 +0930
- Subject: Re: PATCH: PR 797: Alignment in empty section changes the output layout
- References: <20050324003653.GA28321@lucon.org> <20050324220556.GA13985@lucon.org>
On Thu, Mar 24, 2005 at 02:05:56PM -0800, H. J. Lu wrote:
> + So we remove the unused output sections without input sections
> + and the empty unused output sections created by linker, if
> + they don't have any contents. */
Is it possible to do this in strip_excluded_output_sections? You won't
have sizes set at that stage, but linker_has_input will be set, as will
SEC_HAS_CONTENTS from link script data statements. So I think most of
what you're trying to achieve can be done there. SEC_LINKER_CREATED
sections ought to be handled by the backend size_dynamic_sections
function calling _bfd_strip_section_from_output.
--
Alan Modra
IBM OzLabs - Linux Technology Centre