Add TLS support for ELF and MachO (#1174)
* Add TLS support * Add binemit and legalize tests * Spill all caller-saved registers when necessary
This commit is contained in:
@@ -56,6 +56,12 @@ pub enum Reloc {
|
||||
Arm64Call,
|
||||
/// RISC-V call target
|
||||
RiscvCall,
|
||||
|
||||
/// Elf x86_64 32 bit signed PC relative offset to two GOT entries for GD symbol.
|
||||
ElfX86_64TlsGd,
|
||||
|
||||
/// Mach-O x86_64 32 bit signed PC relative offset to a `__thread_vars` entry.
|
||||
MachOX86_64Tlv,
|
||||
}
|
||||
|
||||
impl fmt::Display for Reloc {
|
||||
@@ -71,6 +77,9 @@ impl fmt::Display for Reloc {
|
||||
Self::X86CallPLTRel4 => write!(f, "CallPLTRel4"),
|
||||
Self::X86GOTPCRel4 => write!(f, "GOTPCRel4"),
|
||||
Self::Arm32Call | Self::Arm64Call | Self::RiscvCall => write!(f, "Call"),
|
||||
|
||||
Self::ElfX86_64TlsGd => write!(f, "ElfX86_64TlsGd"),
|
||||
Self::MachOX86_64Tlv => write!(f, "MachOX86_64Tlv"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user