mirror of
git://git.musl-libc.org/musl
synced 2025-02-14 18:07:03 +00:00
fix error in constraints for static link libc init barrier
commit 4390383b32
inadvertently used "r"
instead of "0" for the input constraint, which only happened to work
for the configuration I tested it on because it usually makes sense
for the compiler to choose the same input and output register.
This commit is contained in:
parent
ab5e1e3408
commit
ba0d83e822
2
src/env/__libc_start_main.c
vendored
2
src/env/__libc_start_main.c
vendored
@ -80,7 +80,7 @@ int __libc_start_main(int (*main)(int,char **,char **), int argc, char **argv)
|
|||||||
/* Barrier against hoisting application code or anything using ssp
|
/* Barrier against hoisting application code or anything using ssp
|
||||||
* or thread pointer prior to its initialization above. */
|
* or thread pointer prior to its initialization above. */
|
||||||
int (*stage2)();
|
int (*stage2)();
|
||||||
__asm__ ( "" : "=r"(stage2) : "r"(libc_start_main_stage2) : "memory" );
|
__asm__ ( "" : "=r"(stage2) : "0"(libc_start_main_stage2) : "memory" );
|
||||||
return stage2(main, argc, argv);
|
return stage2(main, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user