From patchwork Fri Jan 5 02:32:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 83345 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1058C385DC05 for ; Fri, 5 Jan 2024 02:33:51 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 3A53738582B9 for ; Fri, 5 Jan 2024 02:32:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A53738582B9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3A53738582B9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1030 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704421980; cv=none; b=M+Gn9RPn6LtYKArSDZwBTAG2h5CIp1sflFNM+iYdMv81JApSr+68xvzaO7+cTj0TBvcEiIMLL+D/ZD7uUNwv/nlXkX6lL128pvtZKAzlzzASrDLhqQxxn7+ljPiWImMm0aBdIRvnF8Sm1fv4SLTskaKKxo5P/XYEjzOgMlV3yOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704421980; c=relaxed/simple; bh=geNSdU9VH3hQXz3ixzQ0gmpQMJyIY6k/8q32sW1wsuM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=l1+rVqGC+Q79F+nmxAPP4bTIxmXnvvlAtdAGM48n8+aRtM2kllq7qw7wQC36qVBnstIqLLKEw7WObErG0EeVNViKLmDgzoRWq8tscgB694QvSiZWuw0vQ6L1sTGMwRJlPvmzhTjaPR6Aztx9ITKfyN5llybsaww/w6j4YmDQ/dM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-28c2b8d6f2aso816283a91.2 for ; Thu, 04 Jan 2024 18:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704421976; x=1705026776; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=R+Zmyamn5lI1Z2z4AygJ5XqryrVzjd/lVh6tX9YI0jU=; b=G4Sqeytuml1bejpYj9UezWD1S7BJHYHwiFoivctx5AuS99YoLQ2LfuBNDLd+JTqWnk gj8tZyR2lYBgZMRpg7KMQO2pPpP16jWdUKdekLLys/V6F/+HTCV8Nr3TObfOP9vZQLcW JmM9V8UJ6VFPxWW5sNtI7qFZXDvBfjZiSyrtqQmyO9ifEqUmcBdm7tr9hKCwvB7DpUJQ opAMwxtRzB6l5ICYsm+mw/4ZkvsAz09N1uexHpMlNtpRSQoD033Yt5VQPZJ9Jn5Te3RI CBLK1vTkTsPi9T3LK34++wHqO/oq4qIgqPhRUcOuxDGUw82/UH1UnlUMeG3lp2bDwNpk uhLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704421976; x=1705026776; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=R+Zmyamn5lI1Z2z4AygJ5XqryrVzjd/lVh6tX9YI0jU=; b=We+JgcHMe7YCV5aROco/UCGKWvBN/SJvntwQ25bZ7i+cbM15GvxUktXCfb2OyKr6rS WunGVIc939G32Xd7EnySGXx8v4auveDP6o+VM/aUVeZySSBW3frQE5S1xq5qamHlffqL FZqEjyECwqKl5ItqK23EjYA6tR9KyBATUvD3WFN/XewLFKDP0bz18QSJ/35MHDTbKD9z 2gvgOIzP0D1GSLyTd76J7pOVjnI8oMv9vp4toF2qfxnsd/ZXtNJAKA8PLZiX4QEXqaxh GUj3Y15QGE+psrTGe7Q+HJcV0rcI2uqLcCrArhtcWZnAlAJhsEM9qr2AHaiNCoWxr137 7ljg== X-Gm-Message-State: AOJu0YzCiT0j4fmINBiuWrKjf8B3ReRZ+kO7sLYdL+1uDnKeYGBeERGk f9JMLi/kVTwOPc8iswDmnKoT05nYClk= X-Google-Smtp-Source: AGHT+IHFkCXhQdcdd0KqxsT16eQV7da93yn4RWcjrVR3HQiXUJ3qltBL8l4x6LrsiF40sjRh3J3sQA== X-Received: by 2002:a17:90a:b007:b0:28c:f52d:4b74 with SMTP id x7-20020a17090ab00700b0028cf52d4b74mr1137091pjq.14.1704421976366; Thu, 04 Jan 2024 18:32:56 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id n5-20020a170902e54500b001d4c316e3e0sm298165plf.113.2024.01.04.18.32.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 18:32:55 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 7FEA31142383; Fri, 5 Jan 2024 13:02:53 +1030 (ACDT) Date: Fri, 5 Jan 2024 13:02:53 +1030 From: Alan Modra To: binutils@sourceware.org Subject: loongarch: 'index' shadows global Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Avoid an error when compiling with older versions of gcc. * elfnn-loongarch.c (loongarch_relax_align): Rename "index" to "sym_index". diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index 2f1c78ab4f8..0987628098e 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -4309,8 +4309,8 @@ loongarch_relax_align (bfd *abfd, asection *sec, { bfd_vma addend, max = 0, alignment = 1; - int index = ELFNN_R_SYM (rel->r_info); - if (index > 0) + int sym_index = ELFNN_R_SYM (rel->r_info); + if (sym_index > 0) { alignment = 1 << (rel->r_addend & 0xff); max = rel->r_addend >> 8;