From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20134 invoked by alias); 27 Sep 2005 15:04:14 -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 20092 invoked by uid 22791); 27 Sep 2005 15:04:08 -0000 Received: from smtp113.sbc.mail.mud.yahoo.com (HELO smtp113.sbc.mail.mud.yahoo.com) (68.142.198.212) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Tue, 27 Sep 2005 15:04:08 +0000 Received: (qmail 25850 invoked from network); 27 Sep 2005 15:04:07 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@67.122.69.173 with login) by smtp113.sbc.mail.mud.yahoo.com with SMTP; 27 Sep 2005 15:04:06 -0000 Received: by lucon.org (Postfix, from userid 1000) id A0C8A653D8; Tue, 27 Sep 2005 08:04:05 -0700 (PDT) Date: Tue, 27 Sep 2005 18:34:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: Re: PATCH: Fix empty sections with alignment Message-ID: <20050927150405.GA10788@lucon.org> References: <20050926223601.GA28885@lucon.org> <20050927023315.GE29044@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050927023315.GE29044@bubble.grove.modra.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-09/txt/msg00301.txt.bz2 On Tue, Sep 27, 2005 at 12:03:15PM +0930, Alan Modra wrote: > 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 Yes, I do. That is how I noticed it. I am working for a sharable memory project for clusters where the output sharable memory section should be page aligned. > 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. I will look into it. H.J.