aarch64: Implement TLS ELF GD Relocations
Implement the `TlsValue` opcode in the aarch64 backend for ELF_GD. This is a little bit unusual as the default TLS mechanism for aarch64 is TLS Descriptors in other compilers. However currently we only recognize elf_gd so lets start with that as a TLS implementation.
This commit is contained in:
@@ -618,6 +618,30 @@ impl ObjectModule {
|
||||
32,
|
||||
)
|
||||
}
|
||||
Reloc::Aarch64TlsGdAdrPage21 => {
|
||||
assert_eq!(
|
||||
self.object.format(),
|
||||
object::BinaryFormat::Elf,
|
||||
"Aarch64TlsGdAdrPrel21 is not supported for this file format"
|
||||
);
|
||||
(
|
||||
RelocationKind::Elf(object::elf::R_AARCH64_TLSGD_ADR_PAGE21),
|
||||
RelocationEncoding::Generic,
|
||||
21,
|
||||
)
|
||||
}
|
||||
Reloc::Aarch64TlsGdAddLo12Nc => {
|
||||
assert_eq!(
|
||||
self.object.format(),
|
||||
object::BinaryFormat::Elf,
|
||||
"Aarch64TlsGdAddLo12Nc is not supported for this file format"
|
||||
);
|
||||
(
|
||||
RelocationKind::Elf(object::elf::R_AARCH64_TLSGD_ADD_LO12_NC),
|
||||
RelocationEncoding::Generic,
|
||||
12,
|
||||
)
|
||||
}
|
||||
// FIXME
|
||||
reloc => unimplemented!("{:?}", reloc),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user