lkml.org 
[lkml]   [2010]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sh: remove RELOC_HIDE on exception handlers and syscall routines
From
Date
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?


--
Regards,
Namhyung Kim


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

\
 
 \ /
  Last update: 2010-08-10 05:13    [from the cache]
©2003-2011 Jasper Spaans