mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Merge pull request #20788 from alexrp/elf-dt
`std.elf`: Add some definitions for the newer RELR relocations
This commit is contained in:
commit
1240134c8b
@ -84,7 +84,10 @@ pub const DT_ENCODING = 32;
|
|||||||
pub const DT_PREINIT_ARRAY = 32;
|
pub const DT_PREINIT_ARRAY = 32;
|
||||||
pub const DT_PREINIT_ARRAYSZ = 33;
|
pub const DT_PREINIT_ARRAYSZ = 33;
|
||||||
pub const DT_SYMTAB_SHNDX = 34;
|
pub const DT_SYMTAB_SHNDX = 34;
|
||||||
pub const DT_NUM = 35;
|
pub const DT_RELRSZ = 35;
|
||||||
|
pub const DT_RELR = 36;
|
||||||
|
pub const DT_RELRENT = 37;
|
||||||
|
pub const DT_NUM = 38;
|
||||||
pub const DT_LOOS = 0x6000000d;
|
pub const DT_LOOS = 0x6000000d;
|
||||||
pub const DT_HIOS = 0x6ffff000;
|
pub const DT_HIOS = 0x6ffff000;
|
||||||
pub const DT_LOPROC = 0x70000000;
|
pub const DT_LOPROC = 0x70000000;
|
||||||
@ -859,6 +862,8 @@ pub const Elf64_Rela = extern struct {
|
|||||||
return @truncate(self.r_info);
|
return @truncate(self.r_info);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
pub const Elf32_Relr = Elf32_Word;
|
||||||
|
pub const Elf64_Relr = Elf64_Xword;
|
||||||
pub const Elf32_Dyn = extern struct {
|
pub const Elf32_Dyn = extern struct {
|
||||||
d_tag: Elf32_Sword,
|
d_tag: Elf32_Sword,
|
||||||
d_val: Elf32_Addr,
|
d_val: Elf32_Addr,
|
||||||
@ -1052,6 +1057,11 @@ pub const Rela = switch (@sizeOf(usize)) {
|
|||||||
8 => Elf64_Rela,
|
8 => Elf64_Rela,
|
||||||
else => @compileError("expected pointer size of 32 or 64"),
|
else => @compileError("expected pointer size of 32 or 64"),
|
||||||
};
|
};
|
||||||
|
pub const Relr = switch (@sizeOf(usize)) {
|
||||||
|
4 => Elf32_Relr,
|
||||||
|
8 => Elf64_Relr,
|
||||||
|
else => @compileError("expected pointer size of 32 or 64"),
|
||||||
|
};
|
||||||
pub const Shdr = switch (@sizeOf(usize)) {
|
pub const Shdr = switch (@sizeOf(usize)) {
|
||||||
4 => Elf32_Shdr,
|
4 => Elf32_Shdr,
|
||||||
8 => Elf64_Shdr,
|
8 => Elf64_Shdr,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user