x86: Do not dump DS/CS segment overrides for branch hints
Borislav Petkov
bp@suse.de
Wed Dec 2 10:45:19 GMT 2020
On Wed, Dec 02, 2020 at 05:49:55PM +1030, Alan Modra wrote:
> i386-bsd +FAIL: i386 branch
Ok, found the first one - that's a --target=i386-bsd build AFAICT.
The first failure I can trigger here is:
FAIL: gas/i386/align-branch-9
Debug output from the test run says:
...
regexp "^ 1e: 39 c5 cmp %eax,%ebp$"
line " 1e: 39 c5 cmp %eax,%ebp"
regexp "^ 20: 70 62 jo 84 <foo\+0x84>$"
line " 20: 70 62 jo 84 <.L_2>"
regexp_diff match failure
because the test has:
cmp %eax, %ebp
jo .L_2
it disassembles to
1e: 39 c5 cmp %eax,%ebp
20: 70 62 jo 84 <.L_2>
but the .d file has
1e: 39 c5 cmp %eax,%ebp
20: 70 62 jo 84 <foo\+0x84>
i.e., it has that local label .L_2 instead of the offset foo+0x84.
Now I've checked out master before my patch:
9f1212394fa2 (HEAD -> refs/heads/master, refs/remotes/origin/master, refs/remotes/origin/HEAD) Fix Value.format_string docu for static members argument
96fb90861a4e Don't delete the locator win info
632ee6fd822f x86: Do not dump DS/CS segment overrides for branch hints
<--- HERE
568cbddc710f gold: Convert x86-64 GOTPCRELX only if addend == -4
and it fails the same way.
So I'm thinking for this particular case, I should simply fix
align-branch-9.d to match the local label
[0-9]+ <.L_2>
because we show local labels now in .o disassembly.
Yes?
> i386-darwin +FAIL: i386 branch
> i386-darwin +FAIL: x86-64 branch
> i386-msdos +FAIL: i386 branch
> x86_64-w64-mingw32 +FAIL: x86-64 branch
I'll analyze the rest later.
Thx.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
More information about the Binutils
mailing list