From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2124) id 7429C385801B; Tue, 26 Jul 2022 10:34:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7429C385801B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Clifton To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Fix indentation in loongarch code, preventing a compile time warning. X-Act-Checkin: binutils-gdb X-Git-Author: Nick Clifton X-Git-Refname: refs/heads/master X-Git-Oldrev: 6c96b937df01064526470694da9b6d24761e57fc X-Git-Newrev: 27121f6740fa2051609b2d781d77c4cd23aa590b Message-Id: <20220726103415.7429C385801B@sourceware.org> Date: Tue, 26 Jul 2022 10:34:15 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2022 10:34:15 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D27121f6740fa= 2051609b2d781d77c4cd23aa590b commit 27121f6740fa2051609b2d781d77c4cd23aa590b Author: Nick Clifton Date: Tue Jul 26 11:33:51 2022 +0100 Fix indentation in loongarch code, preventing a compile time warning. Diff: --- bfd/ChangeLog | 5 +++++ bfd/elfnn-loongarch.c | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b88f33b5e72..acbb8f9e817 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2022-07-26 Nick Clifton + + * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix + indentation. + 2022-07-08 Nick Clifton =20 * 2.39 branch created. diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index 4efe3d9370c..99d889ae11d 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -3089,19 +3089,17 @@ loongarch_elf_relocate_section (bfd *output_bfd, st= ruct bfd_link_info *info, else relocation +=3D rel->r_addend; =20 + relocation &=3D 0xfff; + /* Signed extend. */ + relocation =3D (relocation ^ 0x800) - 0x800; + + /* For 2G jump, generate pcalau12i, jirl. */ + /* If use jirl, turns to R_LARCH_B16. */ + uint32_t insn =3D bfd_get (32, input_bfd, contents + rel->r_offset); + if ((insn & 0x4c000000) =3D=3D 0x4c000000) { - relocation &=3D 0xfff; - /* Signed extend. */ - relocation =3D (relocation ^ 0x800) - 0x800; - - /* For 2G jump, generate pcalau12i, jirl. */ - /* If use jirl, turns to R_LARCH_B16. */ - uint32_t insn =3D bfd_get (32, input_bfd, contents + rel->r_offset); - if ((insn & 0x4c000000) =3D=3D 0x4c000000) - { - rel->r_info =3D ELFNN_R_INFO (r_symndx, R_LARCH_B16); - howto =3D loongarch_elf_rtype_to_howto (input_bfd, R_LARCH_B16); - } + rel->r_info =3D ELFNN_R_INFO (r_symndx, R_LARCH_B16); + howto =3D loongarch_elf_rtype_to_howto (input_bfd, R_LARCH_B16); } break;