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) {...@@ -38,7 +38,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
38// Obtain a pointer to the _DYNAMIC array.38// Obtain a pointer to the _DYNAMIC array.
39// We have to compute its address as a PC-relative quantity not to require a39// We have to compute its address as a PC-relative quantity not to require a
40// relocation that, at this point, is not yet applied.40// relocation that, at this point, is not yet applied.
41fn getDynamicSymbol() [*]elf.Dyn {41inline fn getDynamicSymbol() [*]elf.Dyn {
42 return switch (builtin.cpu.arch) {42 return switch (builtin.cpu.arch) {
43 .x86 => asm volatile (43 .x86 => asm volatile (
44 \\ .weak _DYNAMIC44 \\ .weak _DYNAMIC