diff options
| author | Luuk de Gram <luuk@degram.dev> | 2023-11-16 19:29:57 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2023-11-28 15:47:07 +0100 |
| commit | 8856ba75059f74a326d1f8d3af40a30c5a3ac1ed (patch) | |
| tree | 35ceb0bd2015c4bf89dda04c8ffc2bc49633c3bf /test/cases/compile_errors/setAlignStack_in_inline_function.zig | |
| parent | c986c6c90a5746cb671177e486a77bd78a5946b0 (diff) | |
| download | zig-8856ba75059f74a326d1f8d3af40a30c5a3ac1ed.tar.gz zig-8856ba75059f74a326d1f8d3af40a30c5a3ac1ed.zip | |
wasm-linker: parse symbols into atoms lazily
Rather than parsing every symbol into an atom, we now only parse them
into an atom when such atom is marked. This means garbage-collected
symbols will also not be parsed into atoms, and neither are discarded
symbols which have been resolved by other symbols. (Such as multiple
weak symbols).
This also introduces a binary search for finding the start index into
the list of relocations. This speeds up finding the corresponding
relocations tremendously as they're ordered ascended by address.
Lastly, we re-use the memory of atom's data as well as relocations
instead of duplicating it. This means we half the memory usage of
atom's data and relocations for linked object files. As we are
aware of decls and synthetic atoms, we free the memory of those
atoms indepedently of the atoms of object files to prevent double-frees.
Diffstat (limited to 'test/cases/compile_errors/setAlignStack_in_inline_function.zig')
0 files changed, 0 insertions, 0 deletions
