qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask
@ 2017-03-21  9:38 Andreas Schwab
  2017-03-22 11:46 ` Thomas Huth
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2017-03-21  9:38 UTC (permalink / raw)
  To: qemu-devel

The m68k mask should not remove the low bit of the ELF version field and
should ignore the OS/ABI field.

Signed-off-by: Andreas Schwab <schwab@suse.de>
---
 scripts/qemu-binfmt-conf.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 0f1aa63872..484bcf166e 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -47,7 +47,7 @@ ppc64le_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\x
 ppc64le_family=ppcle
 
 m68k_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04'
-m68k_mask='\xff\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
+m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
 m68k_family=m68k
 
 # FIXME: We could use the other endianness on a MIPS host.
-- 
2.12.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask
  2017-03-21  9:38 [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask Andreas Schwab
@ 2017-03-22 11:46 ` Thomas Huth
  2017-03-22 12:04   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2017-03-22 11:46 UTC (permalink / raw)
  To: Andreas Schwab, qemu-devel; +Cc: Laurent Vivier, Riku Voipio

On 21.03.2017 10:38, Andreas Schwab wrote:
> The m68k mask should not remove the low bit of the ELF version field and
> should ignore the OS/ABI field.

Did you encounter a problem with a real binary here? ... then it might
be worth to mention it in the patch description and the patch should
likely be included into QEMU 2.9. Or is this just cosmetics? ... then it
should rather be included in 2.10 later, I think.

 Thomas

> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>  scripts/qemu-binfmt-conf.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
> index 0f1aa63872..484bcf166e 100755
> --- a/scripts/qemu-binfmt-conf.sh
> +++ b/scripts/qemu-binfmt-conf.sh
> @@ -47,7 +47,7 @@ ppc64le_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\x
>  ppc64le_family=ppcle
>  
>  m68k_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04'
> -m68k_mask='\xff\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
> +m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
>  m68k_family=m68k
>  
>  # FIXME: We could use the other endianness on a MIPS host.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask
  2017-03-22 11:46 ` Thomas Huth
@ 2017-03-22 12:04   ` Andreas Schwab
  2017-03-22 12:12     ` Laurent Vivier
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2017-03-22 12:04 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Laurent Vivier, Riku Voipio

On Mär 22 2017, Thomas Huth <huth@tuxfamily.org> wrote:

> On 21.03.2017 10:38, Andreas Schwab wrote:
>> The m68k mask should not remove the low bit of the ELF version field and
>> should ignore the OS/ABI field.
>
> Did you encounter a problem with a real binary here?

Yes, some binaries are using ELFOSABI_GNU instead of ELFOSABI_SYSV.  All
other patterns already ignore the OS/ABI field.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask
  2017-03-22 12:04   ` Andreas Schwab
@ 2017-03-22 12:12     ` Laurent Vivier
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2017-03-22 12:12 UTC (permalink / raw)
  To: Andreas Schwab, Thomas Huth; +Cc: Riku Voipio, qemu-devel

Le 22/03/2017 à 13:04, Andreas Schwab a écrit :
> On Mär 22 2017, Thomas Huth <huth@tuxfamily.org> wrote:
> 
>> On 21.03.2017 10:38, Andreas Schwab wrote:
>>> The m68k mask should not remove the low bit of the ELF version field and
>>> should ignore the OS/ABI field.
>>
>> Did you encounter a problem with a real binary here?
> 
> Yes, some binaries are using ELFOSABI_GNU instead of ELFOSABI_SYSV.  All
> other patterns already ignore the OS/ABI field.

Yes, I've also seen this.

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-22 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21  9:38 [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask Andreas Schwab
2017-03-22 11:46 ` Thomas Huth
2017-03-22 12:04   ` Andreas Schwab
2017-03-22 12:12     ` Laurent Vivier

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 NNTP newsgroup(s).