From patchwork Wed Nov 23 19:43:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Harmstone X-Patchwork-Id: 25150 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2990594wrr; Wed, 23 Nov 2022 11:44:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6HUOc0Mn8Tsh6hrZnx2Yd/4Cb3WOU6si6Fcyv3BGBot/0sCN8GiKl9dUiCo7Kh4w03W6Cd X-Received: by 2002:a17:906:3ad6:b0:7ae:40b7:7fbe with SMTP id z22-20020a1709063ad600b007ae40b77fbemr23954977ejd.371.1669232646598; Wed, 23 Nov 2022 11:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232646; cv=none; d=google.com; s=arc-20160816; b=WehgcFpoMUcrmcD+TvOAkHEaeldEzO47B8Xl6ZKIT6b3+oU2Xk7gGlxgt01ApKfRNq RUjVdCrD5fmC7cTFh67N8eWxCR0Ol7jMu2w9P0NYDEyMoZTrSYZIrFzrahYQPwWbB1gS W/HU4dOUYtRB9KYOXQdzbd15/6EqJ/g2kUt4VTKy5FBRHC8TyfwFP64BbUfi1b0S6yOs +xDT758SxMz3SPN2uXS7ra+k9/+4E5IEvqPd1zcc0OUQ4pNlik8JEAIybkLp9WyXsW49 ji9XrIM1GHrp7j5PwCp6QDZQEb11kzJEOnWdKx8A8EUkiyLas75AlNb7+6p/msrTw3Pu RYzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=0diRIu/1dlN6ExoE0rMY5Gq3mMwWjJYNhsjFczjdV2A=; b=kf5gNUw4hRiHd1m4z6iiqFO+0OQY6couG8azySZdZSwGmDbO44SC7UCBp+frzErFWo F4AfWPj//jFGhktRoXcphUVDC5gcu2y3XPe2CMZvNDJ9W5Jv7aER4ERGXtuHsuB8Mw5Z VgQgPkC8PZuAXZRwV0qLqKoRUMT81/HHkcQErT9UALGC3m0VFg30hY1TLDA+KnzMGIzH CQ8MJ084CSUen0qIGfQjCqpNzwY1m62dhbcn/2ECAu1+vYjSfAzmcC0sQtasmCed1rIh P9t5BZl4r83VusMy+ByM1aN8buStQZ+jrRGzttAk4woqRFLw4JCrfilRaLZ+NuTAq0QZ nKtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=P3ER9vML; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id q18-20020a056402519200b0045a1dbedd92si11064475edd.35.2022.11.23.11.44.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=P3ER9vML; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 71F9B384F6C8 for ; Wed, 23 Nov 2022 19:44:05 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id F1A9A3861C4D for ; Wed, 23 Nov 2022 19:43:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F1A9A3861C4D 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-wm1-x336.google.com with SMTP id o7-20020a05600c510700b003cffc0b3374so2070387wms.0 for ; Wed, 23 Nov 2022 11:43:35 -0800 (PST) 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=0diRIu/1dlN6ExoE0rMY5Gq3mMwWjJYNhsjFczjdV2A=; b=P3ER9vMLWjm9U6N3dZtdZAWE5xIlpnFEbDdqdZQJOE+OuWraGh/mvk1dWPcXiev3ng sb0OkjZm0QgkIzO9QolpVWxBnDG98uBHhPG6SrfVVe7u1+gR3FPI+1XJvCRtAzcow3oK 9D+B80tm28ACJVTOdOL4I+uRqnYJLZZYXJEE8/GsPCX84FpdzqwYD7g2RRJMmZuIm7vI 5ZSQNcuxKyHCm1IgsretX4hG/4TwuOFEQgsNez86kXUUftF6l9Nk5A7t5FJF+H+0A/Cl MnzTc7NgSCQgh6GDffICkTs4zLnTjv4po/RrtqYx+IHNakuQaymZruoA9wl4zaq8sSQl T1jw== 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=0diRIu/1dlN6ExoE0rMY5Gq3mMwWjJYNhsjFczjdV2A=; b=hJVSJ1i/i9DzJj/c7lZz7WddRvFPeT7msg5dLp1pFFftPizeJ1Ye0uSYBS3vXQUnNW 0HtN6xA46B/Mwwi6rmd1uM08sdgwOS6ToaCQVw/+jsC3ZkWEdaQlIS1IDdcfvNo0aMwh Wi5rnU0wlhZHuiGnYi49YblQVKhbf0/VvufIB1+qLdDWEdrMdqdGBxUYNat5twbHVumS lzsxOazMsCRVvWIDDdcIEMkQgGoSCMIC+0lj4doo75DbjsCBieeiqSdJaeW58teCJMI9 1800G8bLSyxRUvKygKAojziT5VYUevmGEiAXkit2jIfrzkMDjn5Ce9zmNO0jLMaVo32l idrg== X-Gm-Message-State: ANoB5pk/GL2wbBk6pKs+z7dXo1MrY3dQuvsqNCz4UQpp7GVe8UnwYF2Z 4B0yIBH0QC+FHebYzYpKwC6icn2undg= X-Received: by 2002:a7b:cd81:0:b0:3d0:21f6:43e2 with SMTP id y1-20020a7bcd81000000b003d021f643e2mr10822909wmj.83.1669232614127; Wed, 23 Nov 2022 11:43:34 -0800 (PST) Received: from beren.harmstone.com ([2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f]) by smtp.gmail.com with ESMTPSA id h20-20020a05600c351400b003c6cd82596esm3772216wmq.43.2022.11.23.11.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:43:33 -0800 (PST) From: Mark Harmstone To: binutils@sourceware.org Cc: Mark Harmstone Subject: [PATCH] gas: Disable --gcodeview on PE targets with no O_secrel Date: Wed, 23 Nov 2022 19:43:30 +0000 Message-Id: <20221123194330.21185-1-mark@harmstone.com> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 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: , 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?1750317291262550012?= X-GMAIL-MSGID: =?utf-8?q?1750317291262550012?= As per https://sourceware.org/pipermail/binutils/2022-November/124611.html --- gas/as.c | 6 +++--- gas/codeview.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gas/as.c b/gas/as.c index 74ffa71925f..e49b1f0a796 100644 --- a/gas/as.c +++ b/gas/as.c @@ -334,7 +334,7 @@ Options:\n\ --gdwarf-cie-version= generate version 1, 3 or 4 DWARF CIEs\n")); fprintf (stream, _("\ --gdwarf-sections generate per-function section names for DWARF line information\n")); -#ifdef TE_PE +#if defined (TE_PE) && defined (O_secrel) fprintf (stream, _("\ --gcodeview generate CodeView debugging information\n")); #endif @@ -551,7 +551,7 @@ parse_args (int * pargc, char *** pargv) ,{"gdwarf2", no_argument, NULL, OPTION_GDWARF_2} ,{"gdwarf-sections", no_argument, NULL, OPTION_GDWARF_SECTIONS} ,{"gdwarf-cie-version", required_argument, NULL, OPTION_GDWARF_CIE_VERSION} -#ifdef TE_PE +#if defined (TE_PE) && defined (O_secrel) ,{"gcodeview", no_argument, NULL, OPTION_GCODEVIEW} #endif ,{"gen-debug", no_argument, NULL, 'g'} @@ -879,7 +879,7 @@ This program has absolutely no warranty.\n")); flag_dwarf_sections = true; break; -#ifdef TE_PE +#if defined (TE_PE) && defined (O_secrel) case OPTION_GCODEVIEW: debug_type = DEBUG_CODEVIEW; break; diff --git a/gas/codeview.c b/gas/codeview.c index da7145659f5..13f1a3a3223 100644 --- a/gas/codeview.c +++ b/gas/codeview.c @@ -24,7 +24,7 @@ #include "filenames.h" #include "md5.h" -#ifdef TE_PE +#if defined (TE_PE) && defined (O_secrel) #define NUM_MD5_BYTES 16 @@ -538,4 +538,4 @@ codeview_generate_asm_lineno (void) { } -#endif /* TE_PE */ +#endif /* TE_PE && O_secrel */