| ... | @@ -3962,12 +3962,6 @@ fn initSections(self: *Elf) !void { | ... | @@ -3962,12 +3962,6 @@ fn initSections(self: *Elf) !void { |
| 3962 | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, | 3962 | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, |
| 3963 | .addralign = ptr_size, | 3963 | .addralign = ptr_size, |
| 3964 | }); | 3964 | }); |
| 3965 | self.got_plt_section_index = try self.addSection(.{ | | |
| 3966 | .name = ".got.plt", | | |
| 3967 | .type = elf.SHT_PROGBITS, | | |
| 3968 | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, | | |
| 3969 | .addralign = @alignOf(u64), | | |
| 3970 | }); | | |
| 3971 | } | 3965 | } |
| 3972 | | 3966 | |
| 3973 | const needs_rela_dyn = blk: { | 3967 | const needs_rela_dyn = blk: { |
| ... | @@ -3995,6 +3989,12 @@ fn initSections(self: *Elf) !void { | ... | @@ -3995,6 +3989,12 @@ fn initSections(self: *Elf) !void { |
| 3995 | .flags = elf.SHF_ALLOC | elf.SHF_EXECINSTR, | 3989 | .flags = elf.SHF_ALLOC | elf.SHF_EXECINSTR, |
| 3996 | .addralign = 16, | 3990 | .addralign = 16, |
| 3997 | }); | 3991 | }); |
| | 3992 | self.got_plt_section_index = try self.addSection(.{ |
| | 3993 | .name = ".got.plt", |
| | 3994 | .type = elf.SHT_PROGBITS, |
| | 3995 | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, |
| | 3996 | .addralign = @alignOf(u64), |
| | 3997 | }); |
| 3998 | self.rela_plt_section_index = try self.addSection(.{ | 3998 | self.rela_plt_section_index = try self.addSection(.{ |
| 3999 | .name = ".rela.plt", | 3999 | .name = ".rela.plt", |
| 4000 | .type = elf.SHT_RELA, | 4000 | .type = elf.SHT_RELA, |