From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Tim Abbott <tabbott@ksplice.com>,
Matt Fleming <matt@console-pimps.org>,
linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>,
Michal Marek <mmarek@suse.cz>,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT
Date: Thu, 17 Jun 2010 15:38:24 -0500 [thread overview]
Message-ID: <1276807104.7398.315.camel@mulgrave.site> (raw)
In-Reply-To: <AANLkTink485wn-EaLibaD3Xh7X5RwXM06d6jx3GijD40@mail.gmail.com>
On Thu, 2010-06-17 at 22:19 +0200, Denys Vlasenko wrote:
> >> This is doable in asm, yes. For .bss, we need to not forget about
> >> @nobits too: section .bss.foo,"aw",@nobits
> >
> > That's only for bss ... we have about a handful of such statements and
> > they always use the assembler .bss directive (which doesn't need flags).
> >
> >> > Actually, as I said, that would be .data-
>
> You are right, in assembly we can specify needed attributes.
>
> I am more concerned about C:
>
> arch/x86/include/asm/cache.h:
> #define __read_mostly __attribute__((__section__(".data..read_mostly")))
>
> If we change it to
>
> #define __read_mostly __attribute__((__section__(".data-read_mostly")))
>
> What makes this section have correct attributes?
The fact that we specify it correctly in the sectional gather in the
linker scripts. i.e. we should have a (NOLOAD) type for the
gathered .bss section ... although currently we don't.
The point (for the third time) is that if our linker scripts specify the
sections and attributes absolutely (and correctly) it doesn't matter
what random attributes the .o files pick up. It's only if we miss a
specifier that the linker tries to work it out from the input sections.
That's how we make postfix or any other type of "nonstandard" section
name work.
James
next prev parent reply other threads:[~2010-06-17 20:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1276519112-11649-1-git-send-email-matt@console-pimps.org>
[not found] ` <1276519112-11649-4-git-send-email-matt@console-pimps.org>
2010-06-14 15:20 ` [PATCH 4/5] parisc: Remove *(.text.*) pattern from the linker script James Bottomley
2010-06-14 19:13 ` Matt Fleming
[not found] ` <alpine.DEB.1.10.1006141014360.1432@dr-wily.mit.edu>
[not found] ` <87y6ehxvby.fsf@linux-g6p1.site>
[not found] ` <1276545951.5374.260.camel@mulgrave.site>
[not found] ` <alpine.DEB.1.10.1006141608550.1248@dr-wily.mit.edu>
2010-06-14 23:08 ` [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT James Bottomley
2010-06-15 2:45 ` Tim Abbott
2010-06-16 21:40 ` James Bottomley
2010-06-17 19:11 ` Denys Vlasenko
2010-06-17 19:56 ` James Bottomley
2010-06-17 20:19 ` Denys Vlasenko
2010-06-17 20:38 ` James Bottomley [this message]
[not found] ` <alpine.DEB.1.10.1006141534490.1248@dr-wily.mit.edu>
2010-06-14 23:14 ` James Bottomley
2010-06-15 2:52 ` Tim Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276807104.7398.315.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=mmarek@suse.cz \
--cc=sam@ravnborg.org \
--cc=tabbott@ksplice.com \
--cc=vda.linux@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox