From: Namhyung Kim on
2010-08-09 (월), 16:29 +0100, Stuart Menefy:
> Unfortunately these are necessary, although it is nothing to do with linker
> relocation. These functions take a struct pt_regs as a parameter (not a
> pointer), and modify some of the fields of that structure. We needed a way
> to ensure that gcc didn't optimise away those assignments - to gcc
> they appear to be assignments to a local variable, so quite legitimately
> get optimised away. So we used RELOC_HIDE() as a way of doing that.

Oh, I didn't know that. Thank you for the comments.

> A clearer way to do this would be to pass in a struct pt_regs pointer,
> but that would require going via a stub function which loads up the
> pointer.
> Stuart

So is it worth if I'm gonna work on it?

Namhyung Kim

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