mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
use supported relocation format
This commit is contained in:
parent
7f927dcb0c
commit
9e3fe7b405
1 changed files with 9 additions and 1 deletions
|
@ -275,11 +275,19 @@ fn generate_wrapper<'a, B: Backend<'a>>(
|
|||
};
|
||||
output.add_symbol(symbol);
|
||||
if let Some(sym_id) = output.symbol_id(name) {
|
||||
let encoding = match backend.target_info().architecture {
|
||||
roc_target::Architecture::Aarch32 => todo!(),
|
||||
roc_target::Architecture::Aarch64 => RelocationEncoding::AArch64Call,
|
||||
roc_target::Architecture::Wasm32 => todo!(),
|
||||
roc_target::Architecture::X86_32 => todo!(),
|
||||
roc_target::Architecture::X86_64 => RelocationEncoding::X86Branch,
|
||||
};
|
||||
|
||||
let reloc = write::Relocation {
|
||||
offset: offset + proc_offset,
|
||||
size: 32,
|
||||
kind: RelocationKind::PltRelative,
|
||||
encoding: RelocationEncoding::X86Branch,
|
||||
encoding,
|
||||
symbol: sym_id,
|
||||
addend: -4,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue