From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id A36D838418B1 for ; Tue, 14 Jun 2022 00:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A36D838418B1 Received: by mail-pj1-x1034.google.com with SMTP id gd1so7112681pjb.2 for ; Mon, 13 Jun 2022 17:32:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=lxsOFuJy8/1jxP8H42usFF4UYfr2yOZUX3lkaD4lVGA=; b=f0HZogom35IrbI0o91wP15bmrUzAOLj60IDVpvsihu09c+MrtXtrbchO+ZGskyr4sn LcAGXnCZ3+fKVgVWB/MOs/ZGJ4OmuLzUgeLW4qNaVT8NQU0dZKGYKgiL/MZN7mPUJeMi kCG4Fud98vp9bM3Jh5ca7gRYr0a8bKQRozMdUpcHdVgmwSMMYO3WIiNLGl6vJkyKX/Xh r14uLwar7jwJxbCZm2zzRlDQRHQVtDdouZITfq5O5eUBRY+tcCOiTWMrMhW8cPYmj5Sf ZsA+gYzPxWTJRq7iBStBOt71ZAaZ+/RBCe+r632Sa8ia+r2BXpvC/V6NeitqzYkWTVDO pf3g== X-Gm-Message-State: AJIora/Ii4qqwKfTio0+7mk9eSYmZQlL7LRYVNipfGfqJKmmfmC9PUc8 WFpTrO5WugPxCmTyq0YPPfvmkewtQZ8= X-Google-Smtp-Source: AGRyM1uHtHgyVg/ZysUWwwPbw5rHnE+a5nhi4/TjSO0eoGRPmsJmlmCegpb3jtxOvXnoCaEgBSkgxQ== X-Received: by 2002:a17:90a:a605:b0:1ea:6b4f:915e with SMTP id c5-20020a17090aa60500b001ea6b4f915emr1479444pjq.60.1655166736399; Mon, 13 Jun 2022 17:32:16 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:3a19:868a:3d2b:56cc]) by smtp.gmail.com with ESMTPSA id t4-20020a1709027fc400b00163fa4b7c12sm5740673plb.34.2022.06.13.17.32.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 17:32:15 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id F12BC1140422; Tue, 14 Jun 2022 10:02:12 +0930 (ACST) Date: Tue, 14 Jun 2022 10:02:12 +0930 From: Alan Modra To: binutils@sourceware.org Subject: Correct R_MIPS_16 n32 howto Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3036.3 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.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2022 00:32:18 -0000 If the howto is actually used, an all-zero dst_mask will result in unchanged section contents on attempting to apply R_MIPS_16. * elfn32-mips.c (elf_mips_howto_table_rela ): Correct dst_mask. diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index b74d25f12f7..2027230c651 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -901,7 +901,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] = "R_MIPS_16", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0x0000, /* dst_mask */ + 0x0000ffff, /* dst_mask */ false), /* pcrel_offset */ /* 32 bit relocation. */ -- Alan Modra Australia Development Lab, IBM