Greetings, and thanks so much! Does this work?
> + store_val(where,MASK(32),(s+a-p)); Take care, Jerry James <[email protected]> writes: > On Tue, Sep 23, 2014 at 2:20 PM, Jerry James <[email protected]> wrote: >> I think the patch isn't quite right, because ... > > Indeed, it wasn't. I was trying to write a 32-bit value through a > pointer to a 64-bit value. That accidentally worked on little endian > ppc64, but did not work out so well on big endian ppc64. I stole a > function from h/elf64_sparc_reloc_special.h to produce this patch, > which led to a successful build. > > --- ./h/elf64_ppcle_reloc.h.orig 2014-09-06 09:45:30.000000000 -0600 > +++ ./h/elf64_ppcle_reloc.h 2014-09-23 12:00:00.000000000 -0600 > @@ -22,3 +22,6 @@ > case R_PPC64_TOC: > store_val(where,~0L,toc->st_value); > break; > + case R_PPC64_REL32: > + store_ival((int *)where,~0L,(s+a-p)); > + break; > --- ./h/elf64_ppcle_reloc_special.h.orig 2014-09-06 09:45:30.000000000 -0600 > +++ ./h/elf64_ppcle_reloc_special.h 2014-09-23 12:00:00.000000000 -0600 > @@ -63,3 +63,12 @@ label_got_symbols(void *v1,Shdr *sec1,Sh > return 0; > > } > + > +static int > +store_ival(int *w,ul m,ul v) { > + > + *w=(v&m)|(*w&~m); > + > + return 0; > + > +} > --- ./h/elf64_ppc_reloc.h.orig 2014-09-06 09:45:30.000000000 -0600 > +++ ./h/elf64_ppc_reloc.h 2014-09-23 12:00:00.000000000 -0600 > @@ -17,3 +17,6 @@ > case R_PPC64_TOC: > store_val(where,~0L,toc); > break; > + case R_PPC64_REL32: > + store_ival((int *)where,~0L,(s+a-p)); > + break; > --- ./h/elf64_ppc_reloc_special.h.orig 2014-09-06 09:45:30.000000000 -0600 > +++ ./h/elf64_ppc_reloc_special.h 2014-09-23 12:00:00.000000000 -0600 > @@ -86,3 +86,12 @@ label_got_symbols(void *v1,Shdr *sec1,Sh > return 0; > > } > + > +static int > +store_ival(int *w,ul m,ul v) { > + > + *w=(v&m)|(*w&~m); > + > + return 0; > + > +} > > Regards, -- Camm Maguire [email protected] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gcl-devel
