From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19335 invoked by alias); 28 Mar 2005 22:42:40 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 19264 invoked from network); 28 Mar 2005 22:42:33 -0000 Received: from unknown (HELO gizmo06bw.bigpond.com) (144.140.70.41) by sourceware.org with SMTP; 28 Mar 2005 22:42:33 -0000 Received: (qmail 6028 invoked from network); 28 Mar 2005 22:42:31 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo06bw.bigpond.com with SMTP; 28 Mar 2005 22:42:31 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by bwmam12.bigpond.com(MAM REL_3_4_2a 189/41583848) with SMTP id 41583848; Tue, 29 Mar 2005 08:42:31 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 9A059781CE; Tue, 29 Mar 2005 08:12:31 +0930 Date: Tue, 29 Mar 2005 04:21:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: binutils@sources.redhat.com Subject: Re: PATCH: PR 797: Alignment in empty section changes the output layout Message-ID: <20050328224231.GC14407@bubble.modra.org> Mail-Followup-To: "H. J. Lu" , binutils@sources.redhat.com References: <20050324003653.GA28321@lucon.org> <20050324220556.GA13985@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050324220556.GA13985@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00828.txt.bz2 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