diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/initfini.c | 5 | ||||
-rw-r--r-- | sysdeps/generic/libc-start.c | 11 | ||||
-rw-r--r-- | sysdeps/i386/i486/bits/string.h | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-osinfo.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/init-first.c | 6 |
5 files changed, 30 insertions, 12 deletions
diff --git a/sysdeps/generic/initfini.c b/sysdeps/generic/initfini.c index 836d606cfd..60dcdc0564 100644 --- a/sysdeps/generic/initfini.c +++ b/sysdeps/generic/initfini.c @@ -50,6 +50,7 @@ asm ("\n/*@HEADER_ENDS*/"); /* To determine whether we need .end and .align: */ asm ("\n/*@TESTS_BEGIN*/"); +extern void dummy (void (*foo) (void)); void dummy (void (*foo) (void)) { @@ -68,10 +69,11 @@ call_gmon_start(void) void (*gmon_start) (void) = __gmon_start__; if (gmon_start) - gmon_start (); + gmon_start (); } SECTION (".init"); +extern void _init (void); void _init (void) { @@ -97,6 +99,7 @@ asm ("\n/*@_init_EPILOG_ENDS*/"); asm ("\n/*@_fini_PROLOG_BEGINS*/"); SECTION (".fini"); +extern void _fini (void); void _fini (void) { diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index a95ce56d2b..c4b8bc6809 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -33,8 +33,15 @@ extern void *__libc_stack_end; extern void __pthread_initialize_minimal (void) __attribute__ ((weak)); #endif -/* Prototype for local function. */ -extern void __libc_check_standard_fds (void); + +extern int BP_SYM (__libc_start_main) (int (*main) (int, char **, char **), + int argc, + char *__unbounded *__unbounded ubp_av, + void (*init) (void), + void (*fini) (void), + void (*rtld_fini) (void), + void *__unbounded stack_end) + __attribute__ ((noreturn)); int /* GKM FIXME: GCC: this should get __BP_ prefix by virtue of the diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h index 532dcc103c..1a33630b29 100644 --- a/sysdeps/i386/i486/bits/string.h +++ b/sysdeps/i386/i486/bits/string.h @@ -1057,18 +1057,20 @@ __strncat_g (char *__dest, __const char __src[], size_t __n) : (__builtin_constant_p (s1) && sizeof ((s1)[0]) == 1 \ && sizeof ((s2)[0]) == 1 && strlen (s1) < 4 \ ? (__builtin_constant_p (s2) && sizeof ((s2)[0]) == 1 \ - ? __strcmp_cc ((unsigned char *) (s1), \ - (unsigned char *) (s2), strlen (s1)) \ - : __strcmp_cg ((unsigned char *) (s1), \ - (unsigned char *) (s2), strlen (s1))) \ + ? __strcmp_cc ((__const unsigned char *) (s1), \ + (__const unsigned char *) (s2), \ + strlen (s1)) \ + : __strcmp_cg ((__const unsigned char *) (s1), \ + (__const unsigned char *) (s2), \ + strlen (s1))) \ : (__builtin_constant_p (s2) && sizeof ((s1)[0]) == 1 \ && sizeof ((s2)[0]) == 1 && strlen (s2) < 4 \ ? (__builtin_constant_p (s1) \ - ? __strcmp_cc ((unsigned char *) (s1), \ - (unsigned char *) (s2), \ + ? __strcmp_cc ((__const unsigned char *) (s1), \ + (__const unsigned char *) (s2), \ strlen (s2)) \ - : __strcmp_gc ((unsigned char *) (s1), \ - (unsigned char *) (s2), \ + : __strcmp_gc ((__const unsigned char *) (s1), \ + (__const unsigned char *) (s2), \ strlen (s2))) \ : __strcmp_gg (s1, s2))))) diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 1834da8a9f..1a94d17960 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -71,7 +71,7 @@ dl_fatal (const char *str) make sure the library can actually work. */ \ FATAL ("FATAL: cannot determine library version\n"); \ __close (fd); \ - buf[MIN (reslen, sizeof (bufmem) - 1)] = '\0'; \ + buf[MIN (reslen, (ssize_t) sizeof (bufmem) - 1)] = '\0'; \ } \ else \ buf = uts.release; \ diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index 101523faca..0e5b4a287d 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -108,12 +108,16 @@ init (int argc, char **argv, char **envp) strong_alias (init, _init); +extern void __libc_init_first (void); + void __libc_init_first (void) { } #else +extern void __libc_init_first (int argc, char **argv, char **envp); + void __libc_init_first (int argc, char **argv, char **envp) { @@ -127,6 +131,8 @@ __libc_init_first (int argc, char **argv, char **envp) in ld.so causes disaster, because the _init definition above will cause ld.so to gain an init function, which is not a cool thing. */ +extern void _dl_start (void) __attribute__ ((noreturn)); + void _dl_start (void) { |