[PATCH] x86: cover a.out in recently added tests

H.J. Lu hjl.tools@gmail.com
Thu Jun 10 13:34:24 GMT 2021


On Thu, Jun 10, 2021 at 12:09 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 09.06.2021 21:10, H.J. Lu wrote:
> > On Wed, Jun 9, 2021 at 6:32 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 08.06.2021 09:58, Jan Beulich via Binutils wrote:
> >>> Follow the pattern found elsewhere when relocations are involved. For
> >>> wrap32-data also drop a mistakenly left "ELF" from the test name. (Note
> >>> that Darwin, for which the wrap32 tests are also failing, is left as-is,
> >>> for there being numerous other failures already anyway, and it hence
> >>> being questionable whether that target is actually properly maintained.)
> >>>
> >>> gas/
> >>> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>
> >>>
> >>>       * testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:
> >>>       Adjust expectations.
> >>>       * testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.
> >>
> >> Despite this change I've just now noticed that on a 64-bit build
> >> host (i.e. with BFD64 implicitly in use) ...
> >>
> >>> --- a/gas/testsuite/gas/i386/wrap32-data.d
> >>> +++ b/gas/testsuite/gas/i386/wrap32-data.d
> >>
> >> ... this and ...
> >>
> >>> --- a/gas/testsuite/gas/i386/wrap32-text.d
> >>> +++ b/gas/testsuite/gas/i386/wrap32-text.d
> >>
> >> ... this still fail (observed with i386-msdos, which previously I
> >> had checked only on a 32-bit distro used for building):
> >>
> >> .../gas/testsuite/gas/i386/wrap32.s:43: Warning: value 0x1000000f4 truncated to 0xf4
> >> .../gas/testsuite/gas/i386/wrap32.s:51: Warning: value 0xffffffff700002f4 truncated to 0x700002f4>, no expected output
> >>
> >> I'm of the opinion that any such truncation warnings are actually
> >> bogus when it comes to a 32-bit target. I do have patches mostly
> >> ready to address some others, but not these two. I'd be inclined
> >> to make this an XFAIL on BFD64 a.out builds. Do you have an
> >> opinion one way or the other here? If so, I'm afraid I wouldn't
> >> know how to express this with an #xfail at the top of the .d file.
> >>
> >> It also doesn't help that i386.exp's gas_bfd64_check doesn't work
> >> for a.out, so I also couldn't easily skip the test in that case.
> >> Since it depends on "as --help" producing a description for the
> >> --32 / --64 options, and since that line is absent for a.out
> >> irrespective of the BFD64 setting, all a.out builds get taken as
> >> if they were !BFD64.
> >
> > Just limit these testcases for known good targets.
>
> But that way effectively saying "works only for ELF and PE/COFF" is
> a lie. That's what I'd like to avoid, alongside the test starting to
> fail on a non-ELF, non-PE/COFF target because of a future change.
>

Please try this patch to see if gas_bfd64_check works for you.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Update-gas_bfd64_check-to-check-64-bit-ELF-assem.patch
Type: text/x-patch
Size: 1617 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210610/d602811d/attachment.bin>


More information about the Binutils mailing list