aboutsummaryrefslogtreecommitdiff
path: root/lib/std/comptime_string_map.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-02-05 15:55:17 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-02-07 08:39:00 +0100
commit5944e89016219138f6d5d9c818c7ce323eb64c1d (patch)
tree611427b002732130e0b2112bf5bf4c3fbd1f8432 /lib/std/comptime_string_map.zig
parent21135387fb7c2dbaf70a72f2c97341e9c1307045 (diff)
downloadzig-5944e89016219138f6d5d9c818c7ce323eb64c1d.tar.gz
zig-5944e89016219138f6d5d9c818c7ce323eb64c1d.zip
stage2: lower unnamed constants in Elf and MachO
* link: add a virtual function `lowerUnnamedConsts`, similar to `updateFunc` or `updateDecl` which needs to be implemented by the linker backend in order to be used with the `CodeGen` code * elf: implement `lowerUnnamedConsts` specialization where we lower unnamed constants to `.rodata` section. We keep track of the atoms encompassing the lowered unnamed consts in a global table indexed by parent `Decl`. When the `Decl` is updated or destroyed, we clear the unnamed consts referenced within the `Decl`. * macho: implement `lowerUnnamedConsts` specialization where we lower unnamed constants to `__TEXT,__const` section. We keep track of the atoms encompassing the lowered unnamed consts in a global table indexed by parent `Decl`. When the `Decl` is updated or destroyed, we clear the unnamed consts referenced within the `Decl`. * x64: change `MCValue.linker_sym_index` into two `MCValue`s: `.got_load` and `.direct_load`. The former signifies to the emitter that it should emit a GOT load relocation, while the latter that it should emit a direct load (`SIGNED`) relocation. * x64: lower `struct` instantiations
Diffstat (limited to 'lib/std/comptime_string_map.zig')
0 files changed, 0 insertions, 0 deletions