diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-11-01 16:52:52 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-11-04 09:09:01 +0100 |
| commit | abf6c20cb93f9b9b9b3ef0d935bd1e12063f4c36 (patch) | |
| tree | f8814a3fe4808816ed1660b8b534ce2b6c023c4c /src/link/Elf/ZigObject.zig | |
| parent | b1136a695f5cc463bafd6727ff5bb60d618d8ce9 (diff) | |
| download | zig-abf6c20cb93f9b9b9b3ef0d935bd1e12063f4c36.tar.gz zig-abf6c20cb93f9b9b9b3ef0d935bd1e12063f4c36.zip | |
elf: rename .rodata to .data.rel.ro and remove allocateAllocSection helper
Diffstat (limited to 'src/link/Elf/ZigObject.zig')
| -rw-r--r-- | src/link/Elf/ZigObject.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/link/Elf/ZigObject.zig b/src/link/Elf/ZigObject.zig index f5162dbc69..4cb1da9407 100644 --- a/src/link/Elf/ZigObject.zig +++ b/src/link/Elf/ZigObject.zig @@ -510,7 +510,7 @@ pub fn lowerAnonDecl( name, tv, decl_alignment, - elf_file.zig_rodata_section_index.?, + elf_file.zig_data_rel_ro_section_index.?, src_loc, ) catch |err| switch (err) { error.OutOfMemory => return error.OutOfMemory, @@ -622,7 +622,7 @@ fn getDeclShdrIndex(self: *ZigObject, elf_file: *Elf, decl_index: Module.Decl.In .Fn => elf_file.zig_text_section_index.?, else => blk: { if (decl.getOwnedVariable(mod)) |variable| { - if (variable.is_const) break :blk elf_file.zig_rodata_section_index.?; + if (variable.is_const) break :blk elf_file.zig_data_rel_ro_section_index.?; if (variable.init.toValue().isUndefDeep(mod)) { const mode = elf_file.base.options.optimize_mode; if (mode == .Debug or mode == .ReleaseSafe) break :blk elf_file.zig_data_section_index.?; @@ -636,7 +636,7 @@ fn getDeclShdrIndex(self: *ZigObject, elf_file: *Elf, decl_index: Module.Decl.In if (is_all_zeroes) break :blk elf_file.zig_bss_section_index.?; break :blk elf_file.zig_data_section_index.?; } - break :blk elf_file.zig_rodata_section_index.?; + break :blk elf_file.zig_data_rel_ro_section_index.?; }, }; return shdr_index; @@ -937,7 +937,7 @@ fn updateLazySymbol( const output_section_index = switch (sym.kind) { .code => elf_file.zig_text_section_index.?, - .const_data => elf_file.zig_rodata_section_index.?, + .const_data => elf_file.zig_data_rel_ro_section_index.?, }; const local_sym = elf_file.symbol(symbol_index); const phdr_index = elf_file.phdr_to_shdr_table.get(output_section_index).?; @@ -991,7 +991,7 @@ pub fn lowerUnnamedConst( name, typed_value, typed_value.ty.abiAlignment(mod), - elf_file.zig_rodata_section_index.?, + elf_file.zig_data_rel_ro_section_index.?, decl.srcLoc(mod), )) { .ok => |sym_index| sym_index, |
