* elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
authorAndreas Jaeger <aj@suse.de>
Mon, 30 Apr 2001 10:30:05 +0000 (10:30 +0000)
committerAndreas Jaeger <aj@suse.de>
Mon, 30 Apr 2001 10:30:05 +0000 (10:30 +0000)
R_X86_64_GOTPCREL, don't use assignments instead of comparisons.

bfd/ChangeLog
bfd/elf64-x86-64.c

index f9cc5e38d807b510a5e879f6cce8faf6c136209c..ab373eaf453b0fb5f179aca9376ea11300947ce2 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
+
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
+       R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
+
 2001-04-27  Andreas Jaeger  <aj@suse.de>
 
        * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
index f23e06cdb13e4d3e24731c16401b2756f61b25f8..a92ba78c8005b495dec0b33c5d7685a507c2614d 100644 (file)
@@ -1250,11 +1250,10 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
              || h->root.type == bfd_link_hash_defweak)
            {
              sec = h->root.u.def.section;
-             if (r_type == R_X86_64_GOTPCREL
-                 || (r_type = R_X86_64_PLT32
-                     && splt != NULL
-                     && h->plt.offset != (bfd_vma) -1)
-                 || (r_type = R_X86_64_GOT32
+             if ((r_type == R_X86_64_PLT32
+                  && splt != NULL
+                  && h->plt.offset != (bfd_vma) -1)
+                 || ((r_type == R_X86_64_GOT32 || r_type == R_X86_64_GOTPCREL)
                      && elf_hash_table (info)->dynamic_sections_created
                      && (!info->shared
                          || (! info->symbolic && h->dynindx != -1)
@@ -1408,6 +1407,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
              else
                relocation = sgot->output_offset + off;
            }
+
          break;
 
        case R_X86_64_PLT32: