Re: [PATCH] lto, watchdog/hpwdt.c: Make assembler label global

From: Andi Kleen
Date: Wed Aug 07 2013 - 00:38:15 EST

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@xxxxxxxxxxxxxx> 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)

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at