From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18073 invoked by alias); 27 Sep 2005 02:33:35 -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 17976 invoked by uid 22791); 27 Sep 2005 02:33:19 -0000 Received: from omta02ps.mx.bigpond.com (HELO omta02ps.mx.bigpond.com) (144.140.83.154) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 27 Sep 2005 02:33:19 +0000 Received: from grove.modra.org ([144.136.167.90]) by omta02ps.mx.bigpond.com with ESMTP id <20050927023315.XJCF26106.omta02ps.mx.bigpond.com@grove.modra.org>; Tue, 27 Sep 2005 02:33:15 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id 8EF08368A6; Tue, 27 Sep 2005 12:03:15 +0930 (CST) Date: Tue, 27 Sep 2005 09:25:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: binutils@sources.redhat.com Subject: Re: PATCH: Fix empty sections with alignment Message-ID: <20050927023315.GE29044@bubble.grove.modra.org> Mail-Followup-To: "H. J. Lu" , binutils@sources.redhat.com References: <20050926223601.GA28885@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050926223601.GA28885@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-09/txt/msg00292.txt.bz2 On Mon, Sep 26, 2005 at 03:36:01PM -0700, H. J. Lu wrote: > This patch > > http://sourceware.org/ml/binutils/2005-09/msg00215.html > > breaks empty sections with alignment. The patch here works for me. It would be nice if you explained what was broken rather than leaving me to deduce that from your patch. In this case it's simple, but sometimes I'm not clever enough to immediately deduce what you think is broken. Before I OK this patch: Do you know whether any linker scripts depend on an address expression consisting of an ALIGN() being ignored like this? Besides those distributed with binutils, or prerelease linux kernels, I mean. The reason I ask is that I'm not really happy with the direction this patch is leading. We shouldn't be treating an ALIGN() specially. After all, ALIGN(x) as an address is supposed to be eqivalent to ((.+x-1)/x)*x, and people could reasonably expect that both expressions behave the same. Which they won't after your patch. Instead, I think we need some linker script construct that allows us to increase the alignment of an output section over that specified by its input sections, other than using ALIGN() as the address. Perhaps an ALIGN() after the semicolon. lang_enter_output_section_statement already supports an output section alignment. -- Alan Modra IBM OzLabs - Linux Technology Centre