From patchwork Sat Aug 20 08:40:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 1668404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=rOqyxY7p; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M8sXL6BL4z1ygl for ; Sat, 20 Aug 2022 18:40:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 717253858294 for ; Sat, 20 Aug 2022 08:40:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 717253858294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1660984848; bh=cJaRjvz1gtTkJ3hfshIw/L/gU7wBRZLKw0cYFtAR/vI=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=rOqyxY7pAb+jGC6AondmTZmJQQLJOiCbZPcOieGlWm6BigT9Z3GNLlVBdZHXLOfBP r6DJ4azPBtqnHE2cv+rX2u24/gy+jmGlmpGTAYex6ODEfLQ4jN5Rkdwfbszp+XMR+O jRKOZpPfsuIzH0hfE9H1JffNMiAlYVfhVocQQIWA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 53AA73858D28 for ; Sat, 20 Aug 2022 08:40:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 53AA73858D28 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9C4E76692F; Sat, 20 Aug 2022 04:40:29 -0400 (EDT) Message-ID: Subject: [PATCH] LoongArch: Fix dl-machine.h code formatting To: libc-alpha@sourceware.org Date: Sat, 20 Aug 2022 16:40:27 +0800 User-Agent: Evolution 3.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP, GIT_PATCH_0, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xi Ruoyao via Libc-alpha From: Xi Ruoyao Reply-To: Xi Ruoyao Cc: Wang Xuerui , Joseph Myers , caiyinyu Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The case labels with conditional operator is bad formatted (they seem caused by a bug of clang-format). Fix them manually. No functional change. Signed-off-by: Xi Ruoyao --- sysdeps/loongarch/dl-machine.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) @@ -175,18 +174,15 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], break; #ifndef RTLD_BOOTSTRAP - case __WORDSIZE == 64 ? R_LARCH_TLS_DTPMOD64: - R_LARCH_TLS_DTPMOD32: + case __WORDSIZE == 64 ? R_LARCH_TLS_DTPMOD64 : R_LARCH_TLS_DTPMOD32: *addr_field = sym_map->l_tls_modid; break; - case __WORDSIZE == 64 ? R_LARCH_TLS_DTPREL64: - R_LARCH_TLS_DTPREL32: + case __WORDSIZE == 64 ? R_LARCH_TLS_DTPREL64 : R_LARCH_TLS_DTPREL32: *addr_field = TLS_DTPREL_VALUE (sym) + reloc->r_addend; break; - case __WORDSIZE == 64 ? R_LARCH_TLS_TPREL64: - R_LARCH_TLS_TPREL32: + case __WORDSIZE == 64 ? R_LARCH_TLS_TPREL64 : R_LARCH_TLS_TPREL32: CHECK_STATIC_TLS (map, sym_map); *addr_field = TLS_TPREL_VALUE (sym_map, sym) + reloc->r_addend; break; diff --git a/sysdeps/loongarch/dl-machine.h b/sysdeps/loongarch/dl- machine.h index c69c72d0ff..c5286041c0 100644 --- a/sysdeps/loongarch/dl-machine.h +++ b/sysdeps/loongarch/dl-machine.h @@ -166,8 +166,7 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], { case R_LARCH_JUMP_SLOT: - case __WORDSIZE == 64 ? R_LARCH_64: - R_LARCH_32: + case __WORDSIZE == 64 ? R_LARCH_64 : R_LARCH_32: *addr_field = value; break;