This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] ppc32 dl-machine.c
- From: Anton Blanchard <anton at samba dot org>
- To: Steve Munroe <sjmunroe at vnet dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com, geoffk at geoffk dot org, roland at frob dot com
- Date: Wed, 25 Sep 2002 12:49:02 +1000
- Subject: Re: [PATCH] ppc32 dl-machine.c
- References: <200209242249.g8OMnGE11062@brule.rchland.ibm.com>
> Back in July, Anton Blanchard reported a bug in dl-machine.c
> (__elf_machine_runtime_setup) asserting that the loader must "icbi"
> (Instruction Cache Block Invalidate) the entire PLT range after it is
> initialized.
>
> http://sources.redhat.com/ml/libc-alpha/2002-07/msg00166.html
>
> Anton and Geoff Keating debated this back and forth for a while but I believe
> the conclusion was that this is required based on the rationale in:
>
> http://sources.redhat.com/ml/libc-alpha/2002-07/msg00180.html
>
> I believe the discussion ended with Geoff expecting a patch from Anton.
> But on examination of the the current CVS it seems Anton forgot. I discussed
> this with Anton and offered to create the patch myself which is attached.
Looks good, except we should have a sync between dcbst and icbi. This
patch applies on top of the last.
Anton
--- glibc-2.2.94/sysdeps/powerpc/powerpc32/dl-machine.c.sm 2002-09-25 09:51:57.000000000 +1000
+++ glibc-2.2.94/sysdeps/powerpc/powerpc32/dl-machine.c 2002-09-25 10:01:05.000000000 +1000
@@ -324,13 +324,15 @@
size_modified = lazy ? rel_offset_words : 6;
for (i = 0; i < size_modified; i += words_per_line)
- {
- PPC_DCBST (plt + i);
- PPC_ICBI (plt + i);
- }
+ PPC_DCBST (plt + i);
PPC_DCBST (plt + size_modified - 1);
+
PPC_SYNC;
+
+ for (i = 0; i < size_modified; i += words_per_line)
+ PPC_ICBI (plt + i);
PPC_ICBI (plt + size_modified - 1);
+
PPC_ISYNC;
}