forked from CTSRD-CHERI/cheribsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kldxref: Apply caprelocs in addition to normal ELF relocations
Similar to ELF objects handled by libelf, define a "generic" structure (Gcapreloc) and provide a routine in elf.c (elf_read_capreloc) which reads the caprelocs section from an ELF file into an array of Gcapreloc structures. Recognize DT_RISCV_CHERI___CAPRELOCS* when parsing .dynamic of an ELF DSO and use it to identify the caprelocs section. This is the only layering violation as there is not a portable DT_CAPRELOCS. Add a new linker set of capreloc handlers and use the handler on any relocated data after normal ELF relocations. Note that caprelocs are only supported for RISC-V currently.
- Loading branch information
Showing
4 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters