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 [thread overview]
Message-ID: <20230126003820.28482-1-mark@harmstone.com> (raw)
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(-)
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
--
2.39.1
next reply other threads:[~2023-01-26 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 0:38 Mark Harmstone [this message]
2023-01-26 0:38 ` [PATCH 2/2] gas/testsuite: Add -gcodeview test for aarch64-w64-mingw32 Mark Harmstone
2023-01-26 9:29 ` Jan Beulich
2023-01-26 9:26 ` [PATCH 1/2] gas: Add CodeView constant for aarch64 Jan Beulich
2023-01-26 12:41 ` Mark Harmstone
2023-01-26 12:53 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230126003820.28482-1-mark@harmstone.com \
--to=mark@harmstone.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).