diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-10-18 11:44:49 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-10-18 11:44:49 -0400 |
commit | 7eda27d025d6d52f855588590366c83d737eb727 (patch) | |
tree | d8114c16a84770e1b37ae1983dbaa2386ca768ad /src | |
parent | ba0d83e822b9ea386881feaa1e478114d147bd27 (diff) | |
download | musl-7eda27d025d6d52f855588590366c83d737eb727.zip musl-7eda27d025d6d52f855588590366c83d737eb727.tar.gz musl-7eda27d025d6d52f855588590366c83d737eb727.tar.bz2 |
use prototype for function pointer in static link libc init barrier
this is not needed for correctness, but doesn't hurt, and in some
cases the compiler may pessimize the call assuming the callee might be
variadic when it lacks a prototype.
Diffstat (limited to 'src')
-rw-r--r-- | src/env/__libc_start_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c index f9aa019..b4965d7 100644 --- a/src/env/__libc_start_main.c +++ b/src/env/__libc_start_main.c @@ -79,7 +79,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)(); + int (*stage2)(int (*)(int,char **,char **), int, char **); __asm__ ( "" : "=r"(stage2) : "0"(libc_start_main_stage2) : "memory" ); return stage2(main, argc, argv); } |