PATCH: PR 797: Alignment in empty section changes the output layout

Alan Modra amodra@bigpond.net.au
Tue Mar 29 04:21:00 GMT 2005


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



More information about the Binutils mailing list