Skip to content

CHERI TGOT TLS #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from
Draft

CHERI TGOT TLS #773

wants to merge 11 commits into from

Conversation

jrtc27
Copy link
Member

@jrtc27 jrtc27 commented Jul 12, 2025

  • [BinaryFormat][llvm-readobj] Add CHERI TGOT segment and dynamic entry types
  • [MC] Add a new -(no-)cheri-tgot-tls flag
  • [Target] Adapt TargetMachine::getTLSModel for CHERI TGOT
  • [RISCV][MC] Add support for CHERI TGOT relocations and assembly syntax
  • [AMDGPU][CodeGen] Add a TGOT PseudoSourceValue
  • [RISCV] Add CodeGen support for CHERI TGOT
  • [clang][RISCV] Add -(no-)cheri-tgot-tls flag
  • [ELF] Support CHERI TGOT TLS
  • [BinaryFormat] Add RISC-V-specific CHERI TGOT dynamic entry types
  • [llvm-objdump][llvm-readobj] Add support for dumping __tgot_cap_relocs
  • [ELF][RISCV] Support linking CHERI TGOT TLS objects

jrtc27 added 11 commits July 29, 2025 16:38
Support for honouring this in various places will follow in subsequent
commits.
The TLS models behave slightly differently for CHERI TGOT, since the
access being performed is always to this module's TGOT, and so whether
the symbol is local or not never matters. Local Dynamic is also never
used, even if explicitly requested, since by design it violates pointer
provenance.
Until we've migrated to proper relative ELF relocations for capabilities
we need a special __tgot_cap_relocs alongside .rela.tgot, just as
__cap_relocs augments .rela.dyn.
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.

1 participant