summaryrefslogtreecommitdiff
path: root/sysdeps/nacl/dl-sysdep.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-04-07 16:16:04 -0700
committerRoland McGrath <roland@hack.frob.com>2015-04-07 16:16:04 -0700
commit49a3a2bc136d6ea9f3032d3396c72e980190b68a (patch)
treeb82ce57765baf6cd6527804967e69b38c5437285 /sysdeps/nacl/dl-sysdep.c
parentd3de4b133c3d2a1aef4c4a839648fcd2e6b52f69 (diff)
downloadglibc-roland/nacl-port/master.tar
glibc-roland/nacl-port/master.tar.gz
glibc-roland/nacl-port/master.tar.bz2
glibc-roland/nacl-port/master.zip
Random nits prepping for upstreaming.roland/nacl-port/master
Diffstat (limited to 'sysdeps/nacl/dl-sysdep.c')
-rw-r--r--sysdeps/nacl/dl-sysdep.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sysdeps/nacl/dl-sysdep.c b/sysdeps/nacl/dl-sysdep.c
index f9af5a3acb..3e902c2cae 100644
--- a/sysdeps/nacl/dl-sysdep.c
+++ b/sysdeps/nacl/dl-sysdep.c
@@ -48,15 +48,15 @@
macro in the machine-specific dl-machine.h file. At this point, dynamic
linking has been completed and the first argument is the application's
entry point. */
-attribute_hidden internal_function
+attribute_hidden internal_function __attribute__ ((noreturn))
void
_dl_start_user (void (*user_entry) (uint32_t info[]), uint32_t info[])
{
if (_dl_skip_args > 0)
{
/* There are some arguments that the user program should not see.
- Just slide up the INFO pointer so its NACL_STARTUP_ARGV points
- to what should now be argv[0], and copy back the earlier fields. */
+ Just slide up the INFO pointer so its NACL_STARTUP_ARGV points
+ to what should now be argv[0], and copy back the earlier fields. */
assert (nacl_startup_argc (info) >= _dl_skip_args);
assert (NACL_STARTUP_ARGV == 3);
uint32_t envc = info[NACL_STARTUP_ENVC];
@@ -71,12 +71,15 @@ _dl_start_user (void (*user_entry) (uint32_t info[]), uint32_t info[])
/* Run initializers. */
_dl_init (GL(dl_ns)[0]._ns_loaded,
- nacl_startup_argc (info),
- nacl_startup_argv (info),
- nacl_startup_envp (info));
+ nacl_startup_argc (info),
+ nacl_startup_argv (info),
+ nacl_startup_envp (info));
/* Call the user's entry point. This should never return. */
(*user_entry) (info);
+
+ /* Fail clearly just in case it did return. */
+ __builtin_trap ();
}
# define DL_SYSDEP_INIT __nacl_initialize_interfaces ()