[PATCH] [RESEND] Flush cache after solving TEXTRELs if arch requires it
Kirill A. Shutemov
kirill@shutemov.name
Tue Jun 8 13:32:00 GMT 2010
On Thu, Jun 3, 2010 at 7:39 PM, Kirill A. Shutemov <kirill@shutemov.name> wrote:
> On ARM instruction and data cache is not coherent, so we have to flush
> cache after solving TEXTRELs to be sure that we run correct code.
>
> This is regression introduced by commit f133c097.
>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> ---
> 2010-06-02 Kirill A. Shutemov <kirill@shutemov.name>
>
> * elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch requires it
Any comments?
This patch fixes random crashes on ARM, if the executable or shared
library has TEXTREL.
> ---
> elf/dl-reloc.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
> index 6c00691..01f458f 100644
> --- a/elf/dl-reloc.c
> +++ b/elf/dl-reloc.c
> @@ -307,6 +307,9 @@ _dl_relocate_object (struct link_map *l, struct
> r_scope_elem *scope[],
> goto call_error;
> }
>
> +#ifdef CLEAR_CACHE
> + CLEAR_CACHE (textrels->start, textrels->start + textrels->len);
> +#endif
> textrels = textrels->next;
> }
>
> --
> 1.7.0.6
>
More information about the Libc-alpha
mailing list