From owner-freebsd-emulation Wed Aug 25 10:22: 9 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 6A2C615A2A for ; Wed, 25 Aug 1999 10:21:55 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id DAA25993; Thu, 26 Aug 1999 03:21:24 +1000 Date: Thu, 26 Aug 1999 03:21:24 +1000 From: Bruce Evans Message-Id: <199908251721.DAA25993@godzilla.zeta.org.au> To: bde@zeta.org.au, marcel@scc.nl Subject: Re: SIGBUS for threaded Linux binaries (glibc2.1) [PSL_AC related?] Cc: emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> This means that the stack is misaligned. This seems to be an emulator >> bug. The stack is also misaligned for an old version of Linux `cat' >> when I attach to it while it is waiting for input. > >You're right. `linux_sigcode' in linux_locore.s doesn't have the 'right' >size. Consequently `linux_szsigcode' is no multiple of 4 which results in a >misaligned stack. I'll commit the fix shortly. This is ELF breakage. I've even noticed the problem before. `.align 2' should be `.p2align 2', or better, ALIGN_TEXT as in locore.s. The committed fix is wrong. `.align 4' gives 16-byte alignment, which is harmless but bogotifies the comment. Why not use the standard macro? There are also broken .align statements in: apic_ipl.s (two .align 2's, one with a comment saying that things MUST be 32-bit aligned) svr4_locore.s (same bugs as in linux_locore.s). There are also dubious .align statements in: alpha/locore.s (.align 3) alpha/prom_disp.s (.align 4) At least the first is apparently a power of 2 aligne statement and should be spelled .p2align. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message