cranelift: Add COFF TLS Support (#4546)

* cranelift: Implement COFF TLS Relocations

* cranelift: Emit SecRel relocations

* cranelift: Handle _tls_index symbol in backend
This commit is contained in:
Afonso Bordado
2022-08-11 17:33:40 +01:00
committed by GitHub
parent a40b253792
commit c5bc368cfe
10 changed files with 153 additions and 29 deletions

View File

@@ -50,8 +50,8 @@ pub use crate::traps::TrapSite;
/// Version number of this crate.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
/// Default names for `ir::LibCall`s. A function by this name is imported into the object as
/// part of the translation of a `ir::ExternalName::LibCall` variant.
/// Default names for [ir::LibCall]s. A function by this name is imported into the object as
/// part of the translation of a [ir::ExternalName::LibCall] variant.
pub fn default_libcall_names() -> Box<dyn Fn(ir::LibCall) -> String + Send + Sync> {
Box::new(move |libcall| match libcall {
ir::LibCall::Probestack => "__cranelift_probestack".to_owned(),