[Top] [All Lists]

Re: [PATCH v2 1/6] Add new macros for page-aligned data and bss sections

To: Tim Abbott <tabbott@MIT.EDU>
Subject: Re: [PATCH v2 1/6] Add new macros for page-aligned data and bss sections.
From: "H. Peter Anvin" <>
Date: Fri, 01 May 2009 09:33:13 -0700
Cc: Sam Ravnborg <>, Linux kernel mailing list <>, Anders Kaseorg <andersk@MIT.EDU>, Waseem Daher <wdaher@MIT.EDU>, Denys Vlasenko <>, Jeff Arnold <jbarnold@MIT.EDU>, Benjamin Herrenschmidt <>, Bryan Wu <>, Chris Zankel <>, Cyrill Gorcunov <>, David Howells <>, "David S. Miller" <>,, Geert Uytterhoeven <>, Greg Ungerer <>, Haavard Skinnemoen <>, Heiko Carstens <>, Helge Deller <>, Hirokazu Takata <>, Ingo Molnar <>, Jeff Dike <>, Jesper Nilsson <>, Kyle McMartin <>, Linus Torvalds <>,,,,,,,,, Martin Schwidefsky <>, Michal Simek <>,, Mikael Starvik <>, Paul Mackerras <>, Paul Mundt <>, Ralf Baechle <>, Richard Henderson <>, Roman Zippel <>, Russell King <>,, Thomas Gleixner <>, Tony Luck <>,,, Yoshinori Sato <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Thunderbird (X11/20080501)
Tim Abbott wrote:
> On Fri, 1 May 2009, Sam Ravnborg wrote:
>> On Thu, Apr 30, 2009 at 03:54:08PM -0400, Tim Abbott wrote:
>>> +#define __PAGE_ALIGNED_DATA        .section ".data.page_aligned", "aw", 
>>> @progbits
>>> +#define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw", @nobits
>> It is my understanding that the linker will automatically
>> assume nobits for section names starting with .bss and likewise
>> progbits for section names starting with .data - so we can leave them out?
> I believe that is correct.

... but that doesn't mean it's the right thing to do.

It's better to be fully explicit when macroizing this kind of stuff.
This is part of why macroizing it is good: it means we end up with *one*
place that determines this stuff, not some magic heuristics in the linker.


H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

<Prev in Thread] Current Thread [Next in Thread>