* elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
authorAlan Modra <amodra@gmail.com>
Fri, 4 Sep 2009 06:54:12 +0000 (06:54 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 4 Sep 2009 06:54:12 +0000 (06:54 +0000)
bfd/ChangeLog
bfd/elf32-spu.c

index 954edf30b8900afeb27740378978db67cb65ab9a..8a26fa4efe926a0e238f52c4cdf1b43d5dbf658d 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
+
 2009-09-04  Jie Zhang  <jie.zhang@analog.com>
 
        * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
index 16f945045482836d66458a987e2886508ab46fe8..13d3a5310437704508b6bbfd6b4590f2ff5ce248 100644 (file)
@@ -4906,8 +4906,9 @@ spu_elf_relocate_section (bfd *output_bfd,
        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;