diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 2002-07-17 20:33:30 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 2002-07-17 20:33:30 +0000 |
commit | a85e98d4f44d87ee2e99ab2ef1e200f81272b671 (patch) | |
tree | 418a7abf19738dd61239f29cb86c20874d251ebd /gnu/usr.bin | |
parent | e89b614845645f8b3be4cd441f1c21ea5ed1aa64 (diff) |
un-__P the code. fgs says "looks ok."
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/ld/arm32/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/i386/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 62 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ld.h | 168 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ldconfig/ldconfig.c | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/lib.c | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/m68k/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/m88k/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ns32k/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 66 | ||||
-rw-r--r-- | gnu/usr.bin/ld/sparc/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/vax/md.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/ld/warnings.c | 10 |
13 files changed, 203 insertions, 211 deletions
diff --git a/gnu/usr.bin/ld/arm32/md.h b/gnu/usr.bin/ld/arm32/md.h index 3bd535203cc..f1fdd766c51 100644 --- a/gnu/usr.bin/ld/arm32/md.h +++ b/gnu/usr.bin/ld/arm32/md.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md.h,v 1.3 2002/07/15 21:05:57 marc Exp $ */ +/* $OpenBSD: md.h,v 1.4 2002/07/17 20:33:29 marc Exp $ */ /* $NetBSD: md.h,v 1.1 1996/05/17 21:51:10 mark Exp $ */ /* @@ -155,11 +155,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/i386/md.h b/gnu/usr.bin/ld/i386/md.h index bada0ddc391..4696be25323 100644 --- a/gnu/usr.bin/ld/i386/md.h +++ b/gnu/usr.bin/ld/i386/md.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: md.h,v 1.6 2002/07/15 21:05:57 marc Exp $*/ +/* * $OpenBSD: md.h,v 1.7 2002/07/17 20:33:29 marc Exp $*/ /* * Copyright (c) 1993 Paul Kranenburg * All rights reserved. @@ -178,11 +178,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index dd599484d83..50736ab7a0a 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.c,v 1.25 2002/07/15 21:05:56 marc Exp $ */ +/* $OpenBSD: ld.c,v 1.26 2002/07/17 20:33:29 marc Exp $ */ /* $NetBSD: ld.c,v 1.52 1998/02/20 03:12:51 jonathan Exp $ */ /*- @@ -249,34 +249,34 @@ int warn_forwards_compatible_inexact = 1; int warn_forwards_compatible_inexact = 0; #endif -static void decode_option __P((char *, char *)); -static void decode_command __P((int, char **)); -static int classify_arg __P((char *)); -static void load_symbols __P((void)); -static void enter_global_ref __P((struct localsymbol *, - char *, struct file_entry *)); -static void digest_symbols __P((void)); -static void digest_pass1 __P((void)), digest_pass2 __P((void)); -static void consider_file_section_lengths __P((struct file_entry *)); -static void relocate_file_addresses __P((struct file_entry *)); -static void consider_relocation __P((struct file_entry *, int)); -static void consider_local_symbols __P((struct file_entry *)); -static void perform_relocation __P((char *, int, - struct relocation_info *, int, - struct file_entry *, int)); -static void copy_text __P((struct file_entry *)); -static void copy_data __P((struct file_entry *)); -static void coptxtrel __P((struct file_entry *)); -static void copdatrel __P((struct file_entry *)); -static void write_output __P((void)); -static void write_header __P((void)); -static void write_text __P((void)); -static void write_data __P((void)); -static void write_rel __P((void)); -static void write_syms __P((void)); -static void assign_symbolnums __P((struct file_entry *, int *)); -static void cleanup __P((void)); -static int parse __P((char *, char *, char *)); +static void decode_option(char *, char *); +static void decode_command(int, char **); +static int classify_arg(char *); +static void load_symbols(void); +static void enter_global_ref(struct localsymbol *, + char *, struct file_entry *); +static void digest_symbols(void); +static void digest_pass1(void), digest_pass2(void); +static void consider_file_section_lengths(struct file_entry *); +static void relocate_file_addresses(struct file_entry *); +static void consider_relocation(struct file_entry *, int); +static void consider_local_symbols(struct file_entry *); +static void perform_relocation(char *, int, + struct relocation_info *, int, + struct file_entry *, int); +static void copy_text(struct file_entry *); +static void copy_data(struct file_entry *); +static void coptxtrel(struct file_entry *); +static void copdatrel(struct file_entry *); +static void write_output(void); +static void write_header(void); +static void write_text(void); +static void write_data(void); +static void write_rel(void); +static void write_syms(void); +static void assign_symbolnums(struct file_entry *, int *); +static void cleanup(void); +static int parse(char *, char *, char *); int @@ -3357,8 +3357,8 @@ copdatrel(entry) sizeof(struct relocation_info), outstream); } -void write_file_syms __P((struct file_entry *, int *)); -void write_string_table __P((void)); +void write_file_syms(struct file_entry *, int *); +void write_string_table(void); /* Offsets and current lengths of symbol and string tables in output file. */ diff --git a/gnu/usr.bin/ld/ld.h b/gnu/usr.bin/ld/ld.h index bd0e1284cf8..0672fb2406a 100644 --- a/gnu/usr.bin/ld/ld.h +++ b/gnu/usr.bin/ld/ld.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.h,v 1.10 2002/07/15 21:05:56 marc Exp $ */ +/* $OpenBSD: ld.h,v 1.11 2002/07/17 20:33:29 marc Exp $ */ /*- * This code is derived from software copyrighted by the Free Software @@ -17,14 +17,6 @@ #define min(a,b) ((a) < (b) ? (a) : (b)) #endif -#ifndef __P -#ifndef __STDC__ -#define __P(a) () -#else -#define __P(a) a -#endif -#endif - /* If compiled with GNU C, use the built-in alloca */ #if defined(__GNUC__) || defined(sparc) #define alloca __builtin_alloca @@ -615,103 +607,103 @@ extern int n_search_dirs; /* Length of above. */ extern int write_map; /* write a load map (`-M') */ -void read_header __P((int, struct file_entry *)); -void read_entry_symbols __P((int, struct file_entry *)); -void read_entry_strings __P((int, struct file_entry *)); -void read_entry_relocation __P((int, struct file_entry *)); -void enter_file_symbols __P((struct file_entry *)); -void read_file_symbols __P((struct file_entry *)); -int set_element_prefixed_p __P((char *)); -int text_offset __P((struct file_entry *)); -int file_open __P((struct file_entry *)); -void each_file __P((void (*)(), void *)); -void each_full_file __P((void (*)(), void *)); -unsigned long check_each_file __P((unsigned long (*)(), void *)); -void mywrite __P((void *, int, int, FILE *)); -void padfile __P((int, FILE *)); +void read_header(int, struct file_entry *); +void read_entry_symbols(int, struct file_entry *); +void read_entry_strings(int, struct file_entry *); +void read_entry_relocation(int, struct file_entry *); +void enter_file_symbols(struct file_entry *); +void read_file_symbols(struct file_entry *); +int set_element_prefixed_p(char *); +int text_offset(struct file_entry *); +int file_open(struct file_entry *); +void each_file(void (*)(), void *); +void each_full_file(void (*)(), void *); +unsigned long check_each_file(unsigned long (*)(), void *); +void mywrite(void *, int, int, FILE *); +void padfile(int, FILE *); extern int will_see_later(const char *); /* In warnings.c: */ -void perror_name __P((char *)); -void perror_file __P((struct file_entry *)); -void print_symbols __P((FILE *)); -char *get_file_name __P((struct file_entry *)); -void print_file_name __P((struct file_entry *, FILE *)); -void prline_file_name __P((struct file_entry *, FILE *)); -int do_warnings __P((FILE *)); +void perror_name(char *); +void perror_file(struct file_entry *); +void print_symbols(FILE *); +char *get_file_name(struct file_entry *); +void print_file_name(struct file_entry *, FILE *); +void prline_file_name(struct file_entry *, FILE *); +int do_warnings(FILE *); /* In etc.c: */ -char *xstrdup __P((const char *)); -void *xmalloc __P((size_t)); -void *xrealloc __P((void *, size_t)); -char *concat __P((const char *, const char *, const char *)); +char *xstrdup(const char *); +void *xmalloc(size_t); +void *xrealloc(void *, size_t); +char *concat(const char *, const char *, const char *); /* In symbol.c: */ -void symtab_init __P((int)); -symbol *getsym __P((char *)), *getsym_soft __P((char *)); +void symtab_init(int); +symbol *getsym(char *), *getsym_soft(char *); /* In lib.c: */ -void search_library __P((int, struct file_entry *)); -void read_shared_object __P((int, struct file_entry *)); -int findlib __P((struct file_entry *)); +void search_library(int, struct file_entry *); +void read_shared_object(int, struct file_entry *); +int findlib(struct file_entry *); /* In shlib.c: */ -char *findshlib __P((char *, int *, int *, int)); -void add_search_dir __P((char *)); -void add_search_path __P((char *)); -void std_search_path __P((void)); -int getdewey __P((int[], char *)); -int cmpndewey __P((int[], int, int[], int)); +char *findshlib(char *, int *, int *, int); +void add_search_dir(char *); +void add_search_path(char *); +void std_search_path(void); +int getdewey(int[], char *); +int cmpndewey(int[], int, int[], int); /* In rrs.c: */ -void init_rrs __P((void)); -int rrs_add_shobj __P((struct file_entry *)); -void alloc_rrs_reloc __P((struct file_entry *, symbol *)); -void alloc_rrs_segment_reloc __P((struct file_entry *, struct relocation_info *)); -void alloc_rrs_jmpslot __P((struct file_entry *, symbol *)); -void alloc_rrs_gotslot __P((struct file_entry *, struct relocation_info *, localsymbol_t *)); -void alloc_rrs_cpy_reloc __P((struct file_entry *, symbol *)); - -int claim_rrs_reloc __P((struct file_entry *, struct relocation_info *, symbol *, long *)); -long claim_rrs_jmpslot __P((struct file_entry *, struct relocation_info *, symbol *, long)); -long claim_rrs_gotslot __P((struct file_entry *, struct relocation_info *, struct localsymbol *, long)); -long claim_rrs_internal_gotslot __P((struct file_entry *, struct relocation_info *, struct localsymbol *, long)); -void claim_rrs_cpy_reloc __P((struct file_entry *, struct relocation_info *, symbol *)); -void claim_rrs_segment_reloc __P((struct file_entry *, struct relocation_info *)); -void consider_rrs_section_lengths __P((void)); -void relocate_rrs_addresses __P((void)); -void write_rrs __P((void)); -void rrs_summarize_warnings __P((void)); +void init_rrs(void); +int rrs_add_shobj(struct file_entry *); +void alloc_rrs_reloc(struct file_entry *, symbol *); +void alloc_rrs_segment_reloc(struct file_entry *, struct relocation_info *); +void alloc_rrs_jmpslot(struct file_entry *, symbol *); +void alloc_rrs_gotslot(struct file_entry *, struct relocation_info *, localsymbol_t *); +void alloc_rrs_cpy_reloc(struct file_entry *, symbol *); + +int claim_rrs_reloc(struct file_entry *, struct relocation_info *, symbol *, long *); +long claim_rrs_jmpslot(struct file_entry *, struct relocation_info *, symbol *, long); +long claim_rrs_gotslot(struct file_entry *, struct relocation_info *, struct localsymbol *, long); +long claim_rrs_internal_gotslot(struct file_entry *, struct relocation_info *, struct localsymbol *, long); +void claim_rrs_cpy_reloc(struct file_entry *, struct relocation_info *, symbol *); +void claim_rrs_segment_reloc(struct file_entry *, struct relocation_info *); +void consider_rrs_section_lengths(void); +void relocate_rrs_addresses(void); +void write_rrs(void); +void rrs_summarize_warnings(void); /* In <md>.c */ -void md_init_header __P((struct exec *, int, int)); -long md_get_addend __P((struct relocation_info *, unsigned char *)); -void md_relocate __P((struct relocation_info *, long, unsigned char *, int)); -void md_make_jmpslot __P((jmpslot_t *, long, long)); -void md_fix_jmpslot __P((jmpslot_t *, long, u_long)); -int md_make_reloc __P((struct relocation_info *, struct relocation_info *, int)); -void md_make_jmpreloc __P((struct relocation_info *, struct relocation_info *, int)); -void md_make_gotreloc __P((struct relocation_info *, struct relocation_info *, int)); -void md_make_copyreloc __P((struct relocation_info *, struct relocation_info *)); -void md_set_breakpoint __P((long, long *)); +void md_init_header(struct exec *, int, int); +long md_get_addend(struct relocation_info *, unsigned char *); +void md_relocate(struct relocation_info *, long, unsigned char *, int); +void md_make_jmpslot(jmpslot_t *, long, long); +void md_fix_jmpslot(jmpslot_t *, long, u_long); +int md_make_reloc(struct relocation_info *, struct relocation_info *, int); +void md_make_jmpreloc(struct relocation_info *, struct relocation_info *, int); +void md_make_gotreloc(struct relocation_info *, struct relocation_info *, int); +void md_make_copyreloc(struct relocation_info *, struct relocation_info *); +void md_set_breakpoint(long, long *); #ifdef NEED_SWAP -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); /* In xbits.c: */ -void swap_longs __P((long *, int)); -void swap_symbols __P((struct nlist *, int)); -void swap_zsymbols __P((struct nzlist *, int)); +void swap_longs(long *, int); +void swap_symbols(struct nlist *, int); +void swap_zsymbols(struct nzlist *, int); struct ranlib; /* keep pedantic ISO compilers happy */ -void swap_ranlib_hdr __P((struct ranlib *, int)); -void swap__dynamic __P((struct _dynamic *)); -void swap_section_dispatch_table __P((struct section_dispatch_table *)); -void swap_so_debug __P((struct so_debug *)); -void swapin_sod __P((struct sod *, int)); -void swapout_sod __P((struct sod *, int)); -void swap_rrs_hash __P((struct rrs_hash *, int)); +void swap_ranlib_hdr(struct ranlib *, int); +void swap__dynamic(struct _dynamic *); +void swap_section_dispatch_table(struct section_dispatch_table *); +void swap_so_debug(struct so_debug *); +void swapin_sod(struct sod *, int); +void swapout_sod(struct sod *, int); +void swap_rrs_hash(struct rrs_hash *, int); #endif diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.c b/gnu/usr.bin/ld/ldconfig/ldconfig.c index 3a0e3233cd4..d3748c5526a 100644 --- a/gnu/usr.bin/ld/ldconfig/ldconfig.c +++ b/gnu/usr.bin/ld/ldconfig/ldconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldconfig.c,v 1.11 2002/07/15 21:05:57 marc Exp $ */ +/* $OpenBSD: ldconfig.c,v 1.12 2002/07/17 20:33:29 marc Exp $ */ /* * Copyright (c) 1993,1995 Paul Kranenburg @@ -79,11 +79,11 @@ struct shlib_list { static struct shlib_list *shlib_head = NULL, **shlib_tail = &shlib_head; static char *dir_list; -static void enter __P((char *, char *, char *, int *, int)); -static int dodir __P((char *, int)); -static int buildhints __P((void)); -static int readhints __P((void)); -static void listhints __P((void)); +static void enter(char *, char *, char *, int *, int); +static int dodir(char *, int); +static int buildhints(void); +static int readhints(void); +static void listhints(void); int main(argc, argv) diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 32457262843..0a395c1c482 100644 --- a/gnu/usr.bin/ld/lib.c +++ b/gnu/usr.bin/ld/lib.c @@ -1,4 +1,4 @@ -/* * $OpenBSD: lib.c,v 1.7 2002/07/15 21:05:56 marc Exp $ - library routines*/ +/* * $OpenBSD: lib.c,v 1.8 2002/07/17 20:33:29 marc Exp $ - library routines*/ /* */ @@ -22,11 +22,11 @@ #include "ld.h" -static void linear_library __P((int, struct file_entry *)); -static void symdef_library __P((int, struct file_entry *, int)); -static struct file_entry *decode_library_subfile __P((int, +static void linear_library(int, struct file_entry *); +static void symdef_library(int, struct file_entry *, int); +static struct file_entry *decode_library_subfile(int, struct file_entry *, - int, int *)); + int, int *); /* * Search the library ENTRY, already open on descriptor FD. This means @@ -156,7 +156,7 @@ decode_library_subfile(fd, library_entry, subfile_offset, length_loc) return subentry; } -static int subfile_wanted_p __P((struct file_entry *)); +static int subfile_wanted_p(struct file_entry *); /* * Search a library that has a __.SYMDEF member. FD is a descriptor on diff --git a/gnu/usr.bin/ld/m68k/md.h b/gnu/usr.bin/ld/m68k/md.h index f1a7585e5fb..66274ee6bd6 100644 --- a/gnu/usr.bin/ld/m68k/md.h +++ b/gnu/usr.bin/ld/m68k/md.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: md.h,v 1.4 2002/07/15 21:05:57 marc Exp $*/ +/* * $OpenBSD: md.h,v 1.5 2002/07/17 20:33:29 marc Exp $*/ /* * - m68k dependent definitions */ @@ -128,11 +128,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/m88k/md.h b/gnu/usr.bin/ld/m88k/md.h index bf59628f562..f997e55ebd1 100644 --- a/gnu/usr.bin/ld/m88k/md.h +++ b/gnu/usr.bin/ld/m88k/md.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: md.h,v 1.5 2002/07/15 21:05:57 marc Exp $*/ +/* * $OpenBSD: md.h,v 1.6 2002/07/17 20:33:29 marc Exp $*/ /* * - m88k dependent definitions */ @@ -187,11 +187,11 @@ struct r_relocation_info_m88k { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/ns32k/md.h b/gnu/usr.bin/ld/ns32k/md.h index 408f98ae5d7..5f50873669e 100644 --- a/gnu/usr.bin/ld/ns32k/md.h +++ b/gnu/usr.bin/ld/ns32k/md.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md.h,v 1.5 2002/07/15 21:05:57 marc Exp $ */ +/* $OpenBSD: md.h,v 1.6 2002/07/17 20:33:29 marc Exp $ */ /* $NetBSD: md.h,v 1.3 1996/02/22 00:20:06 pk Exp $ */ /* @@ -100,11 +100,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); # define md_swapin_symbols(s,n) swap_symbols(s,n) # define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index cce7475cc5d..f3082588842 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld.c,v 1.25 2002/07/15 21:05:57 marc Exp $ */ +/* $OpenBSD: rtld.c,v 1.26 2002/07/17 20:33:29 marc Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -162,44 +162,44 @@ static int ld_warn_non_pure_code; static int ld_tracing; -static void *__dlopen __P((const char *, int)); -static int __dlclose __P((void *)); -static void *__dlsym __P((void *, const char *)); -static int __dlctl __P((void *, int, void *)); -static void __dlexit __P((void)); +static void *__dlopen(const char *, int); +static int __dlclose(void *); +static void *__dlsym(void *, const char *); +static int __dlctl(void *, int, void *); +static void __dlexit(void); static struct ld_entry ld_entry = { __dlopen, __dlclose, __dlsym, __dlctl, __dlexit }; - void xprintf __P((char *, ...)); - int rtld __P((int, struct crt_ldso *, struct _dynamic *)); - void binder_entry __P((void)); - long binder __P((jmpslot_t *)); -static int load_subs __P((struct so_map *)); -static struct so_map *map_object __P((struct sod *, struct so_map *)); -static void unmap_object __P((struct so_map *)); -static struct so_map *alloc_link_map __P(( char *, struct sod *, + void xprintf(char *, ...); + int rtld(int, struct crt_ldso *, struct _dynamic *); + void binder_entry(void); + long binder(jmpslot_t *); +static int load_subs(struct so_map *); +static struct so_map *map_object(struct sod *, struct so_map *); +static void unmap_object(struct so_map *); +static struct so_map *alloc_link_map( char *, struct sod *, struct so_map *, caddr_t, - size_t, struct _dynamic *)); -static void free_link_map __P((struct so_map *)); -static inline void check_text_reloc __P(( struct relocation_info *, + size_t, struct _dynamic *); +static void free_link_map(struct so_map *); +static inline void check_text_reloc( struct relocation_info *, struct so_map *, - caddr_t)); -static void init_maps __P((struct so_map *)); -static void reloc_map __P((struct so_map *)); -static void reloc_copy __P((struct so_map *)); -static void call_map __P((struct so_map *, char *)); -static char *rtfindlib __P((char *, int, int, int *, char *)); -static struct nzlist *lookup __P((const char *, struct so_map **, int)); -static inline struct rt_symbol *lookup_rts __P((const char *)); -static struct rt_symbol *enter_rts __P((const char *, long, int, caddr_t, - long, struct so_map *)); -static void maphints __P((void)); -static void unmaphints __P((void)); - -static void preload __P((char *)); -static void ld_trace __P((struct so_map *)); + caddr_t); +static void init_maps(struct so_map *); +static void reloc_map(struct so_map *); +static void reloc_copy(struct so_map *); +static void call_map(struct so_map *, char *); +static char *rtfindlib(char *, int, int, int *, char *); +static struct nzlist *lookup(const char *, struct so_map **, int); +static inline struct rt_symbol *lookup_rts(const char *); +static struct rt_symbol *enter_rts(const char *, long, int, caddr_t, + long, struct so_map *); +static void maphints(void); +static void unmaphints(void); + +static void preload(char *); +static void ld_trace(struct so_map *); static inline int strcmp (const char *s1, const char *s2) @@ -864,7 +864,7 @@ call_map(smp, sym) np = lookup(sym, &src_map, 1); if (np) - (*(void (*) __P((void)))(src_map->som_addr + np->nz_value))(); + (*(void (*) (void))(src_map->som_addr + np->nz_value))(); } /* diff --git a/gnu/usr.bin/ld/sparc/md.h b/gnu/usr.bin/ld/sparc/md.h index be78b854c15..3772f1b8a96 100644 --- a/gnu/usr.bin/ld/sparc/md.h +++ b/gnu/usr.bin/ld/sparc/md.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: md.h,v 1.7 2002/07/15 21:05:57 marc Exp $*/ +/* * $OpenBSD: md.h,v 1.8 2002/07/17 20:33:29 marc Exp $*/ /* * Copyright (c) 1993 Paul Kranenburg * All rights reserved. @@ -209,11 +209,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/vax/md.h b/gnu/usr.bin/ld/vax/md.h index 50d6a700ba9..e1ae1705168 100644 --- a/gnu/usr.bin/ld/vax/md.h +++ b/gnu/usr.bin/ld/vax/md.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md.h,v 1.8 2002/07/15 21:05:57 marc Exp $ */ +/* $OpenBSD: md.h,v 1.9 2002/07/17 20:33:29 marc Exp $ */ /* $NetBSD: md.h,v 1.1 1995/10/19 13:10:20 ragge Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -184,11 +184,11 @@ typedef struct jmpslot { /* Define IO byte swapping routines */ -void md_swapin_exec_hdr __P((struct exec *)); -void md_swapout_exec_hdr __P((struct exec *)); -void md_swapin_reloc __P((struct relocation_info *, int)); -void md_swapout_reloc __P((struct relocation_info *, int)); -void md_swapout_jmpslot __P((jmpslot_t *, int)); +void md_swapin_exec_hdr(struct exec *); +void md_swapout_exec_hdr(struct exec *); +void md_swapin_reloc(struct relocation_info *, int); +void md_swapout_reloc(struct relocation_info *, int); +void md_swapout_jmpslot(jmpslot_t *, int); #define md_swapin_symbols(s,n) swap_symbols(s,n) #define md_swapout_symbols(s,n) swap_symbols(s,n) diff --git a/gnu/usr.bin/ld/warnings.c b/gnu/usr.bin/ld/warnings.c index 04aba6f9364..3e98548a576 100644 --- a/gnu/usr.bin/ld/warnings.c +++ b/gnu/usr.bin/ld/warnings.c @@ -1,4 +1,4 @@ -/* * $OpenBSD: warnings.c,v 1.6 2002/07/15 21:05:56 marc Exp $*/ +/* * $OpenBSD: warnings.c,v 1.7 2002/07/17 20:33:29 marc Exp $*/ /* */ @@ -91,8 +91,8 @@ get_file_name (entry) /* Print a complete or partial map of the output file. */ -static void describe_file_sections __P((struct file_entry *, FILE *)); -static void list_file_locals __P((struct file_entry *, FILE *)); +static void describe_file_sections(struct file_entry *, FILE *); +static void list_file_locals(struct file_entry *, FILE *); void print_symbols(outfile) @@ -173,8 +173,8 @@ list_file_locals (entry, outfile) static int list_unresolved_refs; /* List unresolved refs */ static int list_multiple_defs; /* List multiple definitions */ -static struct line_debug_entry *init_debug_scan __P((int, struct file_entry *)); -static int next_debug_entry __P((int, struct line_debug_entry *)); +static struct line_debug_entry *init_debug_scan(int, struct file_entry *); +static int next_debug_entry(int, struct line_debug_entry *); /* * Structure for communication between do_file_warnings and it's |