Re: sparc vs. gcc 4.3

From: Harvey Harrison
Date: Mon Mar 03 2008 - 16:41:23 EST


On Mon, 2008-03-03 at 13:03 -0800, David Miller wrote:
> From: Adrian Bunk <bunk@xxxxxxxxxx>
> Date: Mon, 3 Mar 2008 21:26:51 +0200
>
> > LD arch/sparc/boot/image
> > arch/sparc/kernel/built-in.o:(__ex_table+0x394): undefined reference to `kernel_unaligned_trap_fault'
> ...
> > arch/sparc/kernel/built-in.o:(__ex_table+0x46c): undefined reference to `user_unaligned_trap_fault'
>
> > Does anyone have a clue what's going wrong here?
>
> We hit the same problem a while back on sparc64 too.
>
> GCC can't see how the inline asm is reachable so eliminates it
> entirely. We hide the label inside the inline asm string and call it
> from exception handlers.
>
> The way we fixed this on sparc64 was quite invasive (patch below for
> reference), so I'll try to come up with something simpler.

Could you hide the asm inside an actual function and annotate the
function with __used?

Similar to how the kprobes has a function called kretprobe_trampoline_holder
for their trampoline asm?

arch/x86/kernel/kprobes.c line 584

Cheers,

Harvey


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/