diff options
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/aix.em | 151 | ||||
-rw-r--r-- | ld/emultempl/armcoff.em | 31 | ||||
-rw-r--r-- | ld/emultempl/armelf.em | 14 | ||||
-rw-r--r-- | ld/emultempl/armelf_oabi.em | 28 | ||||
-rw-r--r-- | ld/emultempl/beos.em | 40 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 150 | ||||
-rw-r--r-- | ld/emultempl/generic.em | 28 | ||||
-rw-r--r-- | ld/emultempl/gld960.em | 34 | ||||
-rw-r--r-- | ld/emultempl/gld960c.em | 34 | ||||
-rw-r--r-- | ld/emultempl/hppaelf.em | 10 | ||||
-rw-r--r-- | ld/emultempl/linux.em | 50 | ||||
-rw-r--r-- | ld/emultempl/lnk960.em | 169 | ||||
-rw-r--r-- | ld/emultempl/m68kcoff.em | 28 | ||||
-rw-r--r-- | ld/emultempl/mipsecoff.em | 28 | ||||
-rw-r--r-- | ld/emultempl/mmix-elfnmmo.em | 2 | ||||
-rw-r--r-- | ld/emultempl/mmixelf.em | 4 | ||||
-rw-r--r-- | ld/emultempl/mmo.em | 16 | ||||
-rw-r--r-- | ld/emultempl/needrelax.em | 4 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 91 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 31 | ||||
-rw-r--r-- | ld/emultempl/sh64elf.em | 15 | ||||
-rw-r--r-- | ld/emultempl/sunos.em | 86 | ||||
-rw-r--r-- | ld/emultempl/ticoff.em | 10 |
23 files changed, 536 insertions, 518 deletions
diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index c767f8b..b0a078a 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -56,25 +56,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "libcoff.h" #include "libxcoff.h" -static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); -static int gld${EMULATION_NAME}_parse_args PARAMS ((int, char **)); -static void gld${EMULATION_NAME}_after_open PARAMS ((void)); -static char *gld${EMULATION_NAME}_choose_target PARAMS ((int, char **)); -static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); -static void gld${EMULATION_NAME}_read_file PARAMS ((const char *, boolean)); -static void gld${EMULATION_NAME}_free PARAMS ((PTR)); +static void gld${EMULATION_NAME}_before_parse + PARAMS ((void)); +static int gld${EMULATION_NAME}_parse_args + PARAMS ((int, char **)); +static void gld${EMULATION_NAME}_after_open + PARAMS ((void)); +static char *gld${EMULATION_NAME}_choose_target + PARAMS ((int, char **)); +static void gld${EMULATION_NAME}_before_allocation + PARAMS ((void)); +static void gld${EMULATION_NAME}_read_file + PARAMS ((const char *, bfd_boolean)); +static void gld${EMULATION_NAME}_free + PARAMS ((PTR)); static void gld${EMULATION_NAME}_find_relocs -PARAMS ((lang_statement_union_type *)); -static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *)); -static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); -static boolean gld${EMULATION_NAME}_unrecognized_file + PARAMS ((lang_statement_union_type *)); +static void gld${EMULATION_NAME}_find_exp_assignment + PARAMS ((etree_type *)); +static char *gld${EMULATION_NAME}_get_script + PARAMS ((int *isfile)); +static bfd_boolean gld${EMULATION_NAME}_unrecognized_file PARAMS ((lang_input_statement_type *)); static void gld${EMULATION_NAME}_create_output_section_statements PARAMS ((void)); -static void gld${EMULATION_NAME}_set_output_arch PARAMS ((void)); - -static int is_syscall PARAMS ((char *, unsigned int *)); -static int change_symbol_mode PARAMS ((char *)); +static void gld${EMULATION_NAME}_set_output_arch + PARAMS ((void)); +static int is_syscall + PARAMS ((char *, unsigned int *)); +static int change_symbol_mode + PARAMS ((char *)); /* The file alignment required for each section. */ static unsigned long file_align; @@ -157,7 +168,7 @@ gld${EMULATION_NAME}_before_parse () else ldfile_output_architecture = bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`; - config.has_shared = true; + config.has_shared = TRUE; /* The link_info.[init|fini]_functions are initialized in ld/lexsup.c. Override them here so we can use the link_info.init_function as a @@ -395,19 +406,19 @@ gld${EMULATION_NAME}_parse_args (argc, argv) break; case OPTION_AUTOIMP: - link_info.static_link = false; + link_info.static_link = FALSE; break; case OPTION_ERNOTOK: - force_make_executable = false; + force_make_executable = FALSE; break; case OPTION_EROK: - force_make_executable = true; + force_make_executable = TRUE; break; case OPTION_EXPORT: - gld${EMULATION_NAME}_read_file (optarg, false); + gld${EMULATION_NAME}_read_file (optarg, FALSE); break; case OPTION_IMPORT: @@ -449,7 +460,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv) case OPTION_MODTYPE: if (*optarg == 'S') { - link_info.shared = true; + link_info.shared = TRUE; ++optarg; } if (*optarg == '\0' || optarg[1] == '\0') @@ -459,11 +470,11 @@ gld${EMULATION_NAME}_parse_args (argc, argv) break; case OPTION_NOAUTOIMP: - link_info.static_link = true; + link_info.static_link = TRUE; break; case OPTION_NOSTRCMPCT: - link_info.traditional_format = true; + link_info.traditional_format = TRUE; break; case OPTION_PD: @@ -512,11 +523,11 @@ gld${EMULATION_NAME}_parse_args (argc, argv) break; case OPTION_STRCMPCT: - link_info.traditional_format = false; + link_info.traditional_format = FALSE; break; case OPTION_UNIX: - unix_ld = true; + unix_ld = TRUE; break; case OPTION_32: @@ -548,18 +559,18 @@ gld${EMULATION_NAME}_parse_args (argc, argv) object or an archive. If the file starts with #!, we must treat it as an import file. This is for AIX compatibility. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_unrecognized_file (entry) lang_input_statement_type *entry; { FILE *e; - boolean ret; + bfd_boolean ret; e = fopen (entry->filename, FOPEN_RT); if (e == NULL) - return false; + return FALSE; - ret = false; + ret = FALSE; if (getc (e) == '#' && getc (e) == '!') { @@ -574,8 +585,8 @@ gld${EMULATION_NAME}_unrecognized_file (entry) flpp = &(*flpp)->next; *flpp = n; - ret = true; - entry->loaded = true; + ret = TRUE; + entry->loaded = TRUE; } fclose (e); @@ -588,7 +599,7 @@ gld${EMULATION_NAME}_unrecognized_file (entry) static void gld${EMULATION_NAME}_after_open () { - boolean r; + bfd_boolean r; struct set_info *p; /* Call ldctor_build_sets, after pretending that this is a @@ -598,7 +609,7 @@ gld${EMULATION_NAME}_after_open () producing an XCOFF output file. */ r = link_info.relocateable; if (strstr (bfd_get_target (output_bfd), "xcoff") != NULL) - link_info.relocateable = true; + link_info.relocateable = TRUE; ldctor_build_sets (); link_info.relocateable = r; @@ -641,12 +652,12 @@ gld${EMULATION_NAME}_before_allocation () /* Handle the import and export files, if any. */ for (fl = import_files; fl != NULL; fl = fl->next) - gld${EMULATION_NAME}_read_file (fl->name, true); + gld${EMULATION_NAME}_read_file (fl->name, TRUE); for (el = export_symbols; el != NULL; el = el->next) { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false); + h = bfd_link_hash_lookup (link_info.hash, el->name, FALSE, FALSE, FALSE); if (h == NULL) einfo ("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n"); if (!bfd_xcoff_export_symbol (output_bfd, &link_info, h)) @@ -692,9 +703,9 @@ gld${EMULATION_NAME}_before_allocation () /* Let the XCOFF backend set up the .loader section. */ if (!bfd_xcoff_size_dynamic_sections (output_bfd, &link_info, libpath, entry_symbol.name, file_align, - maxstack, maxdata, gc && !unix_ld ? true : false, - modtype, textro ? true : false, unix_ld, special_sections, - rtld ? true : false)) + maxstack, maxdata, gc && !unix_ld ? TRUE : FALSE, + modtype, textro ? TRUE : FALSE, unix_ld, special_sections, + rtld ? TRUE : FALSE)) einfo ("%P%F: failed to set dynamic section sizes: %E\n"); /* Look through the special sections, and put them in the right @@ -706,7 +717,7 @@ gld${EMULATION_NAME}_before_allocation () lang_statement_union_type **pls; lang_input_section_type *is; const char *oname; - boolean start; + bfd_boolean start; sec = special_sections[i]; if (sec == NULL) @@ -766,32 +777,32 @@ gld${EMULATION_NAME}_before_allocation () case XCOFF_SPECIAL_SECTION_TEXT: /* _text */ oname = ".text"; - start = true; + start = TRUE; break; case XCOFF_SPECIAL_SECTION_ETEXT: /* _etext */ oname = ".text"; - start = false; + start = FALSE; break; case XCOFF_SPECIAL_SECTION_DATA: /* _data */ oname = ".data"; - start = true; + start = TRUE; break; case XCOFF_SPECIAL_SECTION_EDATA: /* _edata */ oname = ".data"; - start = false; + start = FALSE; break; case XCOFF_SPECIAL_SECTION_END: case XCOFF_SPECIAL_SECTION_END2: /* _end and end */ oname = ".bss"; - start = false; + start = FALSE; break; } @@ -939,13 +950,13 @@ is_syscall (input, flag) static void gld${EMULATION_NAME}_read_file (filename, import) const char *filename; - boolean import; + bfd_boolean import; { struct obstack *o; FILE *f; int lineno; int c; - boolean keep; + bfd_boolean keep; const char *imppath; const char *impfile; const char *impmember; @@ -960,7 +971,7 @@ gld${EMULATION_NAME}_read_file (filename, import) einfo ("%F%s: %E\n", filename); } - keep = false; + keep = FALSE; imppath = NULL; impfile = NULL; @@ -1026,7 +1037,7 @@ gld${EMULATION_NAME}_read_file (filename, import) char *file; (void) obstack_finish (o); - keep = true; + keep = TRUE; imppath = s; file = NULL; while (!ISSPACE (*s) && *s != '(' && *s != '\0') @@ -1143,8 +1154,8 @@ gld${EMULATION_NAME}_read_file (filename, import) } else { - h = bfd_link_hash_lookup (link_info.hash, symname, false, false, - true); + h = bfd_link_hash_lookup (link_info.hash, symname, FALSE, FALSE, + TRUE); if (h == NULL || h->type == bfd_link_hash_new) { /* We can just ignore attempts to import an unreferenced @@ -1221,7 +1232,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp) { case etree_provide: h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); + FALSE, FALSE, FALSE); if (h == NULL) break; /* Fall through. */ @@ -1272,19 +1283,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -1293,9 +1304,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; @@ -1317,7 +1328,7 @@ gld${EMULATION_NAME}_create_output_section_statements () if ((bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour) && (link_info.init_function != NULL || link_info.fini_function != NULL - || rtld == true)) + || rtld)) { initfini_file = lang_add_input_file ("initfini", lang_input_file_is_file_enum, @@ -1334,17 +1345,17 @@ gld${EMULATION_NAME}_create_output_section_statements () } /* Call backend to fill in the rest */ - if (false == bfd_xcoff_link_generate_rtinit (initfini_file->the_bfd, - link_info.init_function, - link_info.fini_function, - rtld)) + if (! bfd_xcoff_link_generate_rtinit (initfini_file->the_bfd, + link_info.init_function, + link_info.fini_function, + rtld)) { einfo ("%X%P: can not create BFD %E\n"); return; } /* __rtld defined in /lib/librtl.a */ - if (true == rtld) + if (rtld) lang_add_input_file ("rtl", lang_input_file_is_l_enum, NULL); } } diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em index 0b5e7bc..73828eb 100644 --- a/ld/emultempl/armcoff.em +++ b/ld/emultempl/armcoff.em @@ -48,7 +48,7 @@ static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *)); static void gld${EMULATION_NAME}_finish PARAMS ((void)); static void gld${EMULATION_NAME}_after_open PARAMS ((void)); -/* If true, then interworking stubs which support calls to old, non-interworking +/* If TRUE, then interworking stubs which support calls to old, non-interworking aware ARM code should be generated. */ static int support_old_code = 0; @@ -177,7 +177,8 @@ gld${EMULATION_NAME}_finish PARAMS((void)) if (thumb_entry_symbol == NULL) return; - h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true); + h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, + FALSE, FALSE, TRUE); if (h != (struct bfd_link_hash_entry *) NULL && (h->type == bfd_link_hash_defined @@ -228,19 +229,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -249,9 +250,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index 0e65c04..05a7af0 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -35,8 +35,8 @@ gld${EMULATION_NAME}_before_parse () #ifndef TARGET_ /* I.e., if not generic. */ ldfile_set_output_arch ("`echo ${ARCH}`"); #endif /* not TARGET_ */ - config.dynamic_link = ${DYNAMIC_LINK-true}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.dynamic_link = ${DYNAMIC_LINK-TRUE}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; } static void arm_elf_after_open PARAMS ((void)); @@ -73,7 +73,7 @@ arm_elf_set_bfd_for_interworking (statement) lang_statement_union_type *statement; { if (statement->header.type == lang_input_section_enum - && statement->input_section.ifile->just_syms_flag == false) + && !statement->input_section.ifile->just_syms_flag) { asection *i = statement->input_section.section; asection *output_section = i->output_section; @@ -85,7 +85,7 @@ arm_elf_set_bfd_for_interworking (statement) && ! i->owner->output_has_begun) { bfd_for_interwork = i->owner; - bfd_for_interwork->output_has_begun = true; + bfd_for_interwork->output_has_begun = TRUE; } } } @@ -105,12 +105,12 @@ arm_elf_before_allocation () /* The interworking bfd must be the last one in the link. */ bfd_for_interwork = NULL; for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next) - tem->output_has_begun = false; + tem->output_has_begun = FALSE; lang_for_each_statement (arm_elf_set_bfd_for_interworking); ASSERT (bfd_for_interwork != NULL); for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next) - tem->output_has_begun = false; + tem->output_has_begun = FALSE; bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info); } @@ -148,7 +148,7 @@ arm_elf_finish () return; h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, - false, false, true); + FALSE, FALSE, TRUE); if (h != (struct bfd_link_hash_entry *) NULL && (h->type == bfd_link_hash_defined diff --git a/ld/emultempl/armelf_oabi.em b/ld/emultempl/armelf_oabi.em index aae7ea9..647ada3 100644 --- a/ld/emultempl/armelf_oabi.em +++ b/ld/emultempl/armelf_oabi.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com @@ -113,19 +113,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -134,9 +134,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index 0a1fbbd..7e76f69 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -55,7 +55,7 @@ static void gld_${EMULATION_NAME}_set_symbols PARAMS ((void)); static void gld_${EMULATION_NAME}_after_open PARAMS ((void)); static void gld_${EMULATION_NAME}_before_parse PARAMS ((void)); static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void)); -static boolean gld${EMULATION_NAME}_place_orphan +static bfd_boolean gld${EMULATION_NAME}_place_orphan PARAMS ((lang_input_statement_type *, asection *)); static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *)); static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); @@ -731,7 +731,7 @@ gld_${EMULATION_NAME}_before_allocation() which are not mentioned in the linker script. */ /*ARGSUSED*/ -static boolean +static bfd_boolean gld${EMULATION_NAME}_place_orphan (file, s) lang_input_statement_type *file; asection *s; @@ -742,14 +742,14 @@ gld${EMULATION_NAME}_place_orphan (file, s) lang_statement_union_type *l; if ((s->flags & SEC_ALLOC) == 0) - return false; + return FALSE; /* Don't process grouped sections unless doing a final link. If they're marked as COMDAT sections, we don't want .text\$foo to end up in .text and then have .text disappear because it's marked link-once-discard. */ if (link_info.relocateable) - return false; + return FALSE; secname = bfd_get_section_name (s->owner, s); @@ -758,7 +758,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) if (*secname == '\$') einfo ("%P%F: section %s has '\$' as first character\n", secname); if (strchr (secname + 1, '\$') == NULL) - return false; + return FALSE; /* Look up the output section. The Microsoft specs say sections names in image files never contain a '\$'. Fortunately, lang_..._lookup creates @@ -802,12 +802,12 @@ gld${EMULATION_NAME}_place_orphan (file, s) tmp->spec.name = xmalloc (strlen (output_secname) + 2); sprintf (tmp->spec.name, "%s\$", output_secname); tmp->spec.exclude_name_list = NULL; - tmp->sorted = false; + tmp->sorted = FALSE; new = new_stat (lang_wild_statement, &os->children); new->filename = NULL; - new->filenames_sorted = false; + new->filenames_sorted = FALSE; new->section_list = tmp; - new->keep_sections = false; + new->keep_sections = FALSE; lang_list_init (&new->children); l = new; } @@ -819,7 +819,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) sort_sections. */ lang_add_section (&l->wild_statement.children, s, os, file); - return true; + return TRUE; } static char * @@ -834,19 +834,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c cat >>e${EMULATION_NAME}.c <<EOF diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 9bfed6e..60a789e 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -58,9 +58,9 @@ static void gld${EMULATION_NAME}_vercheck PARAMS ((lang_input_statement_type *)); static void gld${EMULATION_NAME}_stat_needed PARAMS ((lang_input_statement_type *)); -static boolean gld${EMULATION_NAME}_try_needed +static bfd_boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int)); -static boolean gld${EMULATION_NAME}_search_needed +static bfd_boolean gld${EMULATION_NAME}_search_needed PARAMS ((const char *, const char *, int)); static void gld${EMULATION_NAME}_check_needed PARAMS ((lang_input_statement_type *)); @@ -72,13 +72,13 @@ static void gld${EMULATION_NAME}_find_statement_assignment PARAMS ((lang_statement_union_type *)); static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); -static boolean gld${EMULATION_NAME}_open_dynamic_archive +static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); static lang_output_section_statement_type *output_rel_find PARAMS ((asection *)); static asection *output_prev_sec_find PARAMS ((lang_output_section_statement_type *)); -static boolean gld${EMULATION_NAME}_place_orphan +static bfd_boolean gld${EMULATION_NAME}_place_orphan PARAMS ((lang_input_statement_type *, asection *)); static void gld${EMULATION_NAME}_finish PARAMS ((void)); @@ -114,8 +114,8 @@ gld${EMULATION_NAME}_before_parse () } else ldfile_output_architecture = bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`; - config.dynamic_link = ${DYNAMIC_LINK-true}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.dynamic_link = ${DYNAMIC_LINK-TRUE}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; } EOF @@ -128,9 +128,9 @@ cat >>e${EMULATION_NAME}.c <<EOF static struct bfd_link_needed_list *global_needed; static struct stat global_stat; -static boolean global_found; +static bfd_boolean global_found; static struct bfd_link_needed_list *global_vercheck_needed; -static boolean global_vercheck_failed; +static bfd_boolean global_vercheck_failed; /* On Linux, it's possible to have different versions of the same @@ -193,7 +193,7 @@ gld${EMULATION_NAME}_vercheck (s) FOO.SO.VER2, and VER1 and VER2 are different. This appears to be a version mismatch, so we tell the caller to try a different version of this library. */ - global_vercheck_failed = true; + global_vercheck_failed = TRUE; return; } } @@ -225,7 +225,7 @@ gld${EMULATION_NAME}_stat_needed (s) if (st.st_dev == global_stat.st_dev && st.st_ino == global_stat.st_ino) { - global_found = true; + global_found = TRUE; return; } @@ -259,7 +259,7 @@ gld${EMULATION_NAME}_stat_needed (s) named by a DT_NEEDED entry. The FORCE parameter indicates whether to skip the check for a conflicting version. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_try_needed (name, force) const char *name; int force; @@ -269,23 +269,23 @@ gld${EMULATION_NAME}_try_needed (name, force) abfd = bfd_openr (name, bfd_get_target (output_bfd)); if (abfd == NULL) - return false; + return FALSE; if (! bfd_check_format (abfd, bfd_object)) { bfd_close (abfd); - return false; + return FALSE; } if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) { bfd_close (abfd); - return false; + return FALSE; } /* For DT_NEEDED, they have to match. */ if (abfd->xvec != output_bfd->xvec) { bfd_close (abfd); - return false; + return FALSE; } /* Check whether this object would include any conflicting library @@ -303,14 +303,14 @@ gld${EMULATION_NAME}_try_needed (name, force) if (needed != NULL) { global_vercheck_needed = needed; - global_vercheck_failed = false; + global_vercheck_failed = FALSE; lang_for_each_input_file (gld${EMULATION_NAME}_vercheck); if (global_vercheck_failed) { bfd_close (abfd); - /* Return false to force the caller to move on to try + /* Return FALSE to force the caller to move on to try another file on the search path. */ - return false; + return FALSE; } /* But wait! It gets much worse. On Linux, if a shared @@ -333,7 +333,7 @@ case ${target} in if (l == NULL) { bfd_close (abfd); - return false; + return FALSE; } } @@ -363,13 +363,13 @@ cat >>e${EMULATION_NAME}.c <<EOF if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); - global_found = false; + global_found = FALSE; lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed); if (global_found) { - /* Return true to indicate that we found the file, even though + /* Return TRUE to indicate that we found the file, even though we aren't going to do anything with it. */ - return true; + return TRUE; } /* Tell the ELF backend that we don't want the output file to have a @@ -385,13 +385,13 @@ cat >>e${EMULATION_NAME}.c <<EOF if (! bfd_link_add_symbols (abfd, &link_info)) einfo ("%F%B: could not read symbols: %E\n", abfd); - return true; + return TRUE; } /* Search for a needed file in a path. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_search_needed (path, name, force) const char *path; const char *name; @@ -404,7 +404,7 @@ gld${EMULATION_NAME}_search_needed (path, name, force) return gld${EMULATION_NAME}_try_needed (name, force); if (path == NULL || *path == '\0') - return false; + return FALSE; len = strlen (name); while (1) { @@ -426,7 +426,7 @@ gld${EMULATION_NAME}_search_needed (path, name, force) strcpy (sset, name); if (gld${EMULATION_NAME}_try_needed (filename, force)) - return true; + return TRUE; free (filename); @@ -435,7 +435,7 @@ gld${EMULATION_NAME}_search_needed (path, name, force) path = s + 1; } - return false; + return FALSE; } EOF @@ -450,15 +450,15 @@ if [ "x${host}" = "x${target}" ] ; then in which we may find shared libraries. /etc/ld.so.conf is really only meaningful on Linux. */ -static boolean gld${EMULATION_NAME}_check_ld_so_conf +static bfd_boolean gld${EMULATION_NAME}_check_ld_so_conf PARAMS ((const char *, int)); -static boolean +static bfd_boolean gld${EMULATION_NAME}_check_ld_so_conf (name, force) const char *name; int force; { - static boolean initialized; + static bfd_boolean initialized; static char *ld_so_conf; if (! initialized) @@ -518,11 +518,11 @@ gld${EMULATION_NAME}_check_ld_so_conf (name, force) ld_so_conf = b; } - initialized = true; + initialized = TRUE; } if (ld_so_conf == NULL) - return false; + return FALSE; return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force); } @@ -550,7 +550,7 @@ gld${EMULATION_NAME}_check_needed (s) if (strcmp (s->filename, global_needed->name) == 0) { - global_found = true; + global_found = TRUE; return; } @@ -560,7 +560,7 @@ gld${EMULATION_NAME}_check_needed (s) if (f != NULL && strcmp (f + 1, global_needed->name) == 0) { - global_found = true; + global_found = TRUE; return; } } @@ -574,7 +574,7 @@ gld${EMULATION_NAME}_check_needed (s) if (soname != NULL && strcmp (soname, global_needed->name) == 0) { - global_found = true; + global_found = TRUE; return; } } @@ -620,7 +620,7 @@ gld${EMULATION_NAME}_after_open () /* See if this file was included in the link explicitly. */ global_needed = l; - global_found = false; + global_found = FALSE; lang_for_each_input_file (gld${EMULATION_NAME}_check_needed); if (global_found) continue; @@ -756,7 +756,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp) { case etree_provide: h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); + FALSE, FALSE, FALSE); if (h == NULL) break; @@ -774,7 +774,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp) { if (! (bfd_elf${ELFSIZE}_record_link_assignment (output_bfd, &link_info, exp->assign.dst, - exp->type.node_class == etree_provide ? true : false))) + exp->type.node_class == etree_provide ? TRUE : FALSE))) einfo ("%P%F: failed to record assignment to %s: %E\n", exp->assign.dst); } @@ -877,7 +877,7 @@ ${ELF_INTERPRETER_SET_DEFAULT} asection *s; bfd_size_type sz; char *msg; - boolean ret; + bfd_boolean ret; if (is->just_syms_flag) continue; @@ -916,7 +916,7 @@ cat >>e${EMULATION_NAME}.c <<EOF dynamic libraries have an extension of .so (or .sl on oddball systems like hpux). */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) const char *arch; search_dirs_type *search; @@ -926,7 +926,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) char *string; if (! entry->is_archive) - return false; + return FALSE; filename = entry->filename; @@ -954,7 +954,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (! ldfile_try_open_bfd (string, entry)) { free (string); - return false; + return FALSE; } entry->filename = string; @@ -984,7 +984,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } - return true; + return TRUE; } EOF @@ -1073,7 +1073,7 @@ struct orphan_save { lang_statement_union_type **stmt; }; -static boolean +static bfd_boolean gld${EMULATION_NAME}_place_orphan (file, s) lang_input_statement_type *file; asection *s; @@ -1121,7 +1121,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) /* We already have an output section statement with this name, and its bfd section, if any, has compatible flags. */ lang_add_section (&os->children, s, os, file); - return true; + return TRUE; } } @@ -1136,7 +1136,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) && hold_text.os != NULL) { lang_add_section (&hold_text.os->children, s, hold_text.os, file); - return true; + return TRUE; } /* Decide which segment the section should go in based on the @@ -1151,7 +1151,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) { if (s->output_section == NULL) s->output_section = bfd_abs_section_ptr; - return true; + return TRUE; } place = NULL; @@ -1334,7 +1334,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) } } - return true; + return TRUE; } EOF fi @@ -1383,33 +1383,33 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c fi if test -n "$GENERATE_SHLIB_SCRIPT" ; then if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c fi -echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c fi if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then -echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c fi -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -1418,9 +1418,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; @@ -1521,21 +1521,21 @@ EOF if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then cat >>e${EMULATION_NAME}.c <<EOF case OPTION_DISABLE_NEW_DTAGS: - link_info.new_dtags = false; + link_info.new_dtags = FALSE; break; case OPTION_ENABLE_NEW_DTAGS: - link_info.new_dtags = true; + link_info.new_dtags = TRUE; break; case OPTION_EH_FRAME_HDR: - link_info.eh_frame_hdr = true; + link_info.eh_frame_hdr = TRUE; break; case OPTION_GROUP: link_info.flags_1 |= (bfd_vma) DF_1_GROUP; /* Groups must be self-contained. */ - link_info.no_undefined = true; + link_info.no_undefined = TRUE; break; case 'z': @@ -1564,15 +1564,15 @@ cat >>e${EMULATION_NAME}.c <<EOF link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN; } else if (strcmp (optarg, "defs") == 0) - link_info.no_undefined = true; + link_info.no_undefined = TRUE; else if (strcmp (optarg, "muldefs") == 0) - link_info.allow_multiple_definition = true; + link_info.allow_multiple_definition = TRUE; else if (strcmp (optarg, "combreloc") == 0) - link_info.combreloc = true; + link_info.combreloc = TRUE; else if (strcmp (optarg, "nocombreloc") == 0) - link_info.combreloc = false; + link_info.combreloc = FALSE; else if (strcmp (optarg, "nocopyreloc") == 0) - link_info.nocopyreloc = true; + link_info.nocopyreloc = TRUE; /* What about the other Solaris -z options? FIXME. */ break; EOF diff --git a/ld/emultempl/generic.em b/ld/emultempl/generic.em index 397422c..c78b047 100644 --- a/ld/emultempl/generic.em +++ b/ld/emultempl/generic.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright 1991, 1992, 1994, 1996, 2000, 2001 + Copyright 1991, 1992, 1994, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com @@ -83,19 +83,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -104,9 +104,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/gld960.em b/ld/emultempl/gld960.em index c37f4b3..b390d83 100644 --- a/ld/emultempl/gld960.em +++ b/ld/emultempl/gld960.em @@ -1,7 +1,7 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. cat >e${EMULATION_NAME}.c <<EOF -/* Copyright 1991, 1992, 1994, 1999, 2000, 2001 +/* Copyright 1991, 1992, 1994, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -59,7 +59,7 @@ gld960_before_parse() ldfile_add_library_path (concat (env, "/lib/libbout", (const char *) NULL), - false); + FALSE); } } ldfile_output_architecture = bfd_arch_i960; @@ -72,11 +72,11 @@ static void gld960_before_parse() char *env ; env = getenv("G960LIB"); if (env) { - ldfile_add_library_path(env, false); + ldfile_add_library_path(env, FALSE); } env = getenv("G960BASE"); if (env) - ldfile_add_library_path (concat (env, "/lib", (const char *) NULL), false); + ldfile_add_library_path (concat (env, "/lib", (const char *) NULL), FALSE); ldfile_output_architecture = bfd_arch_i960; } @@ -128,19 +128,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -149,9 +149,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/gld960c.em b/ld/emultempl/gld960c.em index 261a3f8..50391a0 100644 --- a/ld/emultempl/gld960c.em +++ b/ld/emultempl/gld960c.em @@ -1,7 +1,7 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. cat >e${EMULATION_NAME}.c <<EOF -/* Copyright 1991, 1993, 1994, 1996, 1999, 2000, 2001 +/* Copyright 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -61,7 +61,7 @@ gld960_before_parse() ldfile_add_library_path (concat (env, "/lib/libcoff", (const char *) NULL), - false); + FALSE); } } ldfile_output_architecture = bfd_arch_i960; @@ -74,12 +74,12 @@ static void gld960_before_parse() char *env ; env = getenv("G960LIB"); if (env) { - ldfile_add_library_path(env, false); + ldfile_add_library_path(env, FALSE); } env = getenv("G960BASE"); if (env) ldfile_add_library_path (concat (env, "/lib", (const char *) NULL), - false); + FALSE); ldfile_output_architecture = bfd_arch_i960; } @@ -143,19 +143,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -164,9 +164,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index 394f28e..c44b01a 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -99,16 +99,16 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static boolean hook_in_stub +static bfd_boolean hook_in_stub PARAMS ((struct hook_stub_info *, lang_statement_union_type **)); -static boolean +static bfd_boolean hook_in_stub (info, lp) struct hook_stub_info *info; lang_statement_union_type **lp; { lang_statement_union_type *l; - boolean ret; + bfd_boolean ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -146,7 +146,7 @@ hook_in_stub (info, lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return true; + return TRUE; } break; @@ -167,7 +167,7 @@ hook_in_stub (info, lp) break; } } - return false; + return FALSE; } diff --git a/ld/emultempl/linux.em b/ld/emultempl/linux.em index fda490b..6ec0285 100644 --- a/ld/emultempl/linux.em +++ b/ld/emultempl/linux.em @@ -1,6 +1,6 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. -if [ -z "$MACHINE" ]; then +if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH} else OUTPUT_ARCH=${ARCH}:${MACHINE} @@ -9,7 +9,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Linux a.out emulation code for ${EMULATION_NAME} - Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000 + Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> Linux support by Eric Youngdale <ericy@cais.cais.com> @@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ldemul.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); -static boolean gld${EMULATION_NAME}_open_dynamic_archive +static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); static void gld${EMULATION_NAME}_find_address_statement PARAMS ((lang_statement_union_type *)); @@ -66,14 +66,14 @@ gld${EMULATION_NAME}_before_parse() } else ldfile_output_architecture = bfd_arch_${ARCH}; - config.dynamic_link = true; - config.has_shared = true; + config.dynamic_link = TRUE; + config.has_shared = TRUE; } /* Try to open a dynamic archive. This is where we know that Linux dynamic libraries have an extension of .sa. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) const char *arch; search_dirs_type *search; @@ -82,7 +82,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) char *string; if (! entry->is_archive) - return false; + return FALSE; string = (char *) xmalloc (strlen (search->name) + strlen (entry->filename) @@ -94,12 +94,12 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (! ldfile_try_open_bfd (string, entry)) { free (string); - return false; + return FALSE; } entry->filename = string; - return true; + return TRUE; } /* This is called by the create_output_section_statements routine via @@ -157,33 +157,33 @@ then sc="-f stringify.sed" cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; @@ -198,7 +198,7 @@ fi cat >>e${EMULATION_NAME}.c <<EOF -struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = +struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { gld${EMULATION_NAME}_before_parse, syslib_default, diff --git a/ld/emultempl/lnk960.em b/ld/emultempl/lnk960.em index f23f2bc..b000fa9 100644 --- a/ld/emultempl/lnk960.em +++ b/ld/emultempl/lnk960.em @@ -61,62 +61,61 @@ static char *lnk960_get_script PARAMS ((int *)); static void -append(list, name) +append (list, name) lib_list_type ***list; char *name; { - lib_list_type *element = - (lib_list_type *)(xmalloc(sizeof(lib_list_type))); + lib_list_type *element = (lib_list_type *) xmalloc (sizeof (lib_list_type)); element->name = name; - element->next = (lib_list_type *)NULL; + element->next = (lib_list_type *) NULL; **list = element; *list = &element->next; } -static boolean had_hll = false; -static boolean had_hll_name = false; +static bfd_boolean had_hll = FALSE; +static bfd_boolean had_hll_name = FALSE; static void -lnk960_hll(name) +lnk960_hll (name) char *name; { - had_hll = true; - if (name != (char *)NULL) { - had_hll_name = true; - append(&hll_list_tail, name); - } + had_hll = TRUE; + if (name != (char *) NULL) + { + had_hll_name = TRUE; + append (&hll_list_tail, name); + } } static void -lnk960_syslib(name) +lnk960_syslib (name) char *name; { - append(&syslib_list_tail,name); + append (&syslib_list_tail, name); } #ifdef GNU960 static void -lnk960_before_parse() +lnk960_before_parse () { static char *env_variables[] = { "G960LIB", "G960BASE", 0 }; char **p; char *env ; - for ( p = env_variables; *p; p++ ){ - env = (char *) getenv(*p); - if (env) { - ldfile_add_library_path(concat(env,"/lib/libcoff",""), false); + for (p = env_variables; *p; p++) + { + env = (char *) getenv (*p); + if (env) + ldfile_add_library_path (concat (env, "/lib/libcoff", ""), FALSE); } - } - env= (char *) getenv("I960BASE"); - if ( env ) { - ldfile_add_library_path(concat(env,"/lib",""), false); - } + env = (char *) getenv ("I960BASE"); + if (env) + ldfile_add_library_path(concat (env, "/lib", ""), FALSE); ldfile_output_architecture = bfd_arch_i960; ldfile_output_machine = bfd_mach_i960_core; @@ -125,19 +124,19 @@ lnk960_before_parse() #else /* not GNU960 */ static void -lnk960_before_parse() +lnk960_before_parse () { - char *name = getenv("I960BASE"); + char *name = getenv ("I960BASE"); - if (name == (char *)NULL) { - name = getenv("G960BASE"); - if (name == (char *)NULL) { - einfo("%P%F I960BASE and G960BASE not set\n"); + if (name == (char *) NULL) + { + name = getenv("G960BASE"); + if (name == (char *) NULL) + einfo ("%P%F I960BASE and G960BASE not set\n"); } - } - ldfile_add_library_path(concat(name,"/lib",""), false); + ldfile_add_library_path (concat (name, "/lib", ""), FALSE); ldfile_output_architecture = bfd_arch_i960; ldfile_output_machine = bfd_mach_i960_core; } @@ -146,55 +145,52 @@ lnk960_before_parse() static void -add_on(list, search) +add_on (list, search) lib_list_type *list; lang_input_file_enum_type search; { - while (list) { - lang_add_input_file(list->name, - search, - (char *)NULL); - list = list->next; - } + while (list) + { + lang_add_input_file (list->name, search, (char *) NULL); + list = list->next; + } } static void -lnk960_after_parse() +lnk960_after_parse () { /* If there has been no arch, default to -KB */ - if (ldfile_output_machine_name[0] ==0) { - ldfile_add_arch("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"); - if (ldfile_output_machine == bfd_mach_i960_ka_sa || - ldfile_output_machine == bfd_mach_i960_ca) { - { - append(&hll_list_tail,"fpg"); - } + if (had_hll && !had_hll_name) + { + append (&hll_list_tail, "cg"); + if (ldfile_output_machine == bfd_mach_i960_ka_sa + || 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); + 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 () { } static void -lnk960_after_allocation() +lnk960_after_allocation () { - if (link_info.relocateable == false) { - lang_abs_symbol_at_end_of(".text","_etext"); - lang_abs_symbol_at_end_of(".data","_edata"); - lang_abs_symbol_at_beginning_of(".bss","_bss_start"); - lang_abs_symbol_at_end_of(".bss","_end"); - } + if (!link_info.relocateable) + { + lang_abs_symbol_at_end_of (".text", "_etext"); + lang_abs_symbol_at_end_of (".data", "_edata"); + lang_abs_symbol_at_beginning_of (".bss", "_bss_start"); + lang_abs_symbol_at_end_of (".bss", "_end"); + } } @@ -231,18 +227,21 @@ machine_table[] = }; static void -lnk960_set_output_arch() +lnk960_set_output_arch () { /* Set the output architecture and machine if possible */ unsigned int i; ldfile_output_machine = bfd_mach_i960_core; - for (i= 0; machine_table[i].name != (char*)NULL; i++) { - if (strcmp(ldfile_output_machine_name,machine_table[i].name)==0) { - ldfile_output_machine = machine_table[i].number; - break; + for (i= 0; machine_table[i].name != (char*) NULL; i++) + { + if (strcmp (ldfile_output_machine_name, machine_table[i].name) == 0) + { + ldfile_output_machine = machine_table[i].number; + break; + } } - } - bfd_set_arch_mach(output_bfd, ldfile_output_architecture, ldfile_output_machine); + bfd_set_arch_mach (output_bfd, ldfile_output_architecture, + ldfile_output_machine); } static char * @@ -252,12 +251,12 @@ lnk960_choose_target (argc, argv) { #ifdef GNU960 - return bfd_make_targ_name(BFD_COFF_FORMAT, 0); + return bfd_make_targ_name (BFD_COFF_FORMAT, 0); #else - char *from_outside = getenv(TARGET_ENVIRON); - if (from_outside != (char *)NULL) + char *from_outside = getenv (TARGET_ENVIRON); + if (from_outside != (char *) NULL) return from_outside; #ifdef LNK960_LITTLE return "coff-Intel-little"; @@ -269,7 +268,7 @@ lnk960_choose_target (argc, argv) } static char * -lnk960_get_script(isfile) +lnk960_get_script (isfile) int *isfile; EOF @@ -284,19 +283,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -305,9 +304,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/m68kcoff.em b/ld/emultempl/m68kcoff.em index 8ac4e61..1f32889 100644 --- a/ld/emultempl/m68kcoff.em +++ b/ld/emultempl/m68kcoff.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Handle embedded relocs for m68k. - Copyright 2000 Free Software Foundation, Inc. + Copyright 2000, 2002 Free Software Foundation, Inc. Written by Michael Sokolov <msokolov@ivan.Harhan.ORG>, based on generic.em by Steve Chamberlain <steve@cygnus.com>, embedded relocs code based on mipsecoff.em by Ian Lance Taylor <ian@cygnus.com>. @@ -179,19 +179,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -200,9 +200,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/mipsecoff.em b/ld/emultempl/mipsecoff.em index 9521e01..9fda644 100644 --- a/ld/emultempl/mipsecoff.em +++ b/ld/emultempl/mipsecoff.em @@ -9,7 +9,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Handle embedded relocs for MIPS. - Copyright 1994, 1995, 1997, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1997, 2000, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com> based on generic.em. This file is part of GLD, the Gnu Linker. @@ -194,19 +194,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. @@ -215,9 +215,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em index 2bb650c..8ec604f 100644 --- a/ld/emultempl/mmix-elfnmmo.em +++ b/ld/emultempl/mmix-elfnmmo.em @@ -43,7 +43,7 @@ mmix_before_allocation () /* Force -relax on if not doing a relocatable link. */ if (! link_info.relocateable) - command_line.relax = true; + command_line.relax = TRUE; if (!_bfd_mmix_prepare_linker_allocated_gregs (output_bfd, &link_info)) einfo ("%X%P: Internal problems setting up section %s", diff --git a/ld/emultempl/mmixelf.em b/ld/emultempl/mmixelf.em index e84f0b7..80d2d94 100644 --- a/ld/emultempl/mmixelf.em +++ b/ld/emultempl/mmixelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2001 Free Software Foundation, Inc. +# Copyright 2001, 2002 Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. # @@ -39,7 +39,7 @@ elfmmix_before_parse () page in the linked file, which is non-intuitive. If there's ever a full system with shared libraries and demand paging, you will want to exclude this file. */ - config.magic_demand_paged = false; + config.magic_demand_paged = FALSE; } EOF diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em index 8b17dcc..e65e89b 100644 --- a/ld/emultempl/mmo.em +++ b/ld/emultempl/mmo.em @@ -32,7 +32,7 @@ EOF cat >>e${EMULATION_NAME}.c <<EOF -static boolean mmo_place_orphan +static bfd_boolean mmo_place_orphan PARAMS ((lang_input_statement_type *, asection *)); static asection *output_prev_sec_find PARAMS ((lang_output_section_statement_type *)); @@ -84,7 +84,7 @@ struct orphan_save { SEC_READONLY sections right after MMO_TEXT_SECTION_NAME. Much borrowed from elf32.em. */ -static boolean +static bfd_boolean mmo_place_orphan (file, s) lang_input_statement_type *file; asection *s; @@ -100,7 +100,7 @@ mmo_place_orphan (file, s) if (link_info.relocateable || (bfd_get_section_flags (s->owner, s) & (SEC_EXCLUDE | SEC_LOAD)) != SEC_LOAD) - return false; + return FALSE; /* Only care for sections we're going to load. */ os = lang_output_section_find (bfd_get_section_name (s->owner, s)); @@ -110,13 +110,13 @@ mmo_place_orphan (file, s) if (os != NULL) { lang_add_section (&os->children, s, os, file); - return true; + return TRUE; } /* If this section does not have .text-type section flags or there's no MMO_TEXT_SECTION_NAME, we don't have anything to say. */ if ((bfd_get_section_flags (s->owner, s) & (SEC_CODE | SEC_READONLY)) == 0) - return false; + return FALSE; if (hold_text.os == NULL) hold_text.os = lang_output_section_find (MMO_TEXT_SECTION_NAME); @@ -155,7 +155,7 @@ mmo_place_orphan (file, s) snew = os->bfd_section; if (snew == NULL) /* /DISCARD/ section. */ - return true; + return TRUE; /* We need an output section for .text as a root, so if there was none (might happen with a peculiar linker script such as in "map @@ -164,7 +164,7 @@ mmo_place_orphan (file, s) if (hold_text.os == NULL) { if (os == NULL) - return false; + return FALSE; hold_text.os = os; } @@ -219,7 +219,7 @@ mmo_place_orphan (file, s) place->stmt = add.tail; } - return true; + return TRUE; } /* Remove the spurious settings of SEC_RELOC that make it to the output at diff --git a/ld/emultempl/needrelax.em b/ld/emultempl/needrelax.em index 9bb96c2..242b778 100644 --- a/ld/emultempl/needrelax.em +++ b/ld/emultempl/needrelax.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright (C) 2001 Free Software Foundation, Inc. +# Copyright 2001, 2002 Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. # @@ -35,6 +35,6 @@ need_relax_${EMULATION_NAME}_before_allocation () /* Force -relax on if not doing a relocatable link. */ if (! link_info.relocateable) - command_line.relax = true; + command_line.relax = TRUE; } EOF diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index e2342d4..ca97023 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -111,12 +111,12 @@ static void gld_${EMULATION_NAME}_after_parse PARAMS ((void)); static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void)); static asection *output_prev_sec_find PARAMS ((lang_output_section_statement_type *)); -static boolean gld_${EMULATION_NAME}_place_orphan +static bfd_boolean gld_${EMULATION_NAME}_place_orphan PARAMS ((lang_input_statement_type *, asection *)); static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *)); static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); static void gld_${EMULATION_NAME}_finish PARAMS ((void)); -static boolean gld_${EMULATION_NAME}_open_dynamic_archive +static bfd_boolean gld_${EMULATION_NAME}_open_dynamic_archive PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE *)); static void set_pe_name PARAMS ((char *, long)); @@ -125,17 +125,17 @@ static void set_pe_value PARAMS ((char *)); static void set_pe_stack_heap PARAMS ((char *, char *)); #ifdef DLL_SUPPORT -static boolean pe_undef_cdecl_match +static bfd_boolean pe_undef_cdecl_match PARAMS ((struct bfd_link_hash_entry *, PTR)); static void pe_fixup_stdcalls PARAMS ((void)); static int make_import_fixup PARAMS ((arelent *, asection *)); static void pe_find_data_imports PARAMS ((void)); #endif -static boolean pr_sym PARAMS ((struct bfd_hash_entry *, PTR string)); -static boolean gld_${EMULATION_NAME}_unrecognized_file +static bfd_boolean pr_sym PARAMS ((struct bfd_hash_entry *, PTR string)); +static bfd_boolean gld_${EMULATION_NAME}_unrecognized_file PARAMS ((lang_input_statement_type *)); -static boolean gld_${EMULATION_NAME}_recognized_file +static bfd_boolean gld_${EMULATION_NAME}_recognized_file PARAMS ((lang_input_statement_type *)); static int gld_${EMULATION_NAME}_find_potential_libraries PARAMS ((char *, lang_input_statement_type *)); @@ -171,10 +171,10 @@ gld_${EMULATION_NAME}_before_parse() ldfile_output_architecture = bfd_arch_${ARCH}; output_filename = "${EXECUTABLE_NAME:-a.exe}"; #ifdef DLL_SUPPORT - config.dynamic_link = true; + config.dynamic_link = TRUE; config.has_shared = 1; link_info.pei386_auto_import = -1; - link_info.pei386_runtime_pseudo_reloc = false; + link_info.pei386_runtime_pseudo_reloc = FALSE; #if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2) #if defined TARGET_IS_mipspe || defined TARGET_IS_armpe @@ -253,7 +253,7 @@ static struct option longopts[] = { {"output-def", required_argument, NULL, OPTION_OUT_DEF}, {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL}, {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS}, - {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS}, + {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS}, {"kill-at", no_argument, NULL, OPTION_KILL_ATS}, {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES}, {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP}, @@ -342,7 +342,7 @@ gld_${EMULATION_NAME}_list_options (file) fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n")); fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n")); fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n")); - fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n")); + fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n")); fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n")); fprintf (file, _(" --kill-at Remove @nn from exported symbols\n")); fprintf (file, _(" --out-implib <file> Generate import library\n")); @@ -789,7 +789,7 @@ char * pe_data_import_dll; #ifdef DLL_SUPPORT static struct bfd_link_hash_entry *pe_undef_found_sym; -static boolean +static bfd_boolean pe_undef_cdecl_match (h, string) struct bfd_link_hash_entry *h; PTR string; @@ -801,9 +801,9 @@ pe_undef_cdecl_match (h, string) && h->root.string[sl] == '@') { pe_undef_found_sym = h; - return false; + return FALSE; } - return true; + return TRUE; } static void @@ -821,7 +821,7 @@ pe_fixup_stdcalls () char* at = strchr (undef->root.string, '@'); int lead_at = (*undef->root.string == '@'); /* For now, don't try to fixup fastcall symbols. */ - + if (at && !lead_at) { /* The symbol is a stdcall symbol, so let's look for a @@ -965,7 +965,7 @@ pe_find_data_imports () } #endif /* DLL_SUPPORT */ -static boolean +static bfd_boolean pr_sym (h, string) struct bfd_hash_entry *h; PTR string ATTRIBUTE_UNUSED; @@ -973,7 +973,7 @@ pr_sym (h, string) if (pe_dll_extra_pe_debug) printf ("+%s\n",h->string); - return true; + return TRUE; } @@ -1124,7 +1124,7 @@ gld_${EMULATION_NAME}_after_open () /* Thunk section with reloc to another bfd. */ blhe = bfd_link_hash_lookup (link_info.hash, s->name, - false, false, true); + FALSE, FALSE, TRUE); if (blhe == NULL || blhe->type != bfd_link_hash_defined) @@ -1279,7 +1279,7 @@ saw_option (char * option) } #endif /* DLL_SUPPORT */ -static boolean +static bfd_boolean gld_${EMULATION_NAME}_unrecognized_file(entry) lang_input_statement_type *entry ATTRIBUTE_UNUSED; { @@ -1313,7 +1313,7 @@ gld_${EMULATION_NAME}_unrecognized_file(entry) sprintf(buf, "_%s", pe_def_file->exports[i].internal_name); - h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true); + h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE); if (h == (struct bfd_link_hash_entry *) NULL) einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n")); if (h->type == bfd_link_hash_new) @@ -1362,14 +1362,14 @@ gld_${EMULATION_NAME}_unrecognized_file(entry) if (pe_def_file->heap_commit != -1) pe.SizeOfHeapCommit = pe_def_file->heap_commit; } - return true; + return TRUE; } } #endif - return false; + return FALSE; } -static boolean +static bfd_boolean gld_${EMULATION_NAME}_recognized_file(entry) lang_input_statement_type *entry ATTRIBUTE_UNUSED; { @@ -1394,7 +1394,7 @@ gld_${EMULATION_NAME}_recognized_file(entry) return pe_implied_import_dll (entry->filename); } #endif - return false; + return FALSE; } static void @@ -1405,7 +1405,8 @@ gld_${EMULATION_NAME}_finish () if (thumb_entry_symbol != NULL) { - h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true); + h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, + FALSE, FALSE, TRUE); if (h != (struct bfd_link_hash_entry *) NULL && (h->type == bfd_link_hash_defined @@ -1519,7 +1520,7 @@ struct orphan_save lang_statement_union_type **stmt; }; -static boolean +static bfd_boolean gld_${EMULATION_NAME}_place_orphan (file, s) lang_input_statement_type *file; asection *s; @@ -1760,11 +1761,11 @@ gld_${EMULATION_NAME}_place_orphan (file, s) if (dollar != NULL) { - boolean found_dollar; + bfd_boolean found_dollar; /* The section name has a '$'. Sort it with the other '$' sections. */ - found_dollar = false; + found_dollar = FALSE; for ( ; *pl != NULL; pl = &(*pl)->header.next) { lang_input_section_type *ls; @@ -1783,7 +1784,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s) } else { - found_dollar = true; + found_dollar = TRUE; if (strcmp (secname, lname) < 0) break; } @@ -1799,10 +1800,10 @@ gld_${EMULATION_NAME}_place_orphan (file, s) free (hold_section_name); - return true; + return TRUE; } -static boolean +static bfd_boolean gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) const char * arch ATTRIBUTE_UNUSED; search_dirs_type * search; @@ -1812,7 +1813,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) char * string; if (! entry->is_archive) - return false; + return FALSE; filename = entry->filename; @@ -1863,7 +1864,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (! ldfile_try_open_bfd (string, entry)) { free (string); - return false; + return FALSE; } } } @@ -1880,7 +1881,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (! ldfile_try_open_bfd (string, entry)) { free (string); - return false; + return FALSE; } } } @@ -1890,7 +1891,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) entry->filename = string; - return true; + return TRUE; } static int @@ -1913,19 +1914,19 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c +echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c +echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +echo ' ; else return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c +echo '; }' >> e${EMULATION_NAME}.c cat >>e${EMULATION_NAME}.c <<EOF diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index b5dd6a2..185a590 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -41,13 +41,20 @@ static bfd_signed_vma group_size = 1; /* Whether to add ".foo" entries for each "foo" in a version script. */ static int dotsyms = 1; -static void ppc_create_output_section_statements PARAMS ((void)); -static void ppc_after_open PARAMS ((void)); -static void ppc_before_allocation PARAMS ((void)); -static asection *ppc_add_stub_section PARAMS ((const char *, asection *)); -static void ppc_layout_sections_again PARAMS ((void)); -static void gld${EMULATION_NAME}_after_allocation PARAMS ((void)); -static void build_section_lists PARAMS ((lang_statement_union_type *)); +static void ppc_create_output_section_statements + PARAMS ((void)); +static void ppc_after_open + PARAMS ((void)); +static void ppc_before_allocation + PARAMS ((void)); +static asection *ppc_add_stub_section + PARAMS ((const char *, asection *)); +static void ppc_layout_sections_again + PARAMS ((void)); +static void gld${EMULATION_NAME}_after_allocation + PARAMS ((void)); +static void build_section_lists + PARAMS ((lang_statement_union_type *)); static struct bfd_elf_version_expr *gld${EMULATION_NAME}_new_vers_pattern PARAMS ((struct bfd_elf_version_expr *)); @@ -105,16 +112,16 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static boolean hook_in_stub +static bfd_boolean hook_in_stub PARAMS ((struct hook_stub_info *, lang_statement_union_type **)); -static boolean +static bfd_boolean hook_in_stub (info, lp) struct hook_stub_info *info; lang_statement_union_type **lp; { lang_statement_union_type *l; - boolean ret; + bfd_boolean ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -152,7 +159,7 @@ hook_in_stub (info, lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return true; + return TRUE; } break; @@ -173,7 +180,7 @@ hook_in_stub (info, lp) break; } } - return false; + return FALSE; } diff --git a/ld/emultempl/sh64elf.em b/ld/emultempl/sh64elf.em index ffa3906..8ec2c31 100644 --- a/ld/emultempl/sh64elf.em +++ b/ld/emultempl/sh64elf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002 Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. # @@ -81,7 +81,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation () } } - command_line.relax = false; + command_line.relax = FALSE; } /* We wouldn't need to do anything when there's already a .cranges @@ -106,7 +106,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation () { einfo (_("%P: Sorry, turning off relaxing: SHmedia sections present.\n")); einfo (" %I\n", f); - command_line.relax = false; + command_line.relax = FALSE; goto done_scanning_shmedia_sections; } } @@ -205,13 +205,12 @@ sh64_elf_${EMULATION_NAME}_before_allocation () = bfd_make_section (output_bfd, SH64_CRANGES_SECTION_NAME); if (cranges == NULL - || (bfd_set_section_flags (output_bfd, + || !bfd_set_section_flags (output_bfd, cranges, SEC_LINKER_CREATED | SEC_KEEP | SEC_HAS_CONTENTS - | SEC_DEBUGGING) - == false)) + | SEC_DEBUGGING)) einfo (_("%P%E%F: Can't make .cranges section\n")); } @@ -268,7 +267,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation () osec = osec->next) { bfd_vma oflags_isa = 0; - boolean need_check_cranges = false; + bfd_boolean need_check_cranges = FALSE; /* Omit excluded or garbage-collected sections. */ if (bfd_get_section_flags (output_bfd, osec) & SEC_EXCLUDE) @@ -335,7 +334,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation () sh64_elf_section_data (osec)->contents_flags = SHF_SH5_ISA32_MIXED; - need_check_cranges = true; + need_check_cranges = TRUE; goto break_2; } } diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em index 64e5ea5..c00c0db 100644 --- a/ld/emultempl/sunos.em +++ b/ld/emultempl/sunos.em @@ -1,6 +1,6 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. -if [ -z "$MACHINE" ]; then +if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH} else OUTPUT_ARCH=${ARCH}:${MACHINE} @@ -9,7 +9,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* SunOS emulation code for ${EMULATION_NAME} - Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> SunOS shared library support by Ian Lance Taylor <ian@cygnus.com> @@ -68,13 +68,13 @@ static void gld${EMULATION_NAME}_create_output_section_statements static void gld${EMULATION_NAME}_find_so PARAMS ((lang_input_statement_type *)); static char *gld${EMULATION_NAME}_search_dir - PARAMS ((const char *, const char *, boolean *)); + PARAMS ((const char *, const char *, bfd_boolean *)); static void gld${EMULATION_NAME}_after_open PARAMS ((void)); static void gld${EMULATION_NAME}_check_needed PARAMS ((lang_input_statement_type *)); -static boolean gld${EMULATION_NAME}_search_needed +static bfd_boolean gld${EMULATION_NAME}_search_needed PARAMS ((const char *, const char *)); -static boolean gld${EMULATION_NAME}_try_needed +static bfd_boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, const char *)); static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); static void gld${EMULATION_NAME}_find_assignment @@ -98,8 +98,8 @@ gld${EMULATION_NAME}_before_parse() } else ldfile_output_architecture = bfd_arch_${ARCH}; - config.dynamic_link = true; - config.has_shared = true; + config.dynamic_link = TRUE; + config.has_shared = TRUE; } /* This is called after the command line arguments have been parsed, @@ -131,7 +131,7 @@ cat >>e${EMULATION_NAME}.c <<EOF if (c != NULL) *c++ = '\0'; if (*l != '\0') - ldfile_add_library_path (l, false); + ldfile_add_library_path (l, FALSE); if (c == NULL) break; l = c; @@ -179,7 +179,7 @@ gld${EMULATION_NAME}_find_so (inp) for (search = search_head; search != NULL; search = search->next) { - boolean found_static; + bfd_boolean found_static; found = gld${EMULATION_NAME}_search_dir (search->name, inp->filename, &found_static); @@ -202,7 +202,7 @@ gld${EMULATION_NAME}_find_so (inp) /* Turn off the search_dirs_flag to prevent ldfile_open_file from searching for this file again. */ - inp->search_dirs_flag = false; + inp->search_dirs_flag = FALSE; free (found); @@ -237,7 +237,7 @@ static char * gld${EMULATION_NAME}_search_dir (dirname, filename, found_static) const char *dirname; const char *filename; - boolean *found_static; + bfd_boolean *found_static; { int force_maj, force_min; const char *dot; @@ -252,7 +252,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static) int statval; struct stat st; - *found_static = false; + *found_static = FALSE; force_maj = -1; force_min = -1; @@ -284,7 +284,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static) if (dir == NULL) return NULL; dirnamelen = strlen (dirname); - + while ((entry = readdir (dir)) != NULL) { const char *s; @@ -297,7 +297,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static) if (dot == NULL && strcmp (entry->d_name + 3 + len, ".a") == 0) { - *found_static = true; + *found_static = TRUE; continue; } @@ -373,7 +373,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static) between after_open and check_needed. */ static struct bfd_link_needed_list *global_needed; -static boolean global_found; +static bfd_boolean global_found; /* This is called after all the input files have been opened. */ @@ -412,7 +412,7 @@ gld${EMULATION_NAME}_after_open () /* See if this file was included in the link explicitly. */ global_needed = l; - global_found = false; + global_found = FALSE; lang_for_each_input_file (gld${EMULATION_NAME}_check_needed); if (global_found) continue; @@ -513,7 +513,7 @@ cat >>e${EMULATION_NAME}.c <<EOF /* Search for a needed file in a path. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_search_needed (path, name) const char *path; const char *name; @@ -521,7 +521,7 @@ gld${EMULATION_NAME}_search_needed (path, name) const char *s; if (path == NULL || *path == '\0') - return false; + return FALSE; while (1) { const char *dir; @@ -542,7 +542,7 @@ gld${EMULATION_NAME}_search_needed (path, name) } if (gld${EMULATION_NAME}_try_needed (dir, name)) - return true; + return TRUE; if (dircopy != NULL) free (dircopy); @@ -552,41 +552,41 @@ gld${EMULATION_NAME}_search_needed (path, name) path = s + 1; } - return false; + return FALSE; } /* This function is called for each possible directory for a needed dynamic object. */ -static boolean +static bfd_boolean gld${EMULATION_NAME}_try_needed (dir, name) const char *dir; const char *name; { char *file; char *alc; - boolean ignore; + bfd_boolean ignore; bfd *abfd; file = gld${EMULATION_NAME}_search_dir (dir, name, &ignore); if (file == NULL) - return false; + return FALSE; alc = (char *) xmalloc (strlen (dir) + strlen (file) + 2); sprintf (alc, "%s/%s", dir, file); free (file); abfd = bfd_openr (alc, bfd_get_target (output_bfd)); if (abfd == NULL) - return false; + return FALSE; if (! bfd_check_format (abfd, bfd_object)) { (void) bfd_close (abfd); - return false; + return FALSE; } if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) { (void) bfd_close (abfd); - return false; + return FALSE; } /* We've found the needed dynamic object. */ @@ -595,7 +595,7 @@ gld${EMULATION_NAME}_try_needed (dir, name) if (! bfd_link_add_symbols (abfd, &link_info)) einfo ("%F%B: could not read symbols: %E\n", abfd); - return true; + return TRUE; } /* See if we have already included a needed object in the link. This @@ -611,7 +611,7 @@ gld${EMULATION_NAME}_check_needed (s) if (strncmp (global_needed->name, "-l", 2) != 0) { if (strcmp (s->filename, global_needed->name) == 0) - global_found = true; + global_found = TRUE; } else { @@ -651,7 +651,7 @@ gld${EMULATION_NAME}_check_needed (s) || (smin != lmin && smin != -1 && lmin != -1)) return; - global_found = true; + global_found = TRUE; } } @@ -659,7 +659,7 @@ gld${EMULATION_NAME}_check_needed (s) to lang_for_each_statement. Ick. */ static const char *find_assign; -static boolean found_assign; +static bfd_boolean found_assign; /* We need to use static variables to pass information around the call to lang_for_each_input_file. Ick. */ @@ -692,7 +692,7 @@ gld${EMULATION_NAME}_before_allocation () if (! link_info.shared && ! link_info.relocateable && ! entry_from_cmdline) { struct bfd_link_hash_entry *h; - + for (h = link_info.hash->undefs; h != NULL; h = h->next) { if (h->type == bfd_link_hash_undefined @@ -702,11 +702,11 @@ gld${EMULATION_NAME}_before_allocation () && strcmp (h->root.string, "__GLOBAL_OFFSET_TABLE_") != 0) { find_assign = h->root.string; - found_assign = false; + found_assign = FALSE; lang_for_each_statement (gld${EMULATION_NAME}_find_assignment); if (! found_assign) { - link_info.shared = true; + link_info.shared = TRUE; break; } } @@ -732,8 +732,8 @@ gld${EMULATION_NAME}_before_allocation () afterward. */ if (! link_info.relocateable) { - hdyn = bfd_link_hash_lookup (link_info.hash, "__DYNAMIC", true, false, - false); + hdyn = bfd_link_hash_lookup (link_info.hash, "__DYNAMIC", TRUE, FALSE, + FALSE); if (hdyn == NULL) einfo ("%P%F: bfd_link_hash_lookup: %E\n"); if (! bfd_sunos_record_link_assignment (output_bfd, &link_info, @@ -862,7 +862,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp) if (find_assign != NULL) { if (strcmp (find_assign, exp->assign.dst) == 0) - found_assign = true; + found_assign = TRUE; return; } @@ -986,14 +986,14 @@ then sc="-f stringify.sed" cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return EOF sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c @@ -1007,12 +1007,12 @@ else # Scripts read from the filesystem. cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; @@ -1027,7 +1027,7 @@ fi cat >>e${EMULATION_NAME}.c <<EOF -struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = +struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { gld${EMULATION_NAME}_before_parse, syslib_default, diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em index eb10317..363cb86 100644 --- a/ld/emultempl/ticoff.em +++ b/ld/emultempl/ticoff.em @@ -3,7 +3,7 @@ (echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) cat >>e${EMULATION_NAME}.c <<EOF /* This file is part of GLD, the Gnu Linker. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -138,9 +138,9 @@ $s/$/n"/ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 0; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`; else if (!config.text_read_only) return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`; @@ -158,9 +158,9 @@ cat >>e${EMULATION_NAME}.c <<EOF { *isfile = 1; - if (link_info.relocateable == true && config.build_constructors == true) + if (link_info.relocateable && config.build_constructors) return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) + else if (link_info.relocateable) return "ldscripts/${EMULATION_NAME}.xr"; else if (!config.text_read_only) return "ldscripts/${EMULATION_NAME}.xbn"; |