This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [RESEND] Flush cache after solving TEXTRELs if arch requires it


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]