mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 04:25:05 +00:00
elf: emit .got.plt when emitting .plt
This commit is contained in:
parent
e53fa93170
commit
2f497f9f05
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user