| ... | ... | @@ -3394,6 +3394,14 @@ fn initSections(self: *Elf) !void { |
| 3394 | 3394 | }); |
| 3395 | 3395 | } |
| 3396 | 3396 | |
| 3397 | self.got_plt_section_index = try self.addSection(.{ |
| 3398 | .name = ".got.plt", |
| 3399 | .type = elf.SHT_PROGBITS, |
| 3400 | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, |
| 3401 | .addralign = @alignOf(u64), |
| 3402 | .offset = std.math.maxInt(u64), |
| 3403 | }); |
| 3404 | |
| 3397 | 3405 | const needs_rela_dyn = blk: { |
| 3398 | 3406 | if (self.got.flags.needs_rela or self.got.flags.needs_tlsld or |
| 3399 | 3407 | self.zig_got.flags.needs_rela or self.copy_rel.symbols.items.len > 0) break :blk true; |
| ... | ... | @@ -3424,13 +3432,6 @@ fn initSections(self: *Elf) !void { |
| 3424 | 3432 | .addralign = 16, |
| 3425 | 3433 | .offset = std.math.maxInt(u64), |
| 3426 | 3434 | }); |
| 3427 | | self.got_plt_section_index = try self.addSection(.{ |
| 3428 | | .name = ".got.plt", |
| 3429 | | .type = elf.SHT_PROGBITS, |
| 3430 | | .flags = elf.SHF_ALLOC | elf.SHF_WRITE, |
| 3431 | | .addralign = @alignOf(u64), |
| 3432 | | .offset = std.math.maxInt(u64), |
| 3433 | | }); |
| 3434 | 3435 | self.rela_plt_section_index = try self.addSection(.{ |
| 3435 | 3436 | .name = ".rela.plt", |
| 3436 | 3437 | .type = elf.SHT_RELA, |