gcc/arm: For -mtp=soft, ensure stack alignment even in leaves.
The option -mtp=soft, which is the default on earmv5, makes queries
to the thread pointer, for access to static (`initial-exec')
thread-local storage, go through the C runtime subroutine
__aeabi_read_tp. (For earmv>=6, we use the cp15 register via a
single instruction.)
Thus procedures which gcc thinks of as leaf procedures that use
__aeabi_read_tp are not really leaf procedures -- and even though
__aeabi_read_tp itself doesn't use the stack pointer at all,
resolving the symbol may take a detour through the dynamic linker,
which does rely on an aligned stack pointer.
Without this change, code like
__thread int x = 0;
int *
get_x(void)
[92 lines not shown]
gdb: Disable emoji in output by default.
NetBSD users may be more likely than others to be using a physical
DEC VT420 as their console, or at the very least the standard x86
BIOS text console while debugging the system. Both of these would
rather display a garbled mess than an emoji.
Besides, this is the system debugger, so we want to keep things
usable in a minimal environment.
Users can still re-enable emoji output with "set style emoji on"
if they are using kalacrittyology7 with an utf-8 locale. Or uxterm
with symbola-ttf installed (monochrome only).
PR bin/60497 gdb prints garbled gibberish in an attempt to show
cutesy emoji
hdaudio(4): Apply access checks to ioctl routines.
This way the permissions on /dev/hdaudioN actually do something.
Sort includes while here.
PR kern/60492: hdaudio(4): setconfig is allowed unprivileged
sun4v vdsk: catch up with recent updates to cd(4)
Add support for missing SCSI_MODE_SELECT_10 and SCSI_MODE_SENSE_10.
Verified to work in a sun4v ldom with acccess to a virtual cd.
ld.elf_so: Prune some dead TLS variant branches.
__lwp_settcb / __lwp_gettcb_fast are used only with TLS variant I,
never with TLS variant II.
So say `#ifdef __HAVE_TLS_VARIANT_II' instead of `#ifndef
__HAVE_TLS_VARIANT_I' to make it clearer, and prune all the
__HAVE___LWP_SETTCB / __HAVE___LWP_GETTCB_FAST branches under it
because they're unreachable.
No functional change intended: all the deleted code should be dead.
PR bin/60469: bin/60469: assertion "ALIGNED_P(q, obj->tlsalign)"
failed: file "/usr/src/libexec/ld.elf_so/tls.c", line 333
ld.elf_so: Fix assertions for TLS variant I without _lwp_settcb.
In variant I, the TLS address is always
(uint8_t *)tcb + sizeof(struct tls_tcb) + obj->tlsoffset.
With _lwp_settcb, (uint8_t *)tcb + sizeof(struct tls_tcb) is aligned,
whereas without it, (uint8_t *)tcb is aligned. Consequently, with
_lwp_settcb, obj->tlsoffset must also be aligned, whereas without it,
obj->tlsoffset + sizeof(struct tls_tcb) must be aligned -- and hence,
without _lwp_settcb, obj->tlsoffset must be congruent to
-sizeof(struct tls_tcb) modulo the alignment.
No functional change intended for non-DEBUG builds: assertion changes
only here.
PR bin/60469: bin/60469: assertion "ALIGNED_P(q, obj->tlsalign)"
failed: file "/usr/src/libexec/ld.elf_so/tls.c", line 333