[PATCH,SPU] Add new relocation, R_SPU_ADD_PIC
Alan Modra
amodra@bigpond.net.au
Fri Sep 4 06:57:00 GMT 2009
On Thu, Jul 23, 2009 at 04:39:41PM +0930, Alan Modra wrote:
> In your patch rationale, you mentioned dynamic linking support. If
> you'd like to use the right test with dynamic linking in mind, then
> write
> && (h->def_regular || ELF_COMMON_DEF_P (h)))
>
> This change is optional. Patch OK.
Oops, the above had a typo.
* elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.88
diff -u -p -r1.88 elf32-spu.c
--- bfd/elf32-spu.c 5 Aug 2009 20:40:33 -0000 1.88
+++ bfd/elf32-spu.c 4 Sep 2009 06:49:49 -0000
@@ -4906,8 +4906,9 @@ spu_elf_relocate_section (bfd *output_bf
continue;
/* Change "a rt,ra,rb" to "ai rt,ra,0". */
- if (r_type == R_SPU_ADD_PIC && h != NULL
- && (h->def_regular || ELF_COMMON_DEF_P (h)))
+ if (r_type == R_SPU_ADD_PIC
+ && h != NULL
+ && !(h->def_regular || ELF_COMMON_DEF_P (h)))
{
bfd_byte *loc = contents + rel->r_offset;
loc[0] = 0x1c;
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list