mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Tesarik <ptesarik@suse.cz>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <andi@firstfloor.org>,
	Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH v2 0/8] clean up vdso-layout.lds.S
Date: Tue, 16 Jun 2009 09:53:12 +0200	[thread overview]
Message-ID: <1245138792.17481.138.camel@nathan.suse.cz> (raw)
In-Reply-To: <4A3693F8.6000209@zytor.com>

H. Peter Anvin píše v Po 15. 06. 2009 v 11:33 -0700:
> Petr Tesarik wrote:
> >>>
> >> *(COMMON) is BSS, not data...
> > 
> > Very true, but for the vDSO we decided to put both writeable and
> > read-only data into one section (called .data for that matter), probably
> > to reduce the number of sections and hence also the size of the
> > resulting binary.
> > 
> 
> BSS is neither,

Right. My typing was once again faster than my thinking. I meant
initialized vs. uninitialized, of course.

>  but I guess for the vDSO there really isn't any such
> thing as uninitialized content.

Right, too. I can't even think of a valid use case, so .broken might be
the right place for both COMMON and .bss.

> I have to admit feeling funny about that, and I'm wondering if we
> shouldn't compile the vDSO with -fno-common.

Oops, sorry. It's already compiled with -fno-common, because it gets
inherited from the top-level Makefile's KBUILD_CFLAGS. Sorry for the
noise.

Anyway, my feeling is that the whole discussion is a bit academic. If I
want to be rigorous, I should take an opt-in approach, i.e. handle all
sections that work fine (e.g. also debugging sections) and then put all
else into .broken with something like:

.broken {
	/* All else is dubious. */
	*(*)
}

But this can become a maintenance PITA. Whenever GCC and/or binutils add
a new extension, the linker script would have to be adjusted
accordingly. Well, maybe that's even correct, because somebody at least
stops and thinks for a while about the implications of the new feature.
But I'm not really offering to become the new maintainer of this file.

Comments?

Petr Tesarik



  reply	other threads:[~2009-06-16  7:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12 13:40 Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 1/8] x86: Adjust the coding style of vdso-layout.lds.S Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 2/8] x86: Remove .sdata from the vDSO linker script Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 3/8] x86: Remove .dynbss " Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 4/8] x86: add .broken section to " Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 5/8] x86: mark altinstr-related sections in vDSO as broken Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 6/8] x86: mark some standard sections as broken in a vDSO Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 7/8] x86: check the size of GOT in vDSO Petr Tesarik
2009-06-12 13:40 ` [PATCH v2 8/8] x86: remove unneeded section from the vDSO Petr Tesarik
2009-06-12 18:06 ` [PATCH v2 0/8] clean up vdso-layout.lds.S Sam Ravnborg
2009-06-15 15:16   ` Petr Tesarik
2009-06-15 15:27     ` Petr Tesarik
2009-06-15 16:51       ` H. Peter Anvin
2009-06-15 17:45         ` Petr Tesarik
2009-06-15 18:33           ` H. Peter Anvin
2009-06-16  7:53             ` Petr Tesarik [this message]
2009-06-16 10:12   ` Petr Tesarik
2009-06-16 10:22     ` Roland McGrath
2009-06-16  8:40 ` Roland McGrath
2009-06-16  9:55   ` Petr Tesarik
2009-06-16 10:34     ` Roland McGrath

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=1245138792.17481.138.camel@nathan.suse.cz \
    --to=ptesarik@suse.cz \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roland@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®