Message ID | 20230126003820.28482-1-mark@harmstone.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp15927wrn; Wed, 25 Jan 2023 16:38:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXsi0ABm3C02WA6RPOAme0qOIWEb+3f8PbCP1rgwZOa5ZRcnb4E/EbfNLDnWbyV1HhZYY88Y X-Received: by 2002:a17:906:3e13:b0:877:839c:bd6c with SMTP id k19-20020a1709063e1300b00877839cbd6cmr25083815eji.71.1674693516690; Wed, 25 Jan 2023 16:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674693516; cv=none; d=google.com; s=arc-20160816; b=QLKJb66X6VRlBkMoatsZAo0R9MTW+q8lBkUW4CBlV019XHLy7p7d8h6BoNOdgHpp17 x2xyMrupNQaOn86oCNoY2LdD10TRtGZ+WlyR3YuSLT6QQB1fBMh8/spE4UWNnkkWsqml W2mAK9AbXPvjus3A70sT9qk8tI1Tjnjz9azUA5zgj9oZrUPwjacsUVuksuzCvudg6Bg2 2Xfwh2URdCn5oTsxEt+TEfFt1zUN7yj+z0ckXM6Wx/P/xgUQg1jjudDNMFQ8SKMtw+sZ ovZWcW4+IFkmuS3MEcXNh5eDBESDsCPhB9w9Q3hhc6caRRhHM9m5xozIBNw7lRsJGefc TBZw== 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=+kFIkZonxc2/lc3LiSQ1B/Iu0NqNl6UgCpDAU/osVRA=; b=nDwVue3x21zdHSiTa6Xrs7DKEGdYOA4PADWldgKM4cBmZVqsoLH9cyszYhx53Wry0/ 5BYbrWI5OvXqj7EtmzxhXEZT81NOj9cIlnlnELD12VXGJFCE9EU9bA28A6Y1rWN+0uFb dT8iAI7urxaxAZ0JAukBuxgGBp6hZJp2oe+3fr2ycUjFKbuKyGabapL0x2iZacaN2EV5 e1d6WwNqxfQ/tVsxc9zM4geAtn+1wDPdo4+tm5XVXU8wZn8LSzrvnkDgizgJx1FnLdo3 JZxrByuXuPNl2JTfYMDApQBWEGq0++2E15irtLPAT9mvPuq5fFLplH8+h0oehGSHxklX Upew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=YKUPOgPY; 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 uj42-20020a170907c9aa00b00870d15ac2d9si8018435ejc.163.2023.01.25.16.38.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 16:38:36 -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=YKUPOgPY; 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 3BF323858C00 for <ouuuleilei@gmail.com>; Thu, 26 Jan 2023 00:38:34 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 0492E3858D28 for <binutils@sourceware.org>; Thu, 26 Jan 2023 00:38:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0492E3858D28 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-x42f.google.com with SMTP id r2so253490wrv.7 for <binutils@sourceware.org>; Wed, 25 Jan 2023 16:38:24 -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=+kFIkZonxc2/lc3LiSQ1B/Iu0NqNl6UgCpDAU/osVRA=; b=YKUPOgPYqJpu8Yzkad8PKMsMqlnq1NdkMIJG0C+7oRnS30K3lWVmNhpyJOr6oK15q5 BKgNrKQZkJsxexm76wsdMolyU8m91wETaqNeQdodhtGQWaSKLTJIWGfc35hQnCsQx48k wISKiDBpuvbqKVWgs5JLoOYXG8AnoFF1avecxGZVY+swC3BpgSPAwuooot6Wqmib+zHz w7FHSFoq6PorRXYJjy2d3WxcYWKCMiaYTr3AId/ucJ4OwoAYonTYyppcQ9iLfLakd/Zq v/g+Ugf8c2iL9em4VF+58StYAPpoElT/V0GyZH3yEZegcuofhHAjJ3VVEetXbvi3U3OC AMhw== 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=+kFIkZonxc2/lc3LiSQ1B/Iu0NqNl6UgCpDAU/osVRA=; b=H4gvVnvWzdmhh7nUc8eT0Kxv88lnY/CS9xm5Qo5Qm/c6n3nep8vX5ZuB6eggxJYP3A B+AyunG2oep3V1qjZBldnWRrZu1Zs3Ns0QIxXpTPxQ6UAdhgswr2tPUSkCuIBHb9WzVc 1O9M4S4iaIkve7Qgt+YgiQ0Wv1z4VIb7/psTbPN8EPcPC2lV0TNpFzodaoPz4rtdtCfp JJcim16tZIHAYCKsTaDpTptpMinYHpjWYOMlJ3VUxP7Fce2TXgkW+L1p3Dk2Am91bUFg ZZvQAH1V6PVWgVvkEpkIT9lYZbuNUEnTkLI5ftNepd8TEUuXPnLKVBdHqOHRhBoWb6bT 2wsQ== X-Gm-Message-State: AFqh2kpYyE5+w5APKu98mcmW6mNEYqXXDHZ1o9+XWMe3g5nPVVp/Ls2t RDiRieojb+ie3XUwF9bhzwvUpD1F6t4= X-Received: by 2002:a5d:6387:0:b0:2bd:ef73:3b6e with SMTP id p7-20020a5d6387000000b002bdef733b6emr29702086wru.35.1674693503366; Wed, 25 Jan 2023 16:38:23 -0800 (PST) Received: from beren.harmstone.com ([2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f]) by smtp.gmail.com with ESMTPSA id t20-20020adfa2d4000000b002bdcce37d31sm6574836wra.99.2023.01.25.16.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 16:38:22 -0800 (PST) From: Mark Harmstone <mark@harmstone.com> To: binutils@sourceware.org Cc: Mark Harmstone <mark@harmstone.com> Subject: [PATCH 1/2] gas: Add CodeView constant for aarch64 Date: Thu, 26 Jan 2023 00:38:19 +0000 Message-Id: <20230126003820.28482-1-mark@harmstone.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 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, KAM_NUMSUBJECT, 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756043428562323716?= X-GMAIL-MSGID: =?utf-8?q?1756043428562323716?= |
Series |
[1/2] gas: Add CodeView constant for aarch64
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Mark Harmstone
Jan. 26, 2023, 12:38 a.m. UTC
Adds the correct constant to the S_COMPILE3 CodeView record when assembling aarch64-w64-mingw32 with the -gcodeview flag. --- gas/codeview.c | 19 +++++++++++++------ gas/codeview.h | 1 + 2 files changed, 14 insertions(+), 6 deletions(-)
Comments
On 26.01.2023 01:38, Mark Harmstone wrote: > Adds the correct constant to the S_COMPILE3 CodeView record when > assembling aarch64-w64-mingw32 with the -gcodeview flag. I'd be happy to approve this, but I'd really like to know where this number is coming from. Web search looks to produce results only for properly outdated or LLVM pages, neither of which can really be taken as a canonical reference for something with MS origin. (I find it particularly interesting that the wikipedia page on CodeView says "Operating system MS-DOS", calling out 386 mode and monochrome monitor support as something noteworthy. Nevertheless at the bottom there is "This page was last edited on 25 December 2022, at 04:29 (UTC).") Jan
Hi Jan, > I'd be happy to approve this, but I'd really like to know where this number > is coming from. Have a look at the top of gas/codeview.h, which includes the URL of the GitHub repository this comes from. > (I find it particularly interesting > that the wikipedia page on CodeView says "Operating system MS-DOS", > calling out 386 mode and monochrome monitor support as something noteworthy. > Nevertheless at the bottom there is "This page was last edited on > 25 December 2022, at 04:29 (UTC).") Yes, CodeView the program is long dead, but its format lives on in the PDBs generated by MSVC. Mark
On 26.01.2023 13:41, Mark Harmstone wrote: > > I'd be happy to approve this, but I'd really like to know where this number > > is coming from. > > Have a look at the top of gas/codeview.h, which includes the URL of the GitHub > repository this comes from. Thanks. Having looked there, the patch is okay to commit. Jan
diff --git a/gas/codeview.c b/gas/codeview.c index 2d96d4467fc..0d5f82848a5 100644 --- a/gas/codeview.c +++ b/gas/codeview.c @@ -286,13 +286,20 @@ write_lines_info (void) static uint16_t target_processor (void) { - if (stdoutput->arch_info->arch != bfd_arch_i386) - return 0; + switch (stdoutput->arch_info->arch) + { + case bfd_arch_i386: + if (stdoutput->arch_info->mach & bfd_mach_x86_64) + return CV_CFL_X64; + else + return CV_CFL_80386; - if (stdoutput->arch_info->mach & bfd_mach_x86_64) - return CV_CFL_X64; - else - return CV_CFL_80386; + case bfd_arch_aarch64: + return CV_CFL_ARM64; + + default: + return 0; + } } /* Write the CodeView symbols, describing the object name and diff --git a/gas/codeview.h b/gas/codeview.h index def2a395748..2a3d8fc15e1 100644 --- a/gas/codeview.h +++ b/gas/codeview.h @@ -38,6 +38,7 @@ #define CV_CFL_80386 0x03 #define CV_CFL_X64 0xD0 +#define CV_CFL_ARM64 0xF6 #define CHKSUM_TYPE_MD5 1