[ELF] Always separate relative relocations regardless of -z combreloc (#187964)
Remove the combreloc guard from addReloc and mergeRels so that
relative relocations are always routed to relativeRelocs, even with -z
nocombreloc or --pack-dyn-relocs=android.
Update AndroidPackedRelocationSection::updateAllocSize to iterate
both relativeRelocs and relocs.
[LLD] [ELF] Make -z gcs=always implicitly warn on missing GCS, like force-bti (#186203)
This matches GNU ld, where gcs=always makes it implicitly warn about
missing GCS flags, by matching the existing code pattern used for BTI
and IBT.
Also test that warnings can be printed for both missing BTI and GCS for
the same object file.
This fixes #186173.
(cherry picked from commit 887d2d4bf7380113b27f199f323eeee883f17191)
[RISCV] Relax out of range Zibi conditional branches (#186965)
If `.Label` is not within +-4KiB range, we convert
```
beqi/bnei reg, imm, .Label
```
to
```
bnei/beqi reg, imm, 8
j .Label
```
This is similar to what is done for the RISCV conditional branches
and `Xqcibi` conditional branches.
---------
[2 lines not shown]
[SystemZ] Remove custom lowering of f16 IS_FPCLASS (#187532)
As pointed out in #187518 , currently, `__builtin_isnormal` returns
`true` for subnormal half precision floating point numbers on `s390x.
This is because there is a custom lowering defined which lowers an `f16`
`IS_FPCLASS` ISD node by extending the `f16` value to `f32`, and then
using SystemZ's "test data class" instruction to determine whether the
number is subnormal. However, a number that is subnormal in 16 bits of
precision will no longer be subnormal in 32 bits of precision, and so
the test always returns true, i.e. all subnormal numbers are classified
as normal.
This PR addresses this by removing the custom lowering and instead
relying on the generic expansion of `IS_FPCLASS`, which does not have
this error.
Fixes #187518 .
(cherry picked from commit 6eb5ac52ca56fd31c41a619a14093430b27132c3)
[LoongArch] Ensure .dwo sections do not contain relocations (#187429)
When linker relaxation is enabled, LoongArchAsmBackend may emit
relocations for same-section symbol differences, even when the fixup
is in a .dwo section. This leads to errors such as:
error: A dwo section may not contain relocations
Split DWARF (.dwo) sections must not contain relocations. Fix this by
resolving such fixups immediately when they are emitted into .dwo
sections, even if the referenced symbols are in relaxable sections.
This avoids generating invalid relocations in .debug_*.dwo sections
when compiling with -gsplit-dwarf and -mrelax.
Fixes #187428
(cherry picked from commit 89d8fe9d08c395875cf1201feaf9d213cadeea7a)
[ELF] Separate relative and non-relative dynamic relocations (#187959)
Previously, the flow was:
1. Parallel scan adds relative relocs to per-thread `relocsVec`
2. `mergeRels()` copies all into `relocs`
3. `partitionRels()` uses `stable_partition` to separate
Now, relative relocs are routed at `addReloc` time by checking
`reloc.type == relativeRel`. In `mergeRels`, sharded entries are
classified through the same `addReloc` path rather than blindly
appended. `relocsVec` may contain non-relative entries like
`R_AARCH64_AUTH_RELATIVE`.
This eliminates the `stable_partition` on the full relocation vector
(543K entries for clang) and avoids copying relative relocations into
`relocs` only to move them out again.
Linking an x86_64 release+assertions build of clang is 1.04x as fast.
[5 lines not shown]
clarify that Authorized(Keys|Principals)(File|Command) are only
consulted for valid users.
clarify that TOKENS are expanded without sanitisation or escaping
and that it's the user's reponsibility to ensure their usage is
safe.
prompted by bz3936; feedback/ok deraadt@
[clang-tidy][NFC] Remove optimized container implementations in `misc-no-recursion` (#187630)
About half of this check's code is dedicated to implementing a pair of
set containers with optimizations for when the element count is small.
But the check only uses these containers while constructing the warning
message. That's not generally a hot path in any check. Just to confirm,
I ran the check over `clang/lib/Sema/Sema.cpp` and all its included
headers before and after, and saw no performance difference. So, these
containers seem like a false optimization.
Move initialization of %dfc and %sfc into _bootstrap() (which will
eventually itself be re-factored to reduce duplication). Also, catch
up with the others: no need to initialize %usp before calling main().
mlx5: postpone freeing the completed command entity to taskqueue
because cancel_delayed_work_sync() might need to sleep, which cannot be
done in the interrupt thread where the completion runs.
Sponsored by: Nvidia networking
MFC after: 1 week
[clang] On Windows, silence warning when building with MSVC (#187937)
This fixes:
```
[2124/7029] Building CXX object tools\clang\lib\AST\CMakeFiles\obj.clangAST.dir\TemplateBase.cpp.obj
C:\git\llvm-project\clang\lib\AST\TemplateBase.cpp(753): warning C4312: 'reinterpret_cast': conversion from 'clang::SourceLocation::UIntTy' to 'clang::TemplateArgumentLocInfo::LocOrPointer' of greater size
```
[mlir] Deterministic containers in BytecodeWriter (#187819)
Iteration over use lists in writeUseListOrders is non-deterministic as a
result of using a DenseMap. Replacing with a Vector-backed `MapVector`
restores deterministic behaviour.
Protect IGMP and MLD6 fast timer with rwlock.
Multicast interface addresses for IPv4 and IPv6 get their own per
interface lock. Protect the TAILQ if_maddrlist with rwlock
if_maddrlock. Also struct in_multi and in6_multi use this lock for
their state and timer. Sleeps in malloc(9) are possible. Run IGMP
and MLD6 fast timeout with shared instead of exclusive net lock.
To prevent calling ip_output() or ip6_output() while holding the
multicast lock, delay igmp_sendpkt() and mld6_sendpkt(). All
information that is needed to create and send a multicast packet
is stored in igmp_pktinfo or mld6_pktinfo. If necessary, multiple
pktinfo are queued. After the lock has been released, packes are
sent based on pktinfo.
OK mvs@
devel/p5-TimeDate: Limit portscout to stable versions
Port changes:
- Add PORTSCOUT to stay with stable versions only
PR: 293723
Reported by: Sergei Vyshenski <svysh.fbsd at gmail.com> (maintainer)
Approved by: maintainer, osa (mentor)
devel/p5-TimeDate: Limit portscout to stable versions
Port changes:
- Add PORTSCOUT to stay with stable versions only
PR: 293723
Reported by: Sergei Vyshenski <svysh.fbsd at gmail.com> (maintainer)
Approved by: maintainer, osa (mentor)