start: Pass _start() into its own inline asm as an operand.

This commit is contained in:
Alex Rønne Petersen 2024-07-22 11:55:30 +02:00
parent 1fc42ed3e7
commit 142209444a
No known key found for this signature in database

View File

@ -340,8 +340,8 @@ fn _start() callconv(.Naked) noreturn {
,
.powerpc64, .powerpc64le =>
// Setup the initial stack frame and clear the back chain pointer.
\\ addis 2, 12, .TOC. - _start@ha
\\ addi 2, 2, .TOC. - _start@l
\\ addis 2, 12, .TOC. - %[_start]@ha
\\ addi 2, 2, .TOC. - %[_start]@l
\\ mr 3, 1
\\ clrrdi 1, 1, 4
\\ li 0, 0
@ -359,7 +359,8 @@ fn _start() callconv(.Naked) noreturn {
else => @compileError("unsupported arch"),
}
:
: [posixCallMainAndExit] "X" (&posixCallMainAndExit),
: [_start] "X" (_start),
[posixCallMainAndExit] "X" (&posixCallMainAndExit),
);
}