Fix indentation in loongarch code, preventing a compile time warning.
authorNick Clifton <nickc@redhat.com>
Tue, 26 Jul 2022 10:33:51 +0000 (11:33 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 26 Jul 2022 10:33:51 +0000 (11:33 +0100)
bfd/ChangeLog
bfd/elfnn-loongarch.c

index b88f33b5e7240d6b994f9e1cc37ad486b088b0b2..acbb8f9e817d55393ea43b95c465ce9c8d3d8c9d 100644 (file)
@@ -1,3 +1,8 @@
+2022-07-26  Nick Clifton  <nickc@redhat.com>
+
+       * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix
+       indentation.
+
 2022-07-08  Nick Clifton  <nickc@redhat.com>
 
        * 2.39 branch created.
index 4efe3d9370c93b8b55b6f4ca9ff56c778cad3026..99d889ae11d4b6fbd143cc8be1bbfd4119c7a7b8 100644 (file)
@@ -3089,19 +3089,17 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          else
            relocation += rel->r_addend;
 
+         relocation &= 0xfff;
+         /* Signed extend.  */
+         relocation = (relocation ^ 0x800) - 0x800;
+
+         /* For 2G jump, generate pcalau12i, jirl.  */
+         /* If use jirl, turns to R_LARCH_B16.  */
+         uint32_t insn = bfd_get (32, input_bfd, contents + rel->r_offset);
+         if ((insn & 0x4c000000) == 0x4c000000)
            {
-             relocation &= 0xfff;
-             /* Signed extend.  */
-             relocation = (relocation ^ 0x800) - 0x800;
-
-             /* For 2G jump, generate pcalau12i, jirl.  */
-             /* If use jirl, turns to R_LARCH_B16.  */
-             uint32_t insn = bfd_get (32, input_bfd, contents + rel->r_offset);
-             if ((insn & 0x4c000000) == 0x4c000000)
-               {
-                 rel->r_info = ELFNN_R_INFO (r_symndx, R_LARCH_B16);
-                 howto = loongarch_elf_rtype_to_howto (input_bfd, R_LARCH_B16);
-               }
+             rel->r_info = ELFNN_R_INFO (r_symndx, R_LARCH_B16);
+             howto = loongarch_elf_rtype_to_howto (input_bfd, R_LARCH_B16);
            }
          break;