Skip to content

Conversation

@resistor
Copy link
Collaborator

  • [RISCV][MC] Keep .Lpcrel_hi symbols for CHERI AUIPCC pseudos in assembly
  • [ELF][NFC] Fix mismerge in CheriCapTableSection
  • [ELF][NFC] Add name constructor argument for CheriCapRelocsSection
  • [ELF] Calculate config->isCheriAbi prior to constructing TargetInfo
  • [ELF][RISCV] Set correct gotEntrySize for purecap objects
  • [InstSimplify] Add a test for current get/set intrinsic folding
  • [InstSimplify] Simplify getoffset/getaddr folding. NFC
  • [InstSimplify] Simplify @llvm.cheri.cap.high.get
  • [RISCV] Enable a test that works these days
  • [RISCV] Fix a RUN line causing the test not to be run
  • [ELF][RISCV] Use .got rather than .captable for CHERI-RISC-V
  • [ELF][NFC] Drop unwarranted XXX comments

jrtc27 and others added 12 commits October 31, 2025 22:41
Commit 1e3f487 ("Fix build after merge") removed the CanBeUnnamed
parameter since it no longer existed, but this is because users that set
it to false were supposed to migrate to createNamedTempSymbol, as was
done upstream in d9a0c40 ("[MC] Split MCContext::createTempSymbol,
default AlwaysAddSuffix to true, and add comments") for AUIPC pseudos.
This comment should have been dropped when rebasing the LLVM 17 merge to
avoid this hack.

Fixes: fb02ad7 ("[ELF] Add InputSectionBase::{addRelocs,relocs} and GotSection::addConstant to add/access relocations")
This mirrors RelocationBaseSection (and deriving classes) and will allow
additional caprelocs sections to be added.
This allows the constructor to check config->isCheriAbi just as it can
check config->is64.

This also centralises the file compatibility checks, making them follow
upstream's.
This is currently not used but will be in future commits.
Now that we depend on C++14, we can use switches in constexpr functions
and no longer need to pass two template parameters.
As part of this refactor some of the CHERI get intrinsics folding code.
This refactoring introduces a minor change to getoffset folding as well:
we no longer fold arbitrary getoffset(setoffset(A, B)) -> B since the
setoffset could have changed the bounds interpretation and therefore
also the result. This optimization is unlikely to make a difference in
practice and is somewhat incorrect so I believe dropping it makes sense.
Fixes: 1949a19 ("[MachineOutliner][CHERI-RISC-V] Use capability jumps for purecap")
RELRO sections are SHF_WRITE, so there's nothing wrong with the code
here. This is how it's meant to work, and how things like GotSection are
constructed.
@resistor resistor merged commit ead1851 into CHERIoT-Platform:cheriot Oct 31, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants