From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH 6/6] x86: bring "gas --help" output for --32 etc in sync with reality
Date: Thu, 17 Jun 2021 07:48:02 -0700 [thread overview]
Message-ID: <CAMe9rOqU87H4=K2ius51uFjHQjL7LcK3gPpiLraXGZM8U0J1qA@mail.gmail.com> (raw)
In-Reply-To: <8022ee5b-9663-94c4-a81e-3219a439545a@suse.com>
On Mon, Jun 14, 2021 at 3:26 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> The testsuite uses the output to determine whether BFD64 is in effect.
>
> --x32 is supported for ELF only; don't advertise it for PE/COFF. --64 is
> also supported for Mach-O; advertise it. Adjust the testsuite's BFD64
> check accordingly.
>
> Also replace "code" by "object", since it's the object format that the
> options primarily control. It's also _initial_ code bitness, but this
> can be changed by directives.
>
> gas/
> 2021-06-XX Jan Beulich <jbeulich@suse.com>
>
> * config/tc-i386.c (md_show_usage): Split ELF and PE/COFF parts
> of object format controlling option. Add Mach-O to the latter.
> * testsuite/gas/i386/i386.exp (gas_bfd64_check): Adjust
> accordingly.
>
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -13719,10 +13719,14 @@ md_show_usage (FILE *stream)
> fprintf (stream, _("\
> -s ignored\n"));
> #endif
> -#if defined BFD64 && (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
> - || defined (TE_PE) || defined (TE_PEP))
> +#ifdef BFD64
> +# if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
> fprintf (stream, _("\
> - --32/--64/--x32 generate 32bit/64bit/x32 code\n"));
> + --32/--64/--x32 generate 32bit/64bit/x32 object\n"));
> +# elif defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O)
> + fprintf (stream, _("\
> + --32/--64 generate 32bit/64bit object\n"));
> +# endif
> #endif
> #ifdef SVR4_COMMENT_CHARS
> fprintf (stream, _("\
> --- a/gas/testsuite/gas/i386/i386.exp
> +++ b/gas/testsuite/gas/i386/i386.exp
> @@ -41,7 +41,7 @@ proc gas_bfd64_check { } {
> global AS
>
> set status [gas_host_run "$AS --help" ""]
> - return [regexp "32bit/64bit/x32" [lindex $status 1]];
> + return [regexp "32bit/64bit" [lindex $status 1]];
> }
>
> if [gas_32_check] then {
>
OK.
Thanks.
--
H.J.
next prev parent reply other threads:[~2021-06-17 14:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 10:23 [PATCH 0/6] x86: further value overflow diagnostic adjustments Jan Beulich
2021-06-14 10:24 ` [PATCH 1/6] x86: off-by-1 in offset_in_range() Jan Beulich
2021-06-17 14:40 ` H.J. Lu
2021-06-18 10:48 ` Jan Beulich
2021-06-14 10:25 ` [PATCH 2/6] x86: make offset_in_range()'s warning contents useful (again) Jan Beulich
2021-06-17 14:40 ` H.J. Lu
2021-06-14 10:25 ` [PATCH 3/6] x86: harmonize disp with imm handling Jan Beulich
2021-06-17 14:46 ` H.J. Lu
2021-06-17 14:57 ` Jan Beulich
2021-06-17 16:00 ` H.J. Lu
2021-06-17 16:05 ` Jan Beulich
2021-06-17 16:12 ` H.J. Lu
2021-06-18 9:03 ` Jan Beulich
2021-06-18 14:12 ` H.J. Lu
2021-06-18 14:52 ` Jan Beulich
2021-06-18 15:41 ` H.J. Lu
2021-06-21 6:36 ` Jan Beulich
2021-06-21 13:26 ` H.J. Lu
2021-06-21 15:05 ` Jan Beulich
2021-06-22 13:22 ` Michael Matz
2021-06-22 14:01 ` H.J. Lu
2021-06-22 14:32 ` Jan Beulich
2021-06-22 14:35 ` Michael Matz
2021-06-14 10:26 ` [PATCH 4/6] x86: slightly simplify offset_in_range() Jan Beulich
2021-06-17 14:46 ` H.J. Lu
2021-06-14 10:26 ` [PATCH 5/6] x86: simplify .dispNN setting Jan Beulich
2021-06-17 14:47 ` H.J. Lu
2021-06-14 10:26 ` [PATCH 6/6] x86: bring "gas --help" output for --32 etc in sync with reality Jan Beulich
2021-06-17 14:48 ` H.J. Lu [this message]
2021-06-14 14:41 ` [PATCH 0/6] x86: further value overflow diagnostic adjustments H.J. Lu
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='CAMe9rOqU87H4=K2ius51uFjHQjL7LcK3gPpiLraXGZM8U0J1qA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
/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).