Summary: | [2.42 regression]: `.arch i386` is rejected by `x86_64` target: 4bit mode not supported on `i386'. | ||
---|---|---|---|
Product: | binutils | Reporter: | Sergei Trofimovich <slyich> |
Component: | gas | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED NOTABUG | ||
Severity: | normal | CC: | jbeulich |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2024-01-31 00:00:00 | |
Attachments: | entry32-16-debug.s |
Description
Sergei Trofimovich
2024-01-30 22:46:31 UTC
Might be related to https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1d07cfb4406ee1dd336dd63cd5af7e8534892be7 ? So this is precisely the case that the new behavior is intended to catch: It is meaningless to restrict ISA to i386 when trying to build 64-bit code. In the kexec example, the .code32 comes too late anyway (would have wanted to be at least before the label already before); wants moving ahead of the .arch. IOW for now I view this as neither a bug nor a regression; earlier gas simply was to lax. I'm open to be convinced otherwise ... Aha, adapting kexec-tools sounds fine as well. Does the `.code16` use look fine in the rest of the file? SO far I made it build as: --- a/entry32-16-debug.s +++ b/entry32-16-debug.s @@ -18,10 +18,10 @@ .globl entry16_debug_pre32 .globl entry16_debug_first32 .globl entry16_debug_old_first32 + .code32 .arch i386 .balign 16 entry16_debug: - .code32 call 1f 1: popl %ebx Does it look about right? (In reply to Sergei Trofimovich from comment #3) > Aha, adapting kexec-tools sounds fine as well. > > Does the `.code16` use look fine in the rest of the file? They're all okay, as there's no other .arch directive. Ordering there would be a problem only if you had e.g. ".arch i286" ahead of ".code16". > SO far I made it build as: >[...] > Does it look about right? Yes. Thank you! Proposed kexec-tools fix as http://lists.infradead.org/pipermail/kexec/2024-January/029349.html Let's close as NOTABUG. |