From patchwork Mon Oct 31 00:15:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Harmstone X-Patchwork-Id: 13076 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2025686wru; Sun, 30 Oct 2022 17:18:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4D0NB+D+9kTpRn64qAF7MAygjOvCAMyhJMJAEZDhf4ojMh2mKTPqyTqskbLKK6RrmN4gz2 X-Received: by 2002:a05:6402:10c2:b0:45c:3c87:721f with SMTP id p2-20020a05640210c200b0045c3c87721fmr11351030edu.251.1667175490327; Sun, 30 Oct 2022 17:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667175490; cv=none; d=google.com; s=arc-20160816; b=I+TUOsKQtAudxw5CekueT0GFLB9iHI6xf2tX5gZws0ROGatBwJffGcuRpt4LsesXY+ 205KGWp3Ck1OZCLVZrdQld4gXRumhWzRRUD7ummzUnvApvuSLICie42jy/0kHWWEOxG2 O4ATbZu8hhxVAQUmjO1Pw+sdDCN9sxwAwEW7HM3c+7cRymGr0mLJAo3+/lq6kX4utESF VNnpaqSPSPcb8xpXQHDjMnYPCFoGoPe1ZgE/GhnqtfKDEmEPlqXm16gGSIVtO2TCgUFq mgVsMFQNqYTaszvhDw8fLJrODx1XzZfRKPpfu2UBscKraVsFzj5or9fakMiucsmohZ1+ GDIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=nfz8ECdITOaIvBqHx4IwM9ghDrg5aL7at8aUHubhe6Q=; b=UXDbDSqG5Xx2weLCman1CayQAhGz22Idvc7ykgzWHTWfIEwChvoceNIr4NI9vY3ybh 1MAmZXWzQkmOB/dHCY4u0CuKT8UjwXn/+dhC53jLcJ5kpOIUdgAdj4iYX2KCfQErdL8f JNAQi4ACDND8dOH6sIfbGkVCE681ZYaldkhFHpErezvUD6mYR2wnv62GMYEtupQL+U4e ex1Q9HBltRCMwzrxiSyk8sM2/jVN/iJ/IpFNkLk8NxB8WKgTyh4CACPc2fO1zojysqDO kVnZFcbBX15izI58clTPfCOIBgyvBaMcnJjcNlBvW0iNp6M/lXzixz122a67ZgLFhwTy Q4nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=FSTTjbZb; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id nd12-20020a170907628c00b0078d2f0bf546si6947616ejc.186.2022.10.30.17.18.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 17:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=FSTTjbZb; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63F8C385802F for ; Mon, 31 Oct 2022 00:18:09 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id BA91A385800E for ; Mon, 31 Oct 2022 00:16:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA91A385800E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=harmstone.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x432.google.com with SMTP id v1so13832038wrt.11 for ; Sun, 30 Oct 2022 17:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=nfz8ECdITOaIvBqHx4IwM9ghDrg5aL7at8aUHubhe6Q=; b=FSTTjbZby2o1MyHF7Cu+gB4eGp6ymXSOcvf6Sokp6uSUIQCgsawo4HZf+qnKrzEf+v gEmRJo/VHLfqVdR5sjqVB2Cqfc5CHKv/oFmWKsxXjlcNq7f6COQLd9b2Bp0nb2EBfMLH +P56ehJfsQfJ+kmPbSfYdtwqx9X16kuSf1eQWb9QU7UJ8Ymd2MuMikj0l5L/GEqG+Bld b/TmomFIgY4aYwyfYP/G+IgLKhBVRIRDgyPWC7XsN8whQFfd5eXx73HLQ/krbNAebCI9 KmLxeBpwpAdhmrCqCbu/Ogb9D3ZhvjYglhmAVtAKU7TBE0z2Qx5Xn9BXEM89CF/i8lxH YgGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nfz8ECdITOaIvBqHx4IwM9ghDrg5aL7at8aUHubhe6Q=; b=BXmnKZBGSahtCA6hA7Ihlh5/npEEBkV2jmMhk612zOVHdLBN3WCbiPtL9d2qZIhxvf 7Vp6qyeXOBYd3zchL+x6wNmngOEVTCzFkhz2UCYu70I6kWS4fFnCwZD8EWitY2GCmFpg njvp4JpLqTv1preN8U6j8blnh3u7+EagPhtArh+K/NLTxQHNrsZ4eOMljzH6kupVZ4pq 00vHvkobNUhoGzRVOZfK6qpSoqJcDIqM6Bg8hAJ+T2wT5PVY9Z1Fo4+TPeUW7AxkjWNk 9mn7uM1G37OjS2GNHGHAWdB/GEZBocKvEnERBuNIgSaIkg/wMp6esnarA6ztgwLf7Ntr AXZw== X-Gm-Message-State: ACrzQf2qTuEZsmyy/6uSHVw0ohv/wonsiiciZlV6+chzEqm2y7jTkqg4 nLCspXGpFGYjrR/yipp0Eza6WQnmaf4= X-Received: by 2002:a05:6000:10a:b0:236:6a79:f5cf with SMTP id o10-20020a056000010a00b002366a79f5cfmr5974222wrx.470.1667175385167; Sun, 30 Oct 2022 17:16:25 -0700 (PDT) Received: from beren.harmstone.com ([2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f]) by smtp.gmail.com with ESMTPSA id bp21-20020a5d5a95000000b002302dc43d77sm5389067wrb.115.2022.10.30.17.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 17:16:24 -0700 (PDT) From: Mark Harmstone To: binutils@sourceware.org Subject: [PATCH v2 1/3] ld: Use %E in einfo in pdb.c Date: Mon, 31 Oct 2022 00:15:52 +0000 Message-Id: <20221031001554.14615-1-mark@harmstone.com> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Cc: Mark Harmstone Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748160206945846524?= X-GMAIL-MSGID: =?utf-8?q?1748160206945846524?= Resubmission, taking into account https://sourceware.org/pipermail/binutils/2022-October/123948.html. --- ld/pdb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ld/pdb.c b/ld/pdb.c index 3452e2cbe5b..80ed31e257a 100644 --- a/ld/pdb.c +++ b/ld/pdb.c @@ -444,8 +444,7 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid) pdb = bfd_openw (pdb_name, "pdb"); if (!pdb) { - einfo (_("%P: warning: cannot create PDB file: %s\n"), - bfd_errmsg (bfd_get_error ())); + einfo (_("%P: warning: cannot create PDB file: %E\n")); return false; } @@ -454,7 +453,7 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid) if (!create_old_directory_stream (pdb)) { einfo (_("%P: warning: cannot create old directory stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } @@ -463,14 +462,14 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid) if (!info_stream) { einfo (_("%P: warning: cannot create info stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } if (!create_type_stream (pdb)) { einfo (_("%P: warning: cannot create TPI stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } @@ -479,14 +478,14 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid) if (!dbi_stream) { einfo (_("%P: warning: cannot create DBI stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } if (!create_type_stream (pdb)) { einfo (_("%P: warning: cannot create IPI stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } @@ -495,21 +494,21 @@ create_pdb_file (bfd *abfd, const char *pdb_name, const unsigned char *guid) if (!names_stream) { einfo (_("%P: warning: cannot create /names stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } if (!populate_dbi_stream (dbi_stream, abfd)) { einfo (_("%P: warning: cannot populate DBI stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; } if (!populate_info_stream (pdb, info_stream, guid)) { einfo (_("%P: warning: cannot populate info stream " - "in PDB file: %s\n"), bfd_errmsg (bfd_get_error ())); + "in PDB file: %E\n")); goto end; }