[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k



On Mon, 2025-06-16 at 10:32 +0200, Laurent Vivier wrote:
> Because most of the structures are correctly aligned by default, but 
> some of them not. You must run glibc test suite and LTP to be sure there 
> is no regression.

Good suggestion, thanks!

> In QEMU, alignment is defined here:
> 
> include/user/abitypes.h
> 
> for m68k the values to change are:
> 
> #ifdef TARGET_M68K
> #define ABI_INT_ALIGNMENT 2
> #define ABI_LONG_ALIGNMENT 2
> #define ABI_LLONG_ALIGNMENT 2
> #endif

Thanks, this is very valuable input!

> And there will be a problem with binfmt_misc because we can't rely on 
> the ELF signature to know which qemu-user to run, the one with 2byte 
> alignment or the one with 4byte alignment?

What about the ELF note [1] that David Brownlee suggested? Can these be used?

Adrian

> [1] https://www.netbsd.org/docs/kernel/elf-notes.html

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: