public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	wim@iguana.be
Subject: Re: [PATCH] lto, watchdog/hpwdt.c: Make assembler label global
Date: Wed, 7 Aug 2013 06:38:07 +0200	[thread overview]
Message-ID: <20130807043807.GV19750@two.firstfloor.org> (raw)
In-Reply-To: <20130806135118.aa11129d582b8aee00accb8a@linux-foundation.org>

On Tue, Aug 06, 2013 at 01:51:18PM -0700, Andrew Morton wrote:
> On Mon,  5 Aug 2013 15:16:39 -0700 Andi Kleen <andi@firstfloor.org> wrote:
> 
> > We cannot assume that the inline assembler code always ends up
> > in the same file as the original C file.
> 
> um, why not?  You put an asm(".text\n...") into a .c file and you
> expect that assembly code to be emitted into the .s file then assembled
> into the .o file.
> 
> Obviously something somewhere is doing something unexpected.  Much more
> detail needed, please.

Sorry this is an extract from my larger LTO patchkit. I didn't fully
adapt the description.

With LTO (yes Link Time Optimization) the compiler repartitions the
individual definitions into new files, so yes the assembler statement
and the rest of the file can end up separated.

> Also...  what's "lto"?  Link Time Optimization?  It's unclear how this
> fits into that.  Please provide that additional background info in these
> patches so that others know what's going on and so that others (such as
> me) can help people avoid making these mistakes in the future.

I catch them by fixing compiler errors in my whole tree (well not
all, only the ones that happen in my setup)

https://github.com/andikleen/linux-misc/commits/lto-3.11

There's much more there, I'm currently just trying extract
some patches and make my pile smaller.

-Andi

      reply	other threads:[~2013-08-07  4:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 22:16 [PATCH] lto, watchdog/hpwdt.c: Make assembler label global Andi Kleen
2013-08-06 20:51 ` Andrew Morton
2013-08-07  4:38   ` Andi Kleen [this message]

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=20130807043807.GV19750@two.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wim@iguana.be \
    /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