From 58ff985dd485e6d2ae723f8568be24f37bac0bd2 Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Tue, 27 Jun 2000 01:20:02 +0000 Subject: * Makeconfig: Add missing comment. * csu/Makefile (extra-objs, omit-deps, install-lib): Add BP-flavored startup object. ($(objpfx)b$(start-installed-name)): New rule. * include/libc-symbols.h (symbol_set_declare): Change type of `__start_##set' and `__stop_##set' to pointer-to-function. (symbol_set_declare): Change type of `set' to array of pointer-to-function. * include/set-hooks.h (RUN_HOOK): Change type of `ptr' to pointer-to-function. * Makeconfig: Add missing comment. * csu/Makefile (extra-objs, omit-deps, install-lib): Add BP-flavored startup object. ($(objpfx)b$(start-installed-name)): New rule. * include/libc-symbols.h (symbol_set_declare): Change type of `__start_##set' and `__stop_##set' to pointer-to-function. (symbol_set_declare): Change type of `set' to array of pointer-to-function. * include/set-hooks.h (RUN_HOOK): Change type of `ptr' to pointer-to-function. --- include/libc-symbols.h | 6 +++--- include/set-hooks.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 1a3e1c8239..10232bfdd4 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -239,8 +239,8 @@ /* Declare SET for use in this module, if defined in another module. */ # define symbol_set_declare(set) \ - extern void *const __start_##set __attribute__ ((__weak__)); \ - extern void *const __stop_##set __attribute__ ((__weak__)); \ + extern void (*const __start_##set) (void) __attribute__ ((__weak__)); \ + extern void (*const __stop_##set) (void) __attribute__ ((__weak__)); \ weak_extern (__start_##set) weak_extern (__stop_##set) /* Return a pointer (void *const *) to the first element of SET. */ @@ -258,7 +258,7 @@ asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol) # define bss_set_element(set, symbol) ?error Must use initialized data. # define symbol_set_define(set) void *const (set)[1]; -# define symbol_set_declare(set) extern void *const (set)[1]; +# define symbol_set_declare(set) extern void (*const (set)[1]) (void); # define symbol_set_first_element(set) &(set)[1] # define symbol_set_end_p(set, ptr) (*(ptr) == 0) diff --git a/include/set-hooks.h b/include/set-hooks.h index 1666485e50..f4d7246567 100644 --- a/include/set-hooks.h +++ b/include/set-hooks.h @@ -42,7 +42,7 @@ # define RUN_HOOK(NAME, ARGS) \ do { \ - void *const *ptr; \ + void (*const *ptr) (void); \ for (ptr = symbol_set_first_element (NAME); \ ! symbol_set_end_p (NAME, ptr); ++ptr) \ (*(__##NAME##_hook_function_t *) *ptr) ARGS; \ -- cgit v1.2.1