From: Rich Felker Date: Wed, 1 Jan 2020 16:10:07 +0000 (-0500) Subject: remove gratuitous aligned attribute from __ptrace_syscall_info X-Git-Tag: v1.2.0~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ac89e2ccf5b85137279f6d146e8a6c43f624c83c;p=oweals%2Fmusl.git remove gratuitous aligned attribute from __ptrace_syscall_info this change was discussed on the mailing list thread for the linux uapi v5.3 patches, and submitted as a v2 patch, but overlooked when I applied the patches much later. revert commit f291c09ec90e2514c954020e9b9bdb30e2adfc7f and apply the v2 as submitted; the net change is just padding. notes by Szabolcs Nagy follow: compared to the linux uapi (and glibc) a padding is used instead of aligned attribute for keeping the layout the same across targets, this means the alignment of the struct may be different on some targets (e.g. m68k where uint64_t is 2 byte aligned) but that should not affect syscalls and this way the abi does not depend on nonstandard extensions. --- diff --git a/include/sys/ptrace.h b/include/sys/ptrace.h index 2a868093..5d62a985 100644 --- a/include/sys/ptrace.h +++ b/include/sys/ptrace.h @@ -109,7 +109,8 @@ struct __ptrace_seccomp_metadata { struct __ptrace_syscall_info { uint8_t op; - uint32_t arch __attribute__((__aligned__(4))); + uint8_t __pad[3]; + uint32_t arch; uint64_t instruction_pointer; uint64_t stack_pointer; union {