mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 19:53:32 +08:00
NaCl: Call __nacl_main in preference to main.
This commit is contained in:
parent
d8725b1fba
commit
f971949308
@ -1,3 +1,8 @@
|
||||
2015-08-25 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* sysdeps/nacl/start.c (_start): Call __nacl_main instead of main
|
||||
if the weak reference is not null.
|
||||
|
||||
2015-08-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86_64/strcmp.S: Remove "#if !IS_IN (libc)".
|
||||
|
@ -44,6 +44,10 @@
|
||||
/* The application defines this, of course. */
|
||||
extern int main (int argc, char **argv, char **envp);
|
||||
|
||||
/* But maybe it defines this too, in which case it takes precedence. */
|
||||
extern int __nacl_main (int argc, char **argv, char **envp)
|
||||
__attribute__ ((weak));
|
||||
|
||||
/* These are defined in libc. */
|
||||
extern int __libc_csu_init (int argc, char **argv, char **envp);
|
||||
extern void __libc_csu_fini (void);
|
||||
@ -59,7 +63,7 @@ _start (uint32_t info[])
|
||||
{
|
||||
/* The generic code actually assumes that envp follows argv. */
|
||||
|
||||
__libc_start_main (&main,
|
||||
__libc_start_main (&__nacl_main ?: &main,
|
||||
nacl_startup_argc (info),
|
||||
nacl_startup_argv (info),
|
||||
nacl_startup_auxv (info),
|
||||
|
Loading…
Reference in New Issue
Block a user