提交 7eda27d0 编写于 作者: R Rich Felker

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.
上级 ba0d83e8
...@@ -79,7 +79,7 @@ int __libc_start_main(int (*main)(int,char **,char **), int argc, char **argv) ...@@ -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 /* 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)(int (*)(int,char **,char **), int, char **);
__asm__ ( "" : "=r"(stage2) : "0"(libc_start_main_stage2) : "memory" ); __asm__ ( "" : "=r"(stage2) : "0"(libc_start_main_stage2) : "memory" );
return stage2(main, argc, argv); return stage2(main, argc, argv);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册