lkml.org 
[lkml]   [2013]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lto, watchdog/hpwdt.c: Make assembler label global
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


\
 
 \ /
  Last update: 2013-08-07 07:01    [W:0.171 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site