[lld][MachO] Stream FunctionStartsSection from laid-out code sections
Currently, `FunctionStartsSection::finalizeContents()` scans every
`ObjFile`'s full symbol table, resolves `defined->getVA()` for each live
code symbol, sorts all addresses with `llvm::sort`, and encodes ULEB128
deltas through `raw_svector_ostream`.
By the time `FunctionStartsSection::finalizeContents()` runs, output
segments, their sections, and each `ConcatOutputSection`'s inputs are
already laid out in ascending virtual address order, and each input
section's `symbols` list is kept sorted by offset. This PR walks those
laid-out code sections directly and streams ULEB128 deltas straight into
`contents` via `llvm::appendLEB128`. If a malformed input produces an
out-of-order symbol address, it reports an `error()` and skips the
symbol.
To avoid calling `isCodeSection()` on every subsection, we add a
`SectionView` wrapper so `isCodeSection()` can accept either a `Section`
or an `InputSection`, and cache its result across consecutive inputs
[10 lines not shown]
[Mips] Set _MIPS_SPFPSET to 16 before MIPS32 with 32-bit FPRs (#246579)
Before MIPS32, single-precision arithmetic can't use the odd FPRs when
the FPRs are 32 bits wide, and the backend doesn't use them there.
Clang still defined _MIPS_SPFPSET as 32 for MIPS I, and for MIPS II to
MIPS IV with -mfp32. Define it as 16 there, as GCC does. A single-float
FPU such as the R5900 has 32 single-precision FPRs, so single-float is
not changed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
mail/stalwart-cli: Update 2.0.0 => 2.0.1
Changelog:
https://github.com/stalwartlabs/cli/blob/v2.0.1/CHANGELOG.md
While here, update COMMENT, WWW and pkg-descr: upstream now calls
the product Stalwart Mail and Collaboration Server, 2.0.0 added an
interactive console, and the CLI has its own documentation page.
PR: 301269
sched/wait: remove __add_wait_queue_entry_tail()
__add_wait_queue() and __add_wait_queue_entry_tail() are now the same.
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
Cc: Vincent Guittot <vincent.guittot at linaro.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
sched/wait: always queue new waiters at the tail
Non-exclusive waiters have been added at the head and exclusive ones at
the tail, so that an exclusive wakeup stopping early still woke every
non-exclusive waiter.
That only matters for waiters that mix both kinds on one queue like
read() and poll() on a pipe - and even then it doesn't actually buy
anything but complexity and fragility of the code.
An exclusive reader consumes the event, the poller had nothing to see,
so there's no real point in keeping the two ordered.
The pointless ordering results in a special rule for everybody adding
themselves to the wait queue, and that rule has not been consistently
followed anyway (see for example do_wait_intr() and do_wait_intr_irq())
So just queue everyone in FIFO order. LIFO might be better for
throughput, but every time we've ever tried that optimization in real
[22 lines not shown]
sched/wait: remove the __add_wait_queue_*exclusive() helpers
Each has one or two special-case users. Open-code them there: set
WQ_FLAG_EXCLUSIVE and queue the entry directly, with a note on why the
caller doesn't use add_wait_queue_exclusive().
I think all cases (eventpoll, orangefs and ubifs) are unnecessary and
could just use the regular ordering, but I'll leave that to those
maintainers to sort out.
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
Cc: Vincent Guittot <vincent.guittot at linaro.org>
Cc: Alexander Viro <viro at zeniv.linux.org.uk> # eventpoll
Cc: Christian Brauner <brauner at kernel.org> # eventpoll
Cc: Jan Kara <jack at suse.cz> # eventpoll
Cc: Mike Marshall <hubcap at omnibond.com> # orangefs
[2 lines not shown]
libsys: link internal copies of fls*(3), str*(3), and mem*(3) functions used by libsys
To avoid undef symbols which get resolved from libc.
Reviewed by: brooks, jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D62131
libsys: do not link in csu, and compile as freestanding
This is a library below implementation of the C runtime. It should not
(and really cannot) use any of that.
In particular, libsys no longer has undef __cxa_finalize.
Reviewed by: brooks, jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D62131
libsys: this is libsys, not libc
Reviewed by: brooks, jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D62131
libsys: avoid depending on libc _once()
The __init_elf_aux_vector() function is idempotent, so do not bother
ensuring a single call. Just tolerate a possible race.
Reviewed by: brooks, jrtc27 (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D62131
Merge tag 'edac_urgent_for_v7.4_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC fixes from Borislav Petkov:\
- Fix error handling paths and channel name truncation in versalnet_edac
* tag 'edac_urgent_for_v7.4_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
EDAC/versalnet: Fix use-after-free in remove_one_mc()
EDAC/versalnet: Use designated initializer for rpmsg_channel_info
EDAC/versalnet: Fix device_register() error handling in init_one_mc()
[Support][mlir] Check verify directives in buffers without diagnostics (#233307)
Buffers added after the verifier was created (e.g. `.include`d files)
were only scanned when a diagnostic was reported in them, so their
directives were never checked if they produced no diagnostics. Scan all
buffers in `verify()` and when looking for `@unknown` directives, and
make calling `verify()` again not report the same directives twice.
This means callers no longer need to scan their buffers up front, so
we can drop that from llvm-mc and MLIR's handler.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233307
[Support] Track verify directives per buffer instead of per file name (#233306)
Expected diagnostics were looked up by by buffer identifier, so buffers
with the same name shared one list, and a diagnostic in one buffer could
match a directive in another. Use the buffer as the key instead and
check them in registration order to be deterministic.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233306
[Support][mlir] Highlight the whole directive in verifier errors (#233309)
The highlighted range started at the directive but had the length of the
expected text, so it usually ended in the middle of the directive.
Highlight up to and including the closing `}}` instead.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233309
[Support] Fix parsing of line offsets in verify directives (#233305)
`@+N` and `@-N` offsets were parsed with `getAsInteger(0, ...)` and the
result was never checked. So `@+010` was read as octal (8), `@+08`
failed to parse and left the offset uninitialized, and offsets before
the start or past the end of the file silently wrapped around.
Always force decimal parsing and report an error if they are invalid or
out of bounds. Line 0 is still allowed because MLIR uses it for the
implicit top-level module.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233305
[Support][llvm-mc] Add baseline tests for SourceMgrDiagnosticVerifier bugs (#236283)
These will be fixed by the following commits.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/236283
[RISC-V][MC] Remove dead CHECK lines from converted --verify tests (#238224)
These CHECK lines used prefixes that no RUN line passed to FileCheck, so
they were never checked and the conversion to --verify left them alone.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/238224
Merge tag 'x86-urgent-2026-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
- Make SafeRET robust also against NMIs (Atish Patra)
- Fix SMCA bank lookup in amd_mce_usable_address() (Yazen Ghannam)
- Fix the FPDSS erratum on Hygon (Shance Luo)
- Work around XSAVES Erratum 1386 on Hygon (Tina Zhang)
* tag 'x86-urgent-2026-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/cpu/hygon: Work around XSAVES Erratum 1386
x86/CPU: Fix FPDSS on Hygon
x86/mce/amd: Fix bank lookup in amd_mce_usable_address()
x86/entry: Make SafeRET robust also against NMIs
[libc][test] Fix dangling temporary CString pointers in unit tests (#241063)
libc_make_test_file_path returns a temporary CString wrapping an owning
cpp::string. Passing its implicit const char * conversion directly to
TESTONLY_set_group_path (which stores the raw pointer without copying in
getgrouplist_test.cpp and initgroups_test.cpp) leaves a dangling heap
pointer once the full-expression ends whenever the filename exceeds
cpp::string's short-string buffer.
Annotate CString's pointer and string_view accessors with
LIBC_LIFETIMEBOUND so Clang diagnoses temporary lifetime escapes at
compile time, allow default and move construction/assignment on CString
for test fixture members, and keep the CString objects alive in
getgrouplist_test and initgroups_test.
Assisted-by: Gemini