authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-25 19:02:26+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-30 01:26:10+02:00
log68cebde186eb8507509c9418c1ab3b843c6f24ff
tree304a26c5c7eebe912994f03a72fc9f81cc685d25
parent5633767b20b1e2c9a650bdf6045c260ec4ce42ef
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux.start_pie: Inline the getDynamicSymbol() function.

On MIPS, this call will require a relocation, which we can't do until after PIE relocations have been applied.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/linux/start_pie.zig+1-1
......@@ -38,7 +38,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
3838// Obtain a pointer to the _DYNAMIC array.
3939// We have to compute its address as a PC-relative quantity not to require a
4040// relocation that, at this point, is not yet applied.
41fn getDynamicSymbol() [*]elf.Dyn {
41inline fn getDynamicSymbol() [*]elf.Dyn {
4242 return switch (builtin.cpu.arch) {
4343 .x86 => asm volatile (
4444 \\ .weak _DYNAMIC