mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
start: Always inline the call to std.os.linux.pie.relocate().
At this stage, we're not ready to make calls yet on some architectures (e.g. MIPS).
This commit is contained in:
parent
d6c637c36b
commit
d633b35f35
@ -472,10 +472,11 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn {
|
||||
break :init @as([*]elf.Phdr, @ptrFromInt(at_phdr))[0..at_phnum];
|
||||
};
|
||||
|
||||
// Apply the initial relocations as early as possible in the startup
|
||||
// process.
|
||||
// Apply the initial relocations as early as possible in the startup process. We cannot
|
||||
// make calls yet on some architectures (e.g. MIPS) *because* they haven't been applied yet,
|
||||
// so this must be fully inlined.
|
||||
if (builtin.position_independent_executable) {
|
||||
std.os.linux.pie.relocate(phdrs);
|
||||
@call(.always_inline, std.os.linux.pie.relocate, .{phdrs});
|
||||
}
|
||||
|
||||
// This must be done after PIE relocations have been applied or we may crash
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user