From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1536 invoked by alias); 5 May 2005 05:56:55 -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 325 invoked from network); 5 May 2005 05:56:18 -0000 Received: from unknown (HELO gizmo03ps.bigpond.com) (144.140.71.13) by sourceware.org with SMTP; 5 May 2005 05:56:18 -0000 Received: (qmail 19048 invoked from network); 5 May 2005 05:56:17 -0000 Received: from unknown (HELO psmam02.bigpond.com) (144.135.25.72) by gizmo03ps.bigpond.com with SMTP; 5 May 2005 05:56:17 -0000 Received: from cpe-144-136-167-90.sa.bigpond.net.au ([144.136.167.90]) by psmam02.bigpond.com(MAM REL_3_4_2a 80/70181434) with SMTP id 70181434; Thu, 05 May 2005 15:56:17 +1000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id C0F051A9290; Thu, 5 May 2005 15:26:16 +0930 Date: Thu, 05 May 2005 06:33: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: <20050505055616.GL22611@bubble.grove.modra.org> Mail-Followup-To: "H. J. Lu" , binutils@sources.redhat.com References: <20050504180941.GA9401@lucon.org> <20050505023716.GD22611@bubble.grove.modra.org> <20050505044817.GA18944@lucon.org> <20050505051456.GK22611@bubble.grove.modra.org> <20050505053544.GA19750@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050505053544.GA19750@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-05/txt/msg00145.txt.bz2 On Wed, May 04, 2005 at 10:35:44PM -0700, H. J. Lu wrote: > On Thu, May 05, 2005 at 02:44:56PM +0930, Alan Modra wrote: > > On Wed, May 04, 2005 at 09:48:17PM -0700, H. J. Lu wrote: > > > On Thu, May 05, 2005 at 12:07:17PM +0930, Alan Modra wrote: > > > > 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. > > > > > > I am not sure it will work since the order is quite important. I > > > got many > > > > > > /export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new: > > > tmpdir/ld1: Not enough room for program headers (allocated 2, need 4) > > > /export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new: final link > > > failed: Bad value > > > > Did you find that you needed to run lang_size_sections early as well? > > If so, see emultempl/ppc64elf.em:ppc_before_allocation for what needs to > > be undone. > > Same problem. ldemul_before_allocation is called after > map_input_to_output_sections. I guess it is hard to call > lang_do_assignments before it. Besides, it makes lang_process even > more complicated. I meant for you to call lang_do_assignments, bfd_gc_sections and strip_unused_output_sections from strip_excluded_output_sections. Is that what you're doing? -- Alan Modra IBM OzLabs - Linux Technology Centre