diff options
author | Alan Modra <amodra@gmail.com> | 2003-06-27 00:38:25 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-06-27 00:38:25 +0000 |
commit | 0c7a8e5acd399d1d36dbe0cda815844dd5308c10 (patch) | |
tree | 1b0c74e9719dfd6d6b6b1b396373870147643680 /ld/emultempl/lnk960.em | |
parent | a9232bb2657c979e51dd77e8d823cd90c749e784 (diff) | |
download | gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.zip gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.tar.gz gdb-0c7a8e5acd399d1d36dbe0cda815844dd5308c10.tar.bz2 |
* emultempl/aix.em: Convert to C90, remove unnecessary prototypes
and casts. Replace PTR with void *. Formatting.
* emultempl/alphaelf.em: Likewise
* emultempl/armcoff.em: Likewise
* emultempl/armelf.em: Likewise
* emultempl/armelf_oabi.em: Likewise
* emultempl/beos.em: Likewise
* emultempl/elf32.em: Likewise
* emultempl/generic.em: Likewise
* emultempl/gld960.em: Likewise
* emultempl/gld960c.em: Likewise
* emultempl/hppaelf.em: Likewise
* emultempl/linux.em: Likewise
* emultempl/lnk960.em: Likewise
* emultempl/m68hc1xelf.em: Likewise
* emultempl/m68kcoff.em: Likewise
* emultempl/m68kelf.em: Likewise
* emultempl/mipsecoff.em: Likewise
* emultempl/mipself.em: Likewise
* emultempl/mmix-elfnmmo.em: Likewise
* emultempl/mmixelf.em: Likewise
* emultempl/mmo.em: Likewise
* emultempl/needrelax.em: Likewise
* emultempl/netbsd.em: Likewise
* emultempl/pe.em: Likewise
* emultempl/sh64elf.em: Likewise
* emultempl/sunos.em: Likewise
* emultempl/ticoff.em: Likewise
* emultempl/vanilla.em: Likewise
* emultempl/xtensaelf.em: Likewise
* Makefile.am: Correct dependencies.
* Makefile.in: Regenerate.
Diffstat (limited to 'ld/emultempl/lnk960.em')
-rw-r--r-- | ld/emultempl/lnk960.em | 64 |
1 files changed, 22 insertions, 42 deletions
diff --git a/ld/emultempl/lnk960.em b/ld/emultempl/lnk960.em index 56facaa..2c294ec 100644 --- a/ld/emultempl/lnk960.em +++ b/ld/emultempl/lnk960.em @@ -47,23 +47,9 @@ static lib_list_type **hll_list_tail = &hll_list; static lib_list_type *syslib_list; static lib_list_type **syslib_list_tail = &syslib_list; -static void append PARAMS ((lib_list_type ***, char *)); -static void lnk960_hll PARAMS ((char *)); -static void lnk960_syslib PARAMS ((char *)); -static void lnk960_before_parse PARAMS ((void)); -static void add_on PARAMS ((lib_list_type *, lang_input_file_enum_type)); -static void lnk960_after_parse PARAMS ((void)); -static void lnk960_before_allocation PARAMS ((void)); -static void lnk960_after_allocation PARAMS ((void)); -static void lnk960_set_output_arch PARAMS ((void)); -static char *lnk960_choose_target PARAMS ((int, char **)); -static char *lnk960_get_script PARAMS ((int *)); - static void -append (list, name) - lib_list_type ***list; - char *name; +append (lib_list_type ***list, char *name) { lib_list_type *element = (lib_list_type *) xmalloc (sizeof (lib_list_type)); @@ -78,8 +64,7 @@ static bfd_boolean had_hll = FALSE; static bfd_boolean had_hll_name = FALSE; static void -lnk960_hll (name) - char *name; +lnk960_hll (char *name) { had_hll = TRUE; if (name != (char *) NULL) @@ -89,9 +74,8 @@ lnk960_hll (name) } } -static void -lnk960_syslib (name) - char *name; +static void +lnk960_syslib (char *name) { append (&syslib_list_tail, name); } @@ -99,8 +83,8 @@ lnk960_syslib (name) #ifdef GNU960 -static void -lnk960_before_parse () +static void +lnk960_before_parse (void) { static char *env_variables[] = { "G960LIB", "G960BASE", 0 }; char **p; @@ -123,8 +107,8 @@ lnk960_before_parse () #else /* not GNU960 */ -static void -lnk960_before_parse () +static void +lnk960_before_parse (void) { char *name = getenv ("I960BASE"); @@ -145,9 +129,7 @@ lnk960_before_parse () static void -add_on (list, search) - lib_list_type *list; - lang_input_file_enum_type search; +add_on (lib_list_type *list, lang_input_file_enum_type search) { while (list) { @@ -155,15 +137,16 @@ add_on (list, search) list = list->next; } } + static void -lnk960_after_parse () +lnk960_after_parse (void) { /* If there has been no arch, default to -KB */ if (ldfile_output_machine_name[0] == 0) ldfile_add_arch ("KB"); /* if there has been no hll list then add our own */ - + if (had_hll && !had_hll_name) { append (&hll_list_tail, "cg"); @@ -171,18 +154,18 @@ lnk960_after_parse () || ldfile_output_machine == bfd_mach_i960_ca) append (&hll_list_tail, "fpg"); } - + add_on (hll_list, lang_input_file_is_l_enum); add_on (syslib_list, lang_input_file_is_search_file_enum); } static void -lnk960_before_allocation () +lnk960_before_allocation (void) { } static void -lnk960_after_allocation () +lnk960_after_allocation (void) { if (!link_info.relocatable) { @@ -197,7 +180,7 @@ lnk960_after_allocation () static struct { unsigned long number; - char *name; + char *name; } machine_table[] = { @@ -227,7 +210,7 @@ machine_table[] = }; static void -lnk960_set_output_arch () +lnk960_set_output_arch (void) { /* Set the output architecture and machine if possible */ unsigned int i; @@ -245,9 +228,7 @@ lnk960_set_output_arch () } static char * -lnk960_choose_target (argc, argv) - int argc ATTRIBUTE_UNUSED; - char **argv ATTRIBUTE_UNUSED; +lnk960_choose_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { #ifdef GNU960 @@ -268,8 +249,7 @@ lnk960_choose_target (argc, argv) } static char * -lnk960_get_script (isfile) - int *isfile; +lnk960_get_script (int *isfile) EOF if test -n "$COMPILE_IN" @@ -280,7 +260,7 @@ then sc="-f stringify.sed" cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 0; if (link_info.relocatable && config.build_constructors) @@ -301,7 +281,7 @@ else # Scripts read from the filesystem. cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 1; if (link_info.relocatable && config.build_constructors) @@ -321,7 +301,7 @@ fi cat >>e${EMULATION_NAME}.c <<EOF -struct ld_emulation_xfer_struct ld_lnk960_emulation = +struct ld_emulation_xfer_struct ld_lnk960_emulation = { lnk960_before_parse, lnk960_syslib, |