mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
5944e89016
* 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 |
||
---|---|---|
.. | ||
behavior | ||
src | ||
stage1/c_abi | ||
stage2 | ||
standalone | ||
assemble_and_link.zig | ||
behavior.zig | ||
cases.zig | ||
cli.zig | ||
compare_output.zig | ||
compile_errors.zig | ||
gen_h.zig | ||
run_translated_c.zig | ||
runtime_safety.zig | ||
stack_traces.zig | ||
standalone.zig | ||
tests.zig | ||
translate_c.zig |