mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Fix linking bugs from wasm-objdump analysis
This commit is contained in:
parent
0ee482ae9e
commit
b8eea9be2b
4 changed files with 57 additions and 21 deletions
|
@ -105,9 +105,14 @@ pub fn build_module_help<'a>(
|
|||
payload: linking_section_bytes,
|
||||
});
|
||||
|
||||
// Code relocations
|
||||
// We always output the code section at the same index relative to other sections, and we need that for relocations.
|
||||
// TODO: If there's a data section, this will be 6 so we'll need logic for that
|
||||
// TODO: Build a cleaner solution after we replace parity-wasm with our own module_builder
|
||||
const CODE_SECTION_INDEX: u32 = 5;
|
||||
|
||||
let code_reloc_section = RelocationSection {
|
||||
name: "reloc.CODE",
|
||||
target_section_index: CODE_SECTION_INDEX,
|
||||
entries: &backend.code_relocations,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue