[Cbe-oss-dev] [PATCH] libspe2: Extended __ea support
Kazunori Asayama
asayama at sm.sony.co.jp
Sat Apr 12 00:47:03 EST 2008
Alan Modra wrote:
> + if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU32)) {
> + Elf32_Word *loc = reloc_base + r->r_offset;
> + Elf32_Word v = (Elf32_Word)(long)start + r->r_addend;
> + /* Don't dirty pages unnecessarily. */
> + if (*loc != v)
> + *loc = v;
IIRC, ELF images are embedded in the .rodata section.
Is this write operation possible when the SPU ELF image is embedded in
the PPU program?
> + DEBUG_PRINTF("PPU32(%p) = %#x\n", loc, v);
> + } else if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU32)) {
I guess that this line should be:
+ } else if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU64)) {
Right?
> + Elf64_Xword *loc = reloc_base + r->r_offset;
> + Elf64_Xword v = (Elf64_Xword)(long)start + r->r_addend;
> + if (*loc != v)
> + *loc = v;
> + DEBUG_PRINTF("PPU64(%p) = %#llx\n", loc, v);
> + }
> +
--
(ASAYAMA Kazunori
(asayama at sm.sony.co.jp))
t
More information about the cbe-oss-dev
mailing list