Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Aug 1999 03:21:24 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, marcel@scc.nl
Cc:        emulation@FreeBSD.ORG
Subject:   Re: SIGBUS for threaded Linux binaries (glibc2.1) [PSL_AC related?]
Message-ID:  <199908251721.DAA25993@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908251721.DAA25993>