Commit 2f497f9f05
Changed files (1)
src
link
src/link/Elf.zig
@@ -3962,12 +3962,6 @@ fn initSections(self: *Elf) !void {
.flags = elf.SHF_ALLOC | elf.SHF_WRITE,
.addralign = ptr_size,
});
- self.got_plt_section_index = try self.addSection(.{
- .name = ".got.plt",
- .type = elf.SHT_PROGBITS,
- .flags = elf.SHF_ALLOC | elf.SHF_WRITE,
- .addralign = @alignOf(u64),
- });
}
const needs_rela_dyn = blk: {
@@ -3995,6 +3989,12 @@ fn initSections(self: *Elf) !void {
.flags = elf.SHF_ALLOC | elf.SHF_EXECINSTR,
.addralign = 16,
});
+ self.got_plt_section_index = try self.addSection(.{
+ .name = ".got.plt",
+ .type = elf.SHT_PROGBITS,
+ .flags = elf.SHF_ALLOC | elf.SHF_WRITE,
+ .addralign = @alignOf(u64),
+ });
self.rela_plt_section_index = try self.addSection(.{
.name = ".rela.plt",
.type = elf.SHT_RELA,