mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
hardcode some hash table properties
This commit is contained in:
parent
fd5e9a9b48
commit
d7499ce928
1 changed files with 3 additions and 13 deletions
|
@ -370,22 +370,12 @@ fn copy_file(in_data: &[u8], custom_names: &[String]) -> Result<Vec<u8>, Box<dyn
|
|||
}
|
||||
|
||||
// Hash parameters.
|
||||
let hash_index_base = out_dynsyms
|
||||
.first()
|
||||
.map(|sym| out_dynsyms_index[sym.in_sym].0)
|
||||
.unwrap_or(0);
|
||||
let hash_index_base = 1;
|
||||
let hash_chain_count = writer.dynamic_symbol_count();
|
||||
|
||||
// GNU hash parameters.
|
||||
let gnu_hash_index_base = out_dynsyms
|
||||
.iter()
|
||||
.position(|sym| sym.gnu_hash.is_some())
|
||||
.unwrap_or(0);
|
||||
let gnu_hash_symbol_base = out_dynsyms
|
||||
.iter()
|
||||
.find(|sym| sym.gnu_hash.is_some())
|
||||
.map(|sym| out_dynsyms_index[sym.in_sym].0)
|
||||
.unwrap_or_else(|| writer.dynamic_symbol_count());
|
||||
let gnu_hash_index_base = 0;
|
||||
let gnu_hash_symbol_base = 1;
|
||||
let gnu_hash_symbol_count = writer.dynamic_symbol_count() - gnu_hash_symbol_base;
|
||||
|
||||
// Assign symbol indices.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue