[all-commits] [llvm/llvm-project] d7fd8b: [LLD] Extend special OpenBSD support, but scope un...
John Ericson via All-commits
all-commits at lists.llvm.org
Fri Jul 12 11:34:38 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d7fd8b19e560fbb613159625acd8046d0df75115
https://github.com/llvm/llvm-project/commit/d7fd8b19e560fbb613159625acd8046d0df75115
Author: John Ericson <John.Ericson at Obsidian.Systems>
Date: 2024-07-12 (Fri, 12 Jul 2024)
Changed paths:
M lld/ELF/ScriptParser.cpp
M lld/ELF/Writer.cpp
M lld/test/ELF/openbsd-phdr.s
A lld/test/ELF/relro-openbsd.s
M lld/test/ELF/relro.s
Log Message:
-----------
[LLD] Extend special OpenBSD support, but scope under ELFOSABI (#97122)
- Add support for `.openbsd.mutable`
(rebaser's note) adapted from:
https://github.com/openbsd/src/commit/bd249b5664da50f0178adea78250a7a0d8ea6566
New auto-coalescing sections removed
In the linkers, collect objects in section "openbsd.mutable" and place
them into a page-aligned region in the bss, with the right markers for
kernel/ld.so to identify the region and skip making it immutable. While
here, fix readelf/objdump versions to show all of this. ok miod kettenis
- Add support for `.openbsd.syscalls`
(rebaser's note) adapted from:
https://github.com/openbsd/src/commit/42a61acefa8b3288ff2163fb55e934a3fee39974
Collect .openbsd.syscalls sections into a new PT_OPENBSD_SYSCALLS
segment. This will be used soon to pin system calls to designated call
sites.
ok deraadt@
- Scope OpenBSD special section handling under that ELFOSABI
As a preexisting comment in `ELF/Writer.cpp` says:
> section names shouldn't be significant in ELF in spirit.
so scoping OSABI-specific magic name hacks to just the OSABI in
question limits the degree to which we deviate from that "spirit" for
all other OSABIs.
OpenBSD in particular is very fast moving, having added a number of
special sections, etc. in recent years. It is unclear how possible /
reasonable it is for upstream to implement all these features in any
event, but scoping like this at least mitigates the fallout for other
OSABIs systems which wish to be more slow-moving.
Co-authored-by: deraadt <deraadt at openbsd.org>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list