about summary refs log tree commit diff
path: root/src/env
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-10-18 11:41:47 -0400
committerRich Felker <dalias@aerifal.cx>2018-10-18 11:41:47 -0400
commitba0d83e822b9ea386881feaa1e478114d147bd27 (patch)
tree29069c6a429c793b39b8cab216c06dcccec9c681 /src/env
parentab5e1e340890b95e61d7161d7178c6a26247ad61 (diff)
downloadmusl-ba0d83e822b9ea386881feaa1e478114d147bd27.tar.gz
musl-ba0d83e822b9ea386881feaa1e478114d147bd27.tar.xz
musl-ba0d83e822b9ea386881feaa1e478114d147bd27.zip
fix error in constraints for static link libc init barrier
commit 4390383b32250a941ec616e8bff6f568a801b1c0 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.
Diffstat (limited to 'src/env')
-rw-r--r--src/env/__libc_start_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c
index 2e5f9dcb..f9aa019d 100644
--- a/src/env/__libc_start_main.c
+++ b/src/env/__libc_start_main.c
@@ -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
 	 * or thread pointer prior to its initialization above. */
 	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);
 }