diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-10-08 11:00:07 +0200 |
|---|---|---|
| committer | Joachim Schmidt <joachim.schmidt557@outlook.com> | 2022-10-08 17:23:13 +0200 |
| commit | 7f508480f49b78817bf67579a8810d4499cbbc13 (patch) | |
| tree | d1f9dbed875ae37d2ebf5997cc0d2cde9e3bdfa0 /src/codegen | |
| parent | fa9327ac051031be21b6ccb494f31585d0b68915 (diff) | |
| download | zig-7f508480f49b78817bf67579a8810d4499cbbc13.tar.gz zig-7f508480f49b78817bf67579a8810d4499cbbc13.zip | |
wasm-linker: convert relocation addend to i32
Addends in relocations are signed integers as theoretically it could
be a negative number. As Atom's offsets are relative to their parent
section, the relocation value should still result in a postive number.
For this reason, the final result is stored as an unsigned integer.
Also, rather than using `null` for relocations that do not support
addends. We set the value to 0 for those that do not support addends,
and have to call `addendIsPresent` to determine if an addend exists
or not. This means each Relocation costs 4 bytes less than before,
saving memory while linking.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
