diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-31 10:39:51 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-31 10:49:23 +1030 |
commit | f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc (patch) | |
tree | 38d5b486b39b163f1581abf67889d191a8e5cc9f /ld/emultempl | |
parent | 015dc7e1f8a971692a910e6cfc64faf9216e75c3 (diff) | |
download | gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.zip gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.tar.gz gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.tar.bz2 |
Use bool in ld
* sysdep.h (POISON_BFD_BOOLEAN): Define.
* configure.ac (elf_list_options, elf_shlib_list_options=false),
(elf_plt_unwind_list_options=false): Replace FALSE with false,
and TRUE with true.
* emulparams/call_nop.sh, * emulparams/cet.sh,
* emulparams/dynamic_undefined_weak.sh,
* emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh,
* emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh,
* emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh,
* emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh,
* emulparams/reloc_overflow.sh, * emulparams/static.sh,
* emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em,
* emultempl/aix.em, * emultempl/alphaelf.em,
* emultempl/armcoff.em, * emultempl/armelf.em,
* emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em,
* emultempl/cr16elf.em, * emultempl/crxelf.em,
* emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em,
* emultempl/hppaelf.em, * emultempl/linux.em,
* emultempl/m68hc1xelf.em, * emultempl/metagelf.em,
* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
* emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em,
* emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em,
* emultempl/pep.em, * emultempl/ppc32elf.em,
* emultempl/ppc64elf.em, * emultempl/rxelf.em,
* emultempl/rxlinux.em, * emultempl/scoreelf.em,
* emultempl/solaris2.em, * emultempl/spuelf.em,
* emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em,
* emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h,
* ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h,
* ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c,
* ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h,
* ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h,
* ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c,
* pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h,
* testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace
bfd_boolean with bool, FALSE with false, and TRUE with true.
* configure: Regenerate.
Diffstat (limited to 'ld/emultempl')
38 files changed, 514 insertions, 514 deletions
diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em index a185560..4e1d8f8 100644 --- a/ld/emultempl/aarch64elf.em +++ b/ld/emultempl/aarch64elf.em @@ -43,10 +43,10 @@ gld${EMULATION_NAME}_before_parse (void) #ifndef TARGET_ /* I.e., if not generic. */ ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); #endif /* not TARGET_ */ - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - link_info.check_relocs_after_open_input = TRUE; + input_flags.dynamic = ${DYNAMIC_LINK-true}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; + link_info.check_relocs_after_open_input = true; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF @@ -94,11 +94,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -136,7 +136,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) after its associated input section. */ *(info->add.tail) = l->header.next; l->header.next = info->add.head; - return TRUE; + return true; } break; @@ -157,7 +157,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } @@ -213,7 +213,7 @@ gldaarch64_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index bea8c1d..8ea3c16 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -58,7 +58,7 @@ fragment <<EOF #include "libxcoff.h" #include "xcofflink.h" -static void gld${EMULATION_NAME}_read_file (const char *, bfd_boolean); +static void gld${EMULATION_NAME}_read_file (const char *, bool); static void gld${EMULATION_NAME}_free (void *); static void gld${EMULATION_NAME}_find_relocs (lang_statement_union_type *); static void gld${EMULATION_NAME}_find_exp_assignment (etree_type *); @@ -145,8 +145,8 @@ gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); - input_flags.dynamic = TRUE; - config.has_shared = TRUE; + input_flags.dynamic = 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 @@ -275,7 +275,7 @@ gld${EMULATION_NAME}_add_options memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long)); } -static bfd_boolean +static bool gld${EMULATION_NAME}_parse_args (int argc, char **argv) { int indx; @@ -300,7 +300,7 @@ gld${EMULATION_NAME}_parse_args (int argc, char **argv) } } } - return FALSE; + return false; } /* Helper for option '-f', which specify a list of input files. @@ -373,7 +373,7 @@ read_file_list (const char *filename) fclose (f); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { bfd_signed_vma val; @@ -382,7 +382,7 @@ gld${EMULATION_NAME}_handle_option (int optc) switch (optc) { default: - return FALSE; + return false; case 0: /* Long option which just sets a flag. */ @@ -423,7 +423,7 @@ gld${EMULATION_NAME}_handle_option (int optc) ignore the AIX option, because gcc passes it to the linker. */ val = bfd_scan_vma (optarg, &end, 0); if (*end != '\0') - return FALSE; + return false; lang_section_start (".text", exp_intop (val), NULL); break; @@ -468,7 +468,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; case OPTION_AUTOIMP: - link_info.static_link = FALSE; + link_info.static_link = false; break; case OPTION_ERNOTOK: @@ -492,7 +492,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; case OPTION_EXPORT: - gld${EMULATION_NAME}_read_file (optarg, FALSE); + gld${EMULATION_NAME}_read_file (optarg, false); break; case OPTION_IMPORT: @@ -545,7 +545,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; case OPTION_NOAUTOIMP: - link_info.static_link = TRUE; + link_info.static_link = true; break; case OPTION_NOEXPALL: @@ -559,7 +559,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; case OPTION_NOSTRCMPCT: - link_info.traditional_format = TRUE; + link_info.traditional_format = true; break; case OPTION_PD: @@ -608,11 +608,11 @@ gld${EMULATION_NAME}_handle_option (int optc) 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: @@ -637,24 +637,24 @@ gld${EMULATION_NAME}_handle_option (int optc) } - return TRUE; + return true; } /* This is called when an input file can not be recognized as a BFD object or an archive. If the file starts with #!, we must treat it as an import file. This is for AIX compatibility. */ -static bfd_boolean +static bool gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry) { FILE *e; - bfd_boolean ret; + bool ret; e = fopen (entry->filename, FOPEN_RT); if (e == NULL) - return FALSE; + return false; - ret = FALSE; + ret = false; if (getc (e) == '#' && getc (e) == '!') { @@ -669,8 +669,8 @@ gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry) flpp = &(*flpp)->next; *flpp = n; - ret = TRUE; - entry->flags.loaded = TRUE; + ret = true; + entry->flags.loaded = true; } fclose (e); @@ -744,12 +744,12 @@ gld${EMULATION_NAME}_before_allocation (void) /* 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 (_("%F%P: bfd_link_hash_lookup of export symbol failed: %E\n")); if (!bfd_xcoff_export_symbol (link_info.output_bfd, &link_info, h)) @@ -833,8 +833,8 @@ gld${EMULATION_NAME}_before_allocation (void) /* Let the XCOFF backend set up the .loader section. */ if (!bfd_xcoff_size_dynamic_sections - (link_info.output_bfd, &link_info, libpath, entry_symbol.name, file_align, - maxstack, maxdata, gc && !unix_ld, + (link_info.output_bfd, &link_info, libpath, entry_symbol.name, + file_align, maxstack, maxdata, gc && !unix_ld, modtype, textro, flags, special_sections, rtld)) einfo (_("%F%P: failed to set dynamic section sizes: %E\n")); @@ -847,7 +847,7 @@ gld${EMULATION_NAME}_before_allocation (void) lang_statement_union_type **pls; lang_input_section_type *is; const char *oname; - bfd_boolean start; + bool start; sec = special_sections[i]; if (sec == NULL) @@ -907,32 +907,32 @@ gld${EMULATION_NAME}_before_allocation (void) 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; } @@ -983,7 +983,7 @@ gld${EMULATION_NAME}_before_allocation (void) { expld.phase = lang_mark_phase_enum; expld.dataseg.phase = exp_seg_none; - one_lang_size_sections_pass (NULL, FALSE); + one_lang_size_sections_pass (NULL, false); lang_reset_memory_regions (); } @@ -1129,13 +1129,13 @@ is_syscall (char *input, unsigned int *flag) this is called by the handle_option emulation routine. */ static void -gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean import) +gld${EMULATION_NAME}_read_file (const char *filename, bool import) { struct obstack *o; FILE *f; int lineno; int c; - bfd_boolean keep; + bool keep; const char *imppath; const char *impfile; const char *impmember; @@ -1151,7 +1151,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean import) return; } - keep = FALSE; + keep = false; imppath = NULL; impfile = NULL; @@ -1218,7 +1218,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean import) char *start; (void) obstack_finish (o); - keep = TRUE; + keep = true; start = s; while (!ISSPACE (*s) && *s != '(' && *s != '\0') ++s; @@ -1314,7 +1314,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean import) { struct export_symbol_list *n; - ldlang_add_undef (symname, TRUE); + ldlang_add_undef (symname, true); n = ((struct export_symbol_list *) xmalloc (sizeof (struct export_symbol_list))); n->next = export_symbols; @@ -1323,8 +1323,8 @@ gld${EMULATION_NAME}_read_file (const char *filename, bfd_boolean 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 @@ -1403,7 +1403,7 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp) case etree_provide: case etree_provided: h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) break; /* Fall through. */ @@ -1543,7 +1543,7 @@ gld${EMULATION_NAME}_set_output_arch (void) ldfile_output_machine_name = bfd_printable_name (link_info.output_bfd); } -static bfd_boolean +static bool gld${EMULATION_NAME}_open_dynamic_archive (const char *arch, search_dirs_type *search, lang_input_statement_type *entry) @@ -1551,7 +1551,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch, char *path; if (!entry->flags.maybe_archive) - return FALSE; + return false; if (entry->flags.full_name_provided) path = concat (search->name, "/", entry->filename, @@ -1563,16 +1563,16 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch, if (!ldfile_try_open_bfd (path, entry)) { free (path); - return FALSE; + return false; } /* Don't include the searched directory in the import path. */ bfd_xcoff_set_archive_import_path (&link_info, entry->the_bfd, path + strlen (search->name) + 1); entry->filename = path; - return TRUE; + return true; } -static bfd_boolean +static bool gld${EMULATION_NAME}_print_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr) { @@ -1599,7 +1599,7 @@ gld${EMULATION_NAME}_print_symbol (struct bfd_link_hash_entry *hash_entry, minfo (" %pT\n", hash_entry->root.string); } - return TRUE; + return true; } struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em index 7fed996..0e2416c 100644 --- a/ld/emultempl/alphaelf.em +++ b/ld/emultempl/alphaelf.em @@ -28,9 +28,9 @@ fragment <<EOF #include "elf/alpha.h" #include "elf-bfd.h" -static bfd_boolean limit_32bit; +static bool limit_32bit; -extern bfd_boolean elf64_alpha_use_secureplt; +extern bool elf64_alpha_use_secureplt; /* Set the start address as in the Tru64 ld. */ @@ -138,10 +138,10 @@ PARSE_AND_LIST_ARGS_CASES=' limit_32bit = 1; break; case OPTION_SECUREPLT: - elf64_alpha_use_secureplt = TRUE; + elf64_alpha_use_secureplt = true; break; case OPTION_NO_SECUREPLT: - elf64_alpha_use_secureplt = FALSE; + elf64_alpha_use_secureplt = false; break; ' diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em index b4a3fb4..57b17a3 100644 --- a/ld/emultempl/armcoff.em +++ b/ld/emultempl/armcoff.em @@ -74,13 +74,13 @@ gld${EMULATION_NAME}_list_options (FILE *file) fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n")); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_SUPPORT_OLD_CODE: support_old_code = 1; @@ -91,7 +91,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; } - return TRUE; + return true; } static void @@ -164,7 +164,7 @@ gld${EMULATION_NAME}_finish (void) struct bfd_link_hash_entry * h; 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.em b/ld/emultempl/armelf.em index a4cf93b..bcb60d2 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -56,10 +56,10 @@ gld${EMULATION_NAME}_before_parse (void) #ifndef TARGET_ /* I.e., if not generic. */ ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); #endif /* not TARGET_ */ - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - link_info.check_relocs_after_open_input = TRUE; + input_flags.dynamic = ${DYNAMIC_LINK-true}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; + link_info.check_relocs_after_open_input = true; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF @@ -149,11 +149,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -191,7 +191,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) after its associated input section. */ *(info->add.tail) = l->header.next; l->header.next = info->add.head; - return TRUE; + return true; } break; @@ -212,7 +212,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } @@ -284,7 +284,7 @@ gldarm_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } @@ -457,7 +457,7 @@ gld${EMULATION_NAME}_finish (void) if (params.thumb_entry_symbol) { h = bfd_link_hash_lookup (link_info.hash, params.thumb_entry_symbol, - FALSE, FALSE, TRUE); + false, false, true); } else { @@ -467,7 +467,7 @@ gld${EMULATION_NAME}_finish (void) return; h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name, - FALSE, FALSE, TRUE); + false, false, true); eh = (struct elf_link_hash_entry *)h; if (!h || ARM_GET_SYM_BRANCH_TYPE (eh->target_internal) != ST_BRANCH_TO_THUMB) diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em index 56256a1..eb01c8f 100644 --- a/ld/emultempl/avrelf.em +++ b/ld/emultempl/avrelf.em @@ -39,10 +39,10 @@ static asection *avr_stub_section; /* Variables set by the command-line parameters and transferred to the bfd without use of global shared variables. */ -static bfd_boolean avr_no_stubs = FALSE; -static bfd_boolean avr_debug_relax = FALSE; -static bfd_boolean avr_debug_stubs = FALSE; -static bfd_boolean avr_replace_call_ret_sequences = TRUE; +static bool avr_no_stubs = false; +static bool avr_debug_relax = false; +static bool avr_debug_stubs = false; +static bool avr_replace_call_ret_sequences = true; static bfd_vma avr_pc_wrap_around = 0x10000000; /* Transfers information to the bfd frontend. */ @@ -73,7 +73,7 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) { - avr_no_stubs = TRUE; + avr_no_stubs = true; return; } @@ -81,14 +81,14 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) if (strcmp ("${EMULATION_NAME}", "avr6") != 0 && strcmp ("${EMULATION_NAME}", "avrxmega6") != 0 && strcmp ("${EMULATION_NAME}", "avrxmega7") != 0) - avr_no_stubs = TRUE; + avr_no_stubs = true; avr_elf_set_global_bfd_parameters (); /* If generating a relocatable output file, then we don't have to generate the trampolines. */ if (bfd_link_relocatable (&link_info)) - avr_no_stubs = TRUE; + avr_no_stubs = true; if (avr_no_stubs) return; @@ -102,7 +102,7 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) return; /* Call into the BFD backend to do the real "stub"-work. */ - if (! elf32_avr_size_stubs (link_info.output_bfd, &link_info, TRUE)) + if (! elf32_avr_size_stubs (link_info.output_bfd, &link_info, true)) einfo (_("%X%P: can not size stub section: %E\n")); } @@ -165,7 +165,7 @@ avr_elf_after_allocation (void) { /* If relaxing, elf32_avr_size_stubs will be called from elf32_avr_relax_section. */ - if (!elf32_avr_size_stubs (link_info.output_bfd, &link_info, TRUE)) + if (!elf32_avr_size_stubs (link_info.output_bfd, &link_info, true)) einfo (_("%X%P: can not size stub section: %E\n")); } @@ -184,7 +184,7 @@ avr_elf_before_parse (void) { /* Don't create a demand-paged executable, since this feature isn't meaningful in AVR. */ - config.magic_demand_paged = FALSE; + config.magic_demand_paged = false; gld${EMULATION_NAME}_before_parse (); } @@ -193,11 +193,11 @@ static void avr_finish (void) { bfd *abfd; - bfd_boolean avr_link_relax; + bool avr_link_relax; if (bfd_link_relocatable (&link_info)) { - avr_link_relax = TRUE; + avr_link_relax = true; for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next) { /* Don't let the linker stubs prevent the final object being @@ -206,7 +206,7 @@ avr_finish (void) & EF_AVR_LINKRELAX_PREPARED) == 0 && abfd != stub_file->the_bfd) { - avr_link_relax = FALSE; + avr_link_relax = false; break; } } @@ -296,26 +296,26 @@ PARSE_AND_LIST_ARGS_CASES=' else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K"))) avr_pc_wrap_around = 0x10000; else - return FALSE; + return false; } break; case OPTION_DEBUG_STUBS: - avr_debug_stubs = TRUE; + avr_debug_stubs = true; break; case OPTION_DEBUG_RELAX: - avr_debug_relax = TRUE; + avr_debug_relax = true; break; case OPTION_NO_STUBS: - avr_no_stubs = TRUE; + avr_no_stubs = true; break; case OPTION_NO_CALL_RET_REPLACEMENT: { /* This variable is defined in the bfd library. */ - avr_replace_call_ret_sequences = FALSE; + avr_replace_call_ret_sequences = false; } break; ' diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index d984d3d..2de3448 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -260,13 +260,13 @@ set_pe_stack_heap (char *resname, char *comname) } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_BASE_FILE: link_info.base_file = fopen (optarg, FOPEN_WB); @@ -315,7 +315,7 @@ gld${EMULATION_NAME}_handle_option (int optc) set_pe_value ("__image_base__"); break; } - return TRUE; + return true; } /* Assign values to the special symbols before the linker script is @@ -349,7 +349,7 @@ gld_${EMULATION_NAME}_set_symbols (void) { long val = init[j].value; lang_add_assignment (exp_assign (init[j].symbol, exp_intop (val), - FALSE)); + false)); if (init[j].size == sizeof(short)) *(short *)init[j].ptr = val; else if (init[j].size == sizeof(int)) @@ -678,7 +678,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s, output_secname = xstrdup (secname); ps = strchr (output_secname + 1, '\$'); *ps = 0; - os = lang_output_section_statement_lookup (output_secname, constraint, TRUE); + os = lang_output_section_statement_lookup (output_secname, constraint, true); /* Find the '\$' wild statement for this section. We currently require the linker script to explicitly mention "*(.foo\$)". */ diff --git a/ld/emultempl/bfin.em b/ld/emultempl/bfin.em index 54325e2..dfe4b66 100644 --- a/ld/emultempl/bfin.em +++ b/ld/emultempl/bfin.em @@ -28,10 +28,10 @@ fragment <<EOF #include "elf32-bfin.h" /* Whether to put code in Blackfin L1 SRAM. */ -extern bfd_boolean elf32_bfin_code_in_l1; +extern bool elf32_bfin_code_in_l1; /* Whether to put (writable) data in Blackfin L1 SRAM. */ -extern bfd_boolean elf32_bfin_data_in_l1; +extern bool elf32_bfin_data_in_l1; EOF @@ -58,9 +58,9 @@ PARSE_AND_LIST_OPTIONS=' PARSE_AND_LIST_ARGS_CASES=' case OPTION_CODE_IN_L1: - elf32_bfin_code_in_l1 = TRUE; + elf32_bfin_code_in_l1 = true; break; case OPTION_DATA_IN_L1: - elf32_bfin_data_in_l1 = TRUE; + elf32_bfin_data_in_l1 = true; break; ' diff --git a/ld/emultempl/cr16elf.em b/ld/emultempl/cr16elf.em index abae7e6..b155dd6 100644 --- a/ld/emultempl/cr16elf.em +++ b/ld/emultempl/cr16elf.em @@ -112,12 +112,12 @@ cr16elf_after_parse (void) option. This is to emulate the CRTools' method of keeping variables of different alignment in separate sections. */ - config.sort_common = TRUE; + config.sort_common = true; /* Don't create a demand-paged executable, since this feature isn't meaninful in CR16 embedded systems. Moreover, when magic_demand_paged is true the link sometimes fails. */ - config.magic_demand_paged = FALSE; + config.magic_demand_paged = false; ldelf_after_parse (); } diff --git a/ld/emultempl/crxelf.em b/ld/emultempl/crxelf.em index b1ff4d4..5c5784f 100644 --- a/ld/emultempl/crxelf.em +++ b/ld/emultempl/crxelf.em @@ -33,12 +33,12 @@ crxelf_after_parse (void) option. This is to emulate the CRTools' method of keeping variables of different alignment in separate sections. */ - config.sort_common = TRUE; + config.sort_common = true; /* Don't create a demand-paged executable, since this feature isn't meaninful in CRX embedded systems. Moreover, when magic_demand_paged is true the link sometimes fails. */ - config.magic_demand_paged = FALSE; + config.magic_demand_paged = false; ldelf_after_parse (); } diff --git a/ld/emultempl/cskyelf.em b/ld/emultempl/cskyelf.em index ca38cf6..ff3c2f4 100644 --- a/ld/emultempl/cskyelf.em +++ b/ld/emultempl/cskyelf.em @@ -28,7 +28,7 @@ fragment <<EOF #include "elf32-csky.h" /* To use branch stub or not. */ -extern bfd_boolean use_branch_stub; +extern bool use_branch_stub; /* Fake input file for stubs. */ static lang_input_statement_type *stub_file; @@ -48,11 +48,11 @@ struct hook_stub_info }; /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (l = *lp; l != NULL; lp = &l->header.next, l = *lp) switch (l->header.type) @@ -89,7 +89,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) after its associated input section. */ *(info->add.tail) = l->header.next; l->header.next = info->add.head; - return TRUE; + return true; } break; @@ -110,7 +110,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } - return FALSE; + return false; } EOF @@ -121,7 +121,7 @@ fragment <<EOF static void csky_elf_before_parse (void) { - use_branch_stub = FALSE; + use_branch_stub = false; gld${EMULATION_NAME}_before_parse (); } EOF @@ -137,7 +137,7 @@ csky_elf_create_output_section_statements (void) { if (!(bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour && elf_object_id (link_info.output_bfd) == CSKY_ELF_DATA)) - use_branch_stub = FALSE; + use_branch_stub = false; /* If don't use branch stub, just do not emit stub_file. */ if (!use_branch_stub) @@ -209,7 +209,7 @@ gldcsky_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } @@ -312,10 +312,10 @@ PARSE_AND_LIST_OPTIONS=' PARSE_AND_LIST_ARGS_CASES=' case OPTION_BRANCH_STUB: - use_branch_stub = TRUE; + use_branch_stub = true; break; case OPTION_NO_BRANCH_STUB: - use_branch_stub = FALSE; + use_branch_stub = false; break; case OPTION_STUBGROUP_SIZE: diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em index 986b77e..bfaf813 100644 --- a/ld/emultempl/elf.em +++ b/ld/emultempl/elf.em @@ -78,10 +78,10 @@ static void gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - link_info.check_relocs_after_open_input = TRUE; + input_flags.dynamic = ${DYNAMIC_LINK-true}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; + link_info.check_relocs_after_open_input = true; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF @@ -106,21 +106,21 @@ EOF if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then - IS_LINUX_TARGET=FALSE - IS_FREEBSD_TARGET=FALSE + IS_LINUX_TARGET=false + IS_FREEBSD_TARGET=false case ${target} in *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*) - IS_LINUX_TARGET=TRUE ;; + IS_LINUX_TARGET=true ;; *-*-freebsd* | *-*-dragonfly*) - IS_FREEBSD_TARGET=TRUE ;; + IS_FREEBSD_TARGET=true ;; esac - IS_LIBPATH=FALSE + IS_LIBPATH=false if test "x${USE_LIBPATH}" = xyes; then - IS_LIBPATH=TRUE + IS_LIBPATH=true fi - IS_NATIVE=FALSE + IS_NATIVE=false if test "x${NATIVE}" = xyes; then - IS_NATIVE=TRUE + IS_NATIVE=true fi fragment <<EOF @@ -617,13 +617,13 @@ fragment <<EOF #define DEFAULT_BUILD_ID_STYLE "sha1" -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_BUILD_ID: free ((char *) ldelf_emit_note_gnu_build_id); @@ -660,11 +660,11 @@ fragment <<EOF break; 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: @@ -687,16 +687,16 @@ fragment <<EOF break; case OPTION_HASH_STYLE: - link_info.emit_hash = FALSE; - link_info.emit_gnu_hash = FALSE; + link_info.emit_hash = false; + link_info.emit_gnu_hash = false; if (strcmp (optarg, "sysv") == 0) - link_info.emit_hash = TRUE; + link_info.emit_hash = true; else if (strcmp (optarg, "gnu") == 0) - link_info.emit_gnu_hash = TRUE; + link_info.emit_gnu_hash = true; else if (strcmp (optarg, "both") == 0) { - link_info.emit_hash = TRUE; - link_info.emit_gnu_hash = TRUE; + link_info.emit_hash = true; + link_info.emit_gnu_hash = true; } else einfo (_("%F%P: invalid hash style \`%s'\n"), optarg); @@ -711,7 +711,7 @@ fragment <<EOF else if (strcmp (optarg, "undefs") == 0) link_info.unresolved_syms_in_objects = RM_IGNORE; else if (strcmp (optarg, "muldefs") == 0) - link_info.allow_multiple_definition = TRUE; + link_info.allow_multiple_definition = true; else if (startswith (optarg, "max-page-size=")) { char *end; @@ -744,26 +744,26 @@ fragment <<EOF } else if (strcmp (optarg, "execstack") == 0) { - link_info.execstack = TRUE; - link_info.noexecstack = FALSE; + link_info.execstack = true; + link_info.noexecstack = false; } else if (strcmp (optarg, "noexecstack") == 0) { - link_info.noexecstack = TRUE; - link_info.execstack = FALSE; + link_info.noexecstack = true; + link_info.execstack = false; } else if (strcmp (optarg, "unique-symbol") == 0) - link_info.unique_symbol = TRUE; + link_info.unique_symbol = true; else if (strcmp (optarg, "nounique-symbol") == 0) - link_info.unique_symbol = FALSE; + link_info.unique_symbol = false; else if (strcmp (optarg, "globalaudit") == 0) { link_info.flags_1 |= DF_1_GLOBAUDIT; } else if (startswith (optarg, "start-stop-gc")) - link_info.start_stop_gc = TRUE; + link_info.start_stop_gc = true; else if (startswith (optarg, "nostart-stop-gc")) - link_info.start_stop_gc = FALSE; + link_info.start_stop_gc = false; else if (startswith (optarg, "start-stop-visibility=")) { if (strcmp (optarg, "start-stop-visibility=default") == 0) @@ -819,25 +819,25 @@ fragment <<EOF else if (strcmp (optarg, "nounique") == 0) link_info.gnu_flags_1 &= ~(bfd_vma) DF_GNU_1_UNIQUE; 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; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF else if (strcmp (optarg, "relro") == 0) - link_info.relro = TRUE; + link_info.relro = true; else if (strcmp (optarg, "norelro") == 0) - link_info.relro = FALSE; + link_info.relro = false; EOF fi fragment <<EOF else if (strcmp (optarg, "separate-code") == 0) - link_info.separate_code = TRUE; + link_info.separate_code = true; else if (strcmp (optarg, "noseparate-code") == 0) - link_info.separate_code = FALSE; + link_info.separate_code = false; else if (strcmp (optarg, "common") == 0) link_info.elf_stt_common = elf_stt_common; else if (strcmp (optarg, "nocommon") == 0) @@ -872,7 +872,7 @@ fi fragment <<EOF } - return TRUE; + return true; } EOF diff --git a/ld/emultempl/genelf.em b/ld/emultempl/genelf.em index ecedfff..067b924 100644 --- a/ld/emultempl/genelf.em +++ b/ld/emultempl/genelf.em @@ -64,7 +64,7 @@ gld${EMULATION_NAME}_before_allocation (void) static void gld${EMULATION_NAME}_after_allocation (void) { - ldelf_map_segments (FALSE); + ldelf_map_segments (false); } EOF # Put these extra routines in ld_${EMULATION_NAME}_emulation diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index f195a17..37567b0 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -100,11 +100,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -142,7 +142,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return TRUE; + return true; } break; @@ -163,7 +163,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } @@ -215,7 +215,7 @@ hppaelf_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } diff --git a/ld/emultempl/linux.em b/ld/emultempl/linux.em index c16bc68..e4d87bc 100644 --- a/ld/emultempl/linux.em +++ b/ld/emultempl/linux.em @@ -49,9 +49,9 @@ static void gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); - input_flags.dynamic = TRUE; - config.has_shared = TRUE; - link_info.check_relocs_after_open_input = TRUE; + input_flags.dynamic = true; + config.has_shared = true; + link_info.check_relocs_after_open_input = true; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF @@ -64,14 +64,14 @@ fragment <<EOF /* Try to open a dynamic archive. This is where we know that Linux dynamic libraries have an extension of .sa. */ -static bfd_boolean +static bool gld${EMULATION_NAME}_open_dynamic_archive (const char *arch, search_dirs_type *search, lang_input_statement_type *entry) { char *string; if (! entry->flags.maybe_archive || entry->flags.full_name_provided) - return FALSE; + return false; string = (char *) xmalloc (strlen (search->name) + strlen (entry->filename) @@ -83,12 +83,12 @@ gld${EMULATION_NAME}_open_dynamic_archive 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 diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em index 212db7c..480d1b7 100644 --- a/ld/emultempl/m68hc1xelf.em +++ b/ld/emultempl/m68hc1xelf.em @@ -105,7 +105,7 @@ m68hc11_elf_${EMULATION_NAME}_before_allocation (void) But for 68HC11 this is board specific. The definition of such memory region allows one to control how this paged memory is accessed. */ - region = lang_memory_region_lookup (bank_window_name, FALSE); + region = lang_memory_region_lookup (bank_window_name, false); /* Check the length to see if it was defined in the script. */ if (region->length != 0) @@ -175,11 +175,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -219,7 +219,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return TRUE; + return true; } break; @@ -240,7 +240,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } diff --git a/ld/emultempl/metagelf.em b/ld/emultempl/metagelf.em index 41ada3f..96bffbc 100644 --- a/ld/emultempl/metagelf.em +++ b/ld/emultempl/metagelf.em @@ -76,11 +76,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -118,7 +118,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return TRUE; + return true; } break; @@ -139,7 +139,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } @@ -191,7 +191,7 @@ metagelf_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em index e27e53c..8f28fcd 100644 --- a/ld/emultempl/mipself.em +++ b/ld/emultempl/mipself.em @@ -20,10 +20,10 @@ case ${target} in *-*-*gnu*) - gnu_target=TRUE + gnu_target=true ;; *) - gnu_target=FALSE + gnu_target=false ;; esac @@ -42,9 +42,9 @@ fragment <<EOF static lang_input_statement_type *stub_file; static bfd *stub_bfd; -static bfd_boolean insn32; -static bfd_boolean ignore_branch_isa; -static bfd_boolean compact_branches; +static bool insn32; +static bool ignore_branch_isa; +static bool compact_branches; struct hook_stub_info { @@ -54,11 +54,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -97,7 +97,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return TRUE; + return true; } break; @@ -118,7 +118,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } /* Create a new stub section called STUB_SEC_NAME and arrange for it to @@ -278,27 +278,27 @@ PARSE_AND_LIST_OPTIONS=' PARSE_AND_LIST_ARGS_CASES=' case OPTION_INSN32: - insn32 = TRUE; + insn32 = true; break; case OPTION_NO_INSN32: - insn32 = FALSE; + insn32 = false; break; case OPTION_IGNORE_BRANCH_ISA: - ignore_branch_isa = TRUE; + ignore_branch_isa = true; break; case OPTION_NO_IGNORE_BRANCH_ISA: - ignore_branch_isa = FALSE; + ignore_branch_isa = false; break; case OPTION_COMPACT_BRANCHES: - compact_branches = TRUE; + compact_branches = true; break; case OPTION_NO_COMPACT_BRANCHES: - compact_branches = FALSE; + compact_branches = false; break; ' diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em index f820223..a88fc5a 100644 --- a/ld/emultempl/mmix-elfnmmo.em +++ b/ld/emultempl/mmix-elfnmmo.em @@ -30,7 +30,7 @@ static void gld${EMULATION_NAME}_before_parse (void); static void mmix_before_parse (void) { - link_info.check_relocs_after_open_input = TRUE; + link_info.check_relocs_after_open_input = true; gld${EMULATION_NAME}_before_parse (); } diff --git a/ld/emultempl/mmixelf.em b/ld/emultempl/mmixelf.em index 23a501e..44c8287 100644 --- a/ld/emultempl/mmixelf.em +++ b/ld/emultempl/mmixelf.em @@ -37,9 +37,9 @@ elfmmix_before_parse (void) 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; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; } EOF diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em index fa0b19a..a3a2299 100644 --- a/ld/emultempl/mmo.em +++ b/ld/emultempl/mmo.em @@ -202,7 +202,7 @@ static void gld${EMULATION_NAME}_after_allocation (void) { bfd_map_over_sections (link_info.output_bfd, mmo_wipe_sec_reloc_flag, NULL); - ldelf_map_segments (FALSE); + ldelf_map_segments (false); } /* To get on-demand global register allocation right, we need to parse the diff --git a/ld/emultempl/msp430.em b/ld/emultempl/msp430.em index 7e364af..c09db93 100644 --- a/ld/emultempl/msp430.em +++ b/ld/emultempl/msp430.em @@ -61,7 +61,7 @@ enum { ROM, RAM }; static int data_region = REGION_NONE; static int code_region = REGION_NONE; -static bfd_boolean disable_sec_transformation = FALSE; +static bool disable_sec_transformation = false; #define MAX_PREFIX_LENGTH 7 @@ -228,21 +228,21 @@ scan_children (lang_statement_union_type * l) static void warn_no_output_section (const char *name) { - static bfd_boolean warned[2][4] = {{FALSE, FALSE, FALSE, FALSE}, - {FALSE, FALSE, FALSE, FALSE}}; + static bool warned[2][4] = {{false, false, false, false}, + {false, false, false, false}}; int i = WARN_LOWER; if (strncmp (name, ".upper.", 7) == 0) i = WARN_UPPER; if (!warned[i][WARN_TEXT] && strcmp (name + 6, ".text") == 0) - warned[i][WARN_TEXT] = TRUE; + warned[i][WARN_TEXT] = true; else if (!warned[i][WARN_DATA] && strcmp (name + 6, ".data") == 0) - warned[i][WARN_DATA] = TRUE; + warned[i][WARN_DATA] = true; else if (!warned[i][WARN_BSS] && strcmp (name + 6, ".bss") == 0) - warned[i][WARN_BSS] = TRUE; + warned[i][WARN_BSS] = true; else if (!warned[i][WARN_RODATA] && strcmp (name + 6, ".rodata") == 0) - warned[i][WARN_RODATA] = TRUE; + warned[i][WARN_RODATA] = true; else return; einfo ("%P: warning: no input section rule matches %s in linker script\n", @@ -336,7 +336,7 @@ fi fragment <<EOF -static bfd_boolean +static bool change_output_section (lang_statement_union_type **head, asection *s, lang_output_section_statement_type *new_os, @@ -371,13 +371,13 @@ change_output_section (lang_statement_union_type **head, if (old_list->tail == (lang_statement_union_type **) curr) old_list->tail = (lang_statement_union_type **) prev; - return TRUE; + return true; } break; case lang_wild_statement_enum: if (change_output_section (&(curr->wild_statement.children.head), s, new_os, old_os)) - return TRUE; + return true; break; default: break; @@ -385,7 +385,7 @@ change_output_section (lang_statement_union_type **head, prev = curr; curr = curr->header.next; } - return FALSE; + return false; } static void @@ -483,7 +483,7 @@ gld${EMULATION_NAME}_list_options (FILE * file) add the {either,lower,upper,none} prefixes\n")); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) @@ -501,13 +501,13 @@ gld${EMULATION_NAME}_handle_option (int optc) { einfo (_("%P: --code-region requires an argument: " "{upper,lower,either,none}\n")); - return FALSE; + return false; } else { einfo (_("%P: error: unrecognized argument to --code-region= option: " "\"%s\"\n"), optarg); - return FALSE; + return false; } break; @@ -524,24 +524,24 @@ gld${EMULATION_NAME}_handle_option (int optc) { einfo (_("%P: --data-region requires an argument: " "{upper,lower,either,none}\n")); - return FALSE; + return false; } else { einfo (_("%P: error: unrecognized argument to --data-region= option: " "\"%s\"\n"), optarg); - return FALSE; + return false; } break; case OPTION_DISABLE_TRANS: - disable_sec_transformation = TRUE; + disable_sec_transformation = true; break; default: - return FALSE; + return false; } - return TRUE; + return true; } static void @@ -730,7 +730,7 @@ intermediate_relax_sections (void) while (i--) { - bfd_boolean relax_again; + bool relax_again; link_info.relax_trip = -1; do @@ -741,8 +741,8 @@ intermediate_relax_sections (void) lang_reset_memory_regions (); - relax_again = FALSE; - lang_size_sections (&relax_again, FALSE); + relax_again = false; + lang_size_sections (&relax_again, false); } while (relax_again); @@ -840,12 +840,12 @@ input_section_exists (lang_statement_union_type * l, const char * name) if ((l->input_section.section->flags & SEC_ALLOC) && l->input_section.section->size > 0 && !strcmp (l->input_section.section->name, name)) - return TRUE; + return true; break; case lang_wild_statement_enum: if (input_section_exists (l->wild_statement.children.head, name)) - return TRUE; + return true; break; default: @@ -853,7 +853,7 @@ input_section_exists (lang_statement_union_type * l, const char * name) } l = l->header.next; } - return FALSE; + return false; } /* Some MSP430 linker scripts do not include ALIGN directives to ensure @@ -889,7 +889,7 @@ check_array_section_alignment (void) || (rodata2_sec && input_section_exists (rodata2_sec->children.head, array_names[i][0]))) && (sym = bfd_link_hash_lookup (link_info.hash, array_names[i][1], - FALSE, FALSE, TRUE)) + false, false, true)) && sym->type == bfd_link_hash_defined && sym->u.def.value % 2) { diff --git a/ld/emultempl/nios2elf.em b/ld/emultempl/nios2elf.em index fcc2756..d0d5cc0 100644 --- a/ld/emultempl/nios2elf.em +++ b/ld/emultempl/nios2elf.em @@ -81,12 +81,12 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp, - bfd_boolean afterp) + bool afterp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -133,7 +133,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp, *lp = info->add.head; *(info->add.tail) = l; } - return TRUE; + return true; } break; @@ -154,7 +154,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp, break; } } - return FALSE; + return false; } /* Call-back for elf32_nios2_size_stubs. */ @@ -164,7 +164,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp, static asection * nios2elf_add_stub_section (const char *stub_sec_name, asection *input_section, - bfd_boolean afterp) + bool afterp) { asection *stub_sec; flagword flags; @@ -208,7 +208,7 @@ nios2elf_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); need_laying_out = -1; } diff --git a/ld/emultempl/pdp11.em b/ld/emultempl/pdp11.em index 6a3cacb..2ed1e61 100644 --- a/ld/emultempl/pdp11.em +++ b/ld/emultempl/pdp11.em @@ -28,8 +28,8 @@ gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); /* for PDP11 Unix compatibility, default to --omagic */ - config.magic_demand_paged = FALSE; - config.text_read_only = FALSE; + config.magic_demand_paged = false; + config.text_read_only = false; } /* PDP11 specific options. */ @@ -67,13 +67,13 @@ gld${EMULATION_NAME}_list_options (FILE *file) fprintf (file, _(" --no-omagic Equivalent to --nmagic\n")); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case 'z': case OPTION_IMAGIC: @@ -84,7 +84,7 @@ gld${EMULATION_NAME}_handle_option (int optc) break; } - return TRUE; + return true; } /* We need a special case to prepare an additional linker script for option diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index ea11a02..c5aed5f 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -133,7 +133,7 @@ static int support_old_code = 0; static char * thumb_entry_symbol = NULL; static lang_assignment_statement_type *image_base_statement = 0; static unsigned short pe_dll_characteristics = DEFAULT_DLL_CHARACTERISTICS; -static bfd_boolean insert_timestamp = TRUE; +static bool insert_timestamp = true; static const char *emit_build_id; #ifdef DLL_SUPPORT @@ -167,7 +167,7 @@ gld_${EMULATION_NAME}_before_parse (void) ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); output_filename = "${EXECUTABLE_NAME:-a.exe}"; #ifdef DLL_SUPPORT - input_flags.dynamic = TRUE; + input_flags.dynamic = true; config.has_shared = 1; EOF @@ -395,7 +395,7 @@ typedef struct /* FALSE for an assembly level symbol and TRUE for a C visible symbol. C visible symbols can be prefixed by underscore dependent to target's settings. */ - bfd_boolean is_c_symbol; + bool is_c_symbol; } definfo; /* Get symbol name dependent to kind and C visible state of @@ -414,31 +414,31 @@ static definfo init[] = { /* imagebase must be first */ #define IMAGEBASEOFF 0 - D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE, FALSE), + D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE, false), #define DLLOFF 1 - {&dll, sizeof(dll), 0, "__dll__", 0, FALSE}, + {&dll, sizeof(dll), 0, "__dll__", 0, false}, #define MSIMAGEBASEOFF 2 - D(ImageBase, "___ImageBase", NT_EXE_IMAGE_BASE, TRUE), - D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT, FALSE), - D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT, FALSE), - D(MajorOperatingSystemVersion,"__major_os_version__", 4, FALSE), - D(MinorOperatingSystemVersion,"__minor_os_version__", 0, FALSE), - D(MajorImageVersion,"__major_image_version__", 1, FALSE), - D(MinorImageVersion,"__minor_image_version__", 0, FALSE), + D(ImageBase, "___ImageBase", NT_EXE_IMAGE_BASE, true), + D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT, false), + D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT, false), + D(MajorOperatingSystemVersion,"__major_os_version__", 4, false), + D(MinorOperatingSystemVersion,"__minor_os_version__", 0, false), + D(MajorImageVersion,"__major_image_version__", 1, false), + D(MinorImageVersion,"__minor_image_version__", 0, false), #if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe) - D(MajorSubsystemVersion,"__major_subsystem_version__", 3, FALSE), + D(MajorSubsystemVersion,"__major_subsystem_version__", 3, false), #else - D(MajorSubsystemVersion,"__major_subsystem_version__", 4, FALSE), + D(MajorSubsystemVersion,"__major_subsystem_version__", 4, false), #endif - D(MinorSubsystemVersion,"__minor_subsystem_version__", 0, FALSE), - D(Subsystem,"__subsystem__", ${SUBSYSTEM}, FALSE), - D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000, FALSE), - D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000, FALSE), - D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000, FALSE), - D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000, FALSE), - D(LoaderFlags,"__loader_flags__", 0x0, FALSE), - D(DllCharacteristics, "__dll_characteristics__", DEFAULT_DLL_CHARACTERISTICS, FALSE), - { NULL, 0, 0, NULL, 0 , FALSE} + D(MinorSubsystemVersion,"__minor_subsystem_version__", 0, false), + D(Subsystem,"__subsystem__", ${SUBSYSTEM}, false), + D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000, false), + D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000, false), + D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000, false), + D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000, false), + D(LoaderFlags,"__loader_flags__", 0x0, false), + D(DllCharacteristics, "__dll_characteristics__", DEFAULT_DLL_CHARACTERISTICS, false), + { NULL, 0, 0, NULL, 0 , false} }; @@ -716,13 +716,13 @@ set_pe_stack_heap (char *resname, char *comname) #define DEFAULT_BUILD_ID_STYLE "md5" -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_BASE_FILE: link_info.base_file = fopen (optarg, FOPEN_WB); @@ -777,7 +777,7 @@ gld${EMULATION_NAME}_handle_option (int optc) thumb_entry_symbol = optarg; break; case OPTION_USE_NUL_PREFIXED_IMPORT_TABLES: - pe_use_nul_prefixed_import_tables = TRUE; + pe_use_nul_prefixed_import_tables = true; break; case OPTION_NO_LEADING_UNDERSCORE: pe_leading_underscore = 0; @@ -786,10 +786,10 @@ gld${EMULATION_NAME}_handle_option (int optc) pe_leading_underscore = 1; break; case OPTION_INSERT_TIMESTAMP: - insert_timestamp = TRUE; + insert_timestamp = true; break; case OPTION_NO_INSERT_TIMESTAMP: - insert_timestamp = FALSE; + insert_timestamp = false; break; #ifdef DLL_SUPPORT case OPTION_OUT_DEF: @@ -949,7 +949,7 @@ gld${EMULATION_NAME}_handle_option (int optc) /* Set DLLCharacteristics bits */ set_pe_name ("__dll_characteristics__", pe_dll_characteristics); - return TRUE; + return true; } @@ -1031,7 +1031,7 @@ gld_${EMULATION_NAME}_set_symbols (void) lang_assignment_statement_type *rv; rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j), - exp_intop (val), FALSE)); + exp_intop (val), false)); if (init[j].size == sizeof (short)) *(short *) init[j].ptr = val; else if (init[j].size == sizeof (int)) @@ -1074,7 +1074,7 @@ gld_${EMULATION_NAME}_after_parse (void) #ifdef DLL_SUPPORT static struct bfd_link_hash_entry *pe_undef_found_sym; -static bfd_boolean +static bool pe_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf) { int sl; @@ -1089,9 +1089,9 @@ pe_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf) && h->root.string[sl] == '@') { pe_undef_found_sym = h; - return FALSE; + return false; } - return TRUE; + return true; } /* Change UNDEF to a defined symbol, taking data from SYM. */ @@ -1100,7 +1100,7 @@ static void change_undef (struct bfd_link_hash_entry * undef, struct bfd_link_hash_entry * sym) { - static bfd_boolean gave_warning_message = FALSE; + static bool gave_warning_message = false; undef->type = bfd_link_hash_defined; undef->u.def.value = sym->u.def.value; @@ -1115,7 +1115,7 @@ change_undef (struct bfd_link_hash_entry * undef, { einfo (_("Use --enable-stdcall-fixup to disable these warnings\n")); einfo (_("Use --disable-stdcall-fixup to disable these fixups\n")); - gave_warning_message = TRUE; + gave_warning_message = true; } } @@ -1153,7 +1153,7 @@ pe_fixup_stdcalls (void) *cname = '_'; if (at) * strchr (cname, '@') = 0; - sym = bfd_link_hash_lookup (link_info.hash, cname, FALSE, FALSE, TRUE); + sym = bfd_link_hash_lookup (link_info.hash, cname, false, false, true); if (sym && sym->type == bfd_link_hash_defined) change_undef (undef, sym); @@ -1190,12 +1190,12 @@ make_import_fixup (arelent *rel, asection *s, char *name, const char *symname) pe_create_import_fixup (rel, s, _addend, name, symname); } -static bfd_boolean +static bool pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED) { printf ("+%s\n", h->string); - return TRUE; + return true; } #endif /* DLL_SUPPORT */ @@ -1207,7 +1207,7 @@ debug_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj) *found = 1; } -static bfd_boolean +static bool pecoff_checksum_contents (bfd *abfd, void (*process) (const void *, size_t, void *), void *arg) @@ -1232,10 +1232,10 @@ pecoff_checksum_contents (bfd *abfd, filepos += 1; } - return TRUE; + return true; } -static bfd_boolean +static bool write_build_id (bfd *abfd) { struct pe_tdata *t = pe_data (abfd); @@ -1270,7 +1270,7 @@ write_build_id (bfd *abfd) { einfo (_("%P: warning: .buildid section discarded," " --build-id ignored\n")); - return TRUE; + return true; } if (t->build_id.sec->contents == NULL) @@ -1329,11 +1329,11 @@ write_build_id (bfd *abfd) pe_data (link_info.output_bfd)->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size = sizeof (struct external_IMAGE_DEBUG_DIRECTORY); - return TRUE; + return true; } /* Make .buildid section, and set up coff_tdata->build_id. */ -static bfd_boolean +static bool setup_build_id (bfd *ibfd) { asection *s; @@ -1342,7 +1342,7 @@ setup_build_id (bfd *ibfd) if (!validate_build_id_style (emit_build_id)) { einfo (_("%P: warning: unrecognized --build-id style ignored\n")); - return FALSE; + return false; } flags = (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY @@ -1362,12 +1362,12 @@ setup_build_id (bfd *ibfd) s->size = sizeof (struct external_IMAGE_DEBUG_DIRECTORY) + sizeof (CV_INFO_PDB70) + 1; - return TRUE; + return true; } einfo (_("%P: warning: cannot create .buildid section," " --build-id ignored\n")); - return FALSE; + return false; } static void @@ -1582,7 +1582,7 @@ gld_${EMULATION_NAME}_after_open (void) /* 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) @@ -1774,7 +1774,7 @@ gld_${EMULATION_NAME}_after_open (void) the stub. */ blhe = bfd_link_hash_lookup (link_info.hash, symbols[src_count]->name, - FALSE, FALSE, TRUE); + false, false, true); /* If the symbol in the stub section has no other undefined references, exclude the stub section from the final link. */ @@ -1837,7 +1837,7 @@ saw_option (char *option) } #endif /* DLL_SUPPORT */ -static bfd_boolean +static bool gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT @@ -1868,7 +1868,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB sprintf (buf, "%s%s", U (""), 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 (_("%F%P: bfd_link_hash_lookup failed: %E\n")); if (h->type == bfd_link_hash_new) @@ -1894,7 +1894,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB if (image_base_statement) image_base_statement->exp = exp_assign ("__image_base__", exp_intop (pe.ImageBase), - FALSE); + false); } if (pe_def_file->stack_reserve != -1 @@ -1911,14 +1911,14 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB if (pe_def_file->heap_commit != -1) pe.SizeOfHeapCommit = pe_def_file->heap_commit; } - return TRUE; + return true; } } #endif - return FALSE; + return false; } -static bfd_boolean +static bool gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT @@ -1937,7 +1937,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT if (pe_bfd_is_dll (entry->the_bfd)) return pe_implied_import_dll (entry->filename); #endif - return FALSE; + return false; } static void @@ -1949,7 +1949,7 @@ gld_${EMULATION_NAME}_finish (void) if (thumb_entry_symbol != NULL) { 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 @@ -2239,7 +2239,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, return os; } -static bfd_boolean +static bool gld_${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search, @@ -2248,34 +2248,34 @@ gld_${EMULATION_NAME}_open_dynamic_archive static const struct { const char * format; - bfd_boolean use_prefix; + bool use_prefix; } libname_fmt [] = { /* Preferred explicit import library for dll's. */ - { "lib%s.dll.a", FALSE }, + { "lib%s.dll.a", false }, /* Alternate explicit import library for dll's. */ - { "%s.dll.a", FALSE }, + { "%s.dll.a", false }, /* "libfoo.a" could be either an import lib or a static lib. For backwards compatibility, libfoo.a needs to precede libfoo.dll and foo.dll in the search. */ - { "lib%s.a", FALSE }, + { "lib%s.a", false }, /* The 'native' spelling of an import lib name is "foo.lib". */ - { "%s.lib", FALSE }, + { "%s.lib", false }, /* PR 22948 - Check for an import library. */ - { "lib%s.lib", FALSE }, + { "lib%s.lib", false }, #ifdef DLL_SUPPORT /* Try "<prefix>foo.dll" (preferred dll name, if specified). */ - { "%s%s.dll", TRUE }, + { "%s%s.dll", true }, #endif /* Try "libfoo.dll" (default preferred dll name). */ - { "lib%s.dll", FALSE }, + { "lib%s.dll", false }, /* Finally try 'native' dll name "foo.dll". */ - { "%s.dll", FALSE }, + { "%s.dll", false }, /* Note: If adding more formats to this table, make sure to check to see if their length is longer than libname_fmt[0].format, and if so, update the call to xmalloc() below. */ - { NULL, FALSE } + { NULL, false } }; static unsigned int format_max_len = 0; const char * filename; @@ -2285,7 +2285,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive if (! entry->flags.maybe_archive || entry->flags.full_name_provided) - return FALSE; + return false; filename = entry->filename; @@ -2337,12 +2337,12 @@ gld_${EMULATION_NAME}_open_dynamic_archive if (!libname_fmt[i].format) { free (full_string); - return FALSE; + return false; } entry->filename = full_string; - return TRUE; + return true; } static int diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 5f539cb..c6fd8b8 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -152,7 +152,7 @@ static flagword real_flags = IMAGE_FILE_LARGE_ADDRESS_AWARE; static int support_old_code = 0; static lang_assignment_statement_type *image_base_statement = 0; static unsigned short pe_dll_characteristics = DEFAULT_DLL_CHARACTERISTICS; -static bfd_boolean insert_timestamp = TRUE; +static bool insert_timestamp = true; static const char *emit_build_id; #ifdef DLL_SUPPORT @@ -186,7 +186,7 @@ gld_${EMULATION_NAME}_before_parse (void) ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); output_filename = "${EXECUTABLE_NAME:-a.exe}"; #ifdef DLL_SUPPORT - input_flags.dynamic = TRUE; + input_flags.dynamic = true; config.has_shared = 1; link_info.pei386_auto_import = 1; link_info.pei386_runtime_pseudo_reloc = 2; /* Use by default version 2. */ @@ -372,7 +372,7 @@ typedef struct /* FALSE for an assembly level symbol and TRUE for a C visible symbol. C visible symbols can be prefixed by underscore dependent on target's settings. */ - bfd_boolean is_c_symbol; + bool is_c_symbol; } definfo; #define GET_INIT_SYMBOL_NAME(IDX) \ @@ -389,27 +389,27 @@ static definfo init[] = { /* imagebase must be first */ #define IMAGEBASEOFF 0 - D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE, FALSE), + D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE, false), #define DLLOFF 1 - {&dll, sizeof(dll), 0, "__dll__", 0, FALSE}, + {&dll, sizeof(dll), 0, "__dll__", 0, false}, #define MSIMAGEBASEOFF 2 - D(ImageBase, "___ImageBase", NT_EXE_IMAGE_BASE, TRUE), - D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT, FALSE), - D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT, FALSE), - D(MajorOperatingSystemVersion,"__major_os_version__", 4, FALSE), - D(MinorOperatingSystemVersion,"__minor_os_version__", 0, FALSE), - D(MajorImageVersion,"__major_image_version__", 0, FALSE), - D(MinorImageVersion,"__minor_image_version__", 0, FALSE), - D(MajorSubsystemVersion,"__major_subsystem_version__", 5, FALSE), - D(MinorSubsystemVersion,"__minor_subsystem_version__", 2, FALSE), - D(Subsystem,"__subsystem__", ${SUBSYSTEM}, FALSE), - D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000, FALSE), - D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000, FALSE), - D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000, FALSE), - D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000, FALSE), - D(LoaderFlags,"__loader_flags__", 0x0, FALSE), - D(DllCharacteristics, "__dll_characteristics__", DEFAULT_DLL_CHARACTERISTICS, FALSE), - { NULL, 0, 0, NULL, 0, FALSE} + D(ImageBase, "___ImageBase", NT_EXE_IMAGE_BASE, true), + D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT, false), + D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT, false), + D(MajorOperatingSystemVersion,"__major_os_version__", 4, false), + D(MinorOperatingSystemVersion,"__minor_os_version__", 0, false), + D(MajorImageVersion,"__major_image_version__", 0, false), + D(MinorImageVersion,"__minor_image_version__", 0, false), + D(MajorSubsystemVersion,"__major_subsystem_version__", 5, false), + D(MinorSubsystemVersion,"__minor_subsystem_version__", 2, false), + D(Subsystem,"__subsystem__", ${SUBSYSTEM}, false), + D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000, false), + D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000, false), + D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000, false), + D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000, false), + D(LoaderFlags,"__loader_flags__", 0x0, false), + D(DllCharacteristics, "__dll_characteristics__", DEFAULT_DLL_CHARACTERISTICS, false), + { NULL, 0, 0, NULL, 0, false} }; @@ -679,14 +679,14 @@ set_pep_stack_heap (char *resname, char *comname) #define DEFAULT_BUILD_ID_STYLE "md5" -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { is_underscoring (); switch (optc) { default: - return FALSE; + return false; case OPTION_BASE_FILE: link_info.base_file = fopen (optarg, FOPEN_WB); @@ -738,7 +738,7 @@ gld${EMULATION_NAME}_handle_option (int optc) support_old_code = 1; break; case OPTION_USE_NUL_PREFIXED_IMPORT_TABLES: - pep_use_nul_prefixed_import_tables = TRUE; + pep_use_nul_prefixed_import_tables = true; break; case OPTION_NO_LEADING_UNDERSCORE: pep_leading_underscore = 0; @@ -747,10 +747,10 @@ gld${EMULATION_NAME}_handle_option (int optc) pep_leading_underscore = 1; break; case OPTION_INSERT_TIMESTAMP: - insert_timestamp = TRUE; + insert_timestamp = true; break; case OPTION_NO_INSERT_TIMESTAMP: - insert_timestamp = FALSE; + insert_timestamp = false; break; #ifdef DLL_SUPPORT case OPTION_OUT_DEF: @@ -900,7 +900,7 @@ gld${EMULATION_NAME}_handle_option (int optc) /* Set DLLCharacteristics bits */ set_pep_name ("__dll_characteristics__", pe_dll_characteristics); - return TRUE; + return true; } @@ -982,7 +982,7 @@ gld_${EMULATION_NAME}_set_symbols (void) lang_assignment_statement_type *rv; rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j), - exp_intop (val), FALSE)); + exp_intop (val), false)); if (init[j].size == sizeof (short)) *(short *) init[j].ptr = (short) val; else if (init[j].size == sizeof (int)) @@ -1025,7 +1025,7 @@ gld_${EMULATION_NAME}_after_parse (void) #ifdef DLL_SUPPORT static struct bfd_link_hash_entry *pep_undef_found_sym; -static bfd_boolean +static bool pep_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf) { int sl; @@ -1040,9 +1040,9 @@ pep_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf) && h->root.string[sl] == '@') { pep_undef_found_sym = h; - return FALSE; + return false; } - return TRUE; + return true; } static void @@ -1181,12 +1181,12 @@ make_import_fixup (arelent *rel, asection *s, char *name, const char *symname) pep_create_import_fixup (rel, s, _addend, name, symname); } -static bfd_boolean +static bool pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED) { printf ("+%s\n", h->string); - return TRUE; + return true; } #endif /* DLL_SUPPORT */ @@ -1199,7 +1199,7 @@ debug_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj) *found = 1; } -static bfd_boolean +static bool pecoff_checksum_contents (bfd *abfd, void (*process) (const void *, size_t, void *), void *arg) @@ -1224,10 +1224,10 @@ pecoff_checksum_contents (bfd *abfd, filepos += 1; } - return TRUE; + return true; } -static bfd_boolean +static bool write_build_id (bfd *abfd) { struct pe_tdata *t = pe_data (abfd); @@ -1262,7 +1262,7 @@ write_build_id (bfd *abfd) { einfo (_("%P: warning: .buildid section discarded," " --build-id ignored\n")); - return TRUE; + return true; } if (t->build_id.sec->contents == NULL) @@ -1321,11 +1321,11 @@ write_build_id (bfd *abfd) pe_data (link_info.output_bfd)->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size = sizeof (struct external_IMAGE_DEBUG_DIRECTORY); - return TRUE; + return true; } /* Make .buildid section, and set up coff_tdata->build_id. */ -static bfd_boolean +static bool setup_build_id (bfd *ibfd) { asection *s; @@ -1334,7 +1334,7 @@ setup_build_id (bfd *ibfd) if (!validate_build_id_style (emit_build_id)) { einfo (_("%P: warning: unrecognized --build-id style ignored\n")); - return FALSE; + return false; } flags = (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY @@ -1354,12 +1354,12 @@ setup_build_id (bfd *ibfd) s->size = sizeof (struct external_IMAGE_DEBUG_DIRECTORY) + sizeof (CV_INFO_PDB70) + 1; - return TRUE; + return true; } einfo (_("%P: warning: cannot create .buildid section," " --build-id ignored\n")); - return FALSE; + return false; } static void @@ -1554,7 +1554,7 @@ gld_${EMULATION_NAME}_after_open (void) /* 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) @@ -1715,7 +1715,7 @@ saw_option (char *option) } #endif /* DLL_SUPPORT */ -static bfd_boolean +static bool gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT @@ -1746,7 +1746,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB sprintf (buf, "%s%s", U (""), pep_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 (_("%F%P: bfd_link_hash_lookup failed: %E\n")); if (h->type == bfd_link_hash_new) @@ -1772,7 +1772,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB if (image_base_statement) image_base_statement->exp = exp_assign ("__image_base__", exp_intop (pep.ImageBase), - FALSE); + false); } if (pep_def_file->stack_reserve != -1 @@ -1789,14 +1789,14 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB if (pep_def_file->heap_commit != -1) pep.SizeOfHeapCommit = pep_def_file->heap_commit; } - return TRUE; + return true; } } #endif - return FALSE; + return false; } -static bfd_boolean +static bool gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { is_underscoring (); @@ -1807,7 +1807,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT if (pep_bfd_is_dll (entry->the_bfd)) return pep_implied_import_dll (entry->filename); #endif - return FALSE; + return false; } static void @@ -2059,7 +2059,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, return os; } -static bfd_boolean +static bool gld_${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search, @@ -2068,34 +2068,34 @@ gld_${EMULATION_NAME}_open_dynamic_archive static const struct { const char * format; - bfd_boolean use_prefix; + bool use_prefix; } libname_fmt [] = { /* Preferred explicit import library for dll's. */ - { "lib%s.dll.a", FALSE }, + { "lib%s.dll.a", false }, /* Alternate explicit import library for dll's. */ - { "%s.dll.a", FALSE }, + { "%s.dll.a", false }, /* "libfoo.a" could be either an import lib or a static lib. For backwards compatibility, libfoo.a needs to precede libfoo.dll and foo.dll in the search. */ - { "lib%s.a", FALSE }, + { "lib%s.a", false }, /* The 'native' spelling of an import lib name is "foo.lib". */ - { "%s.lib", FALSE }, + { "%s.lib", false }, /* PR 22948 - Check for an import library. */ - { "lib%s.lib", FALSE }, + { "lib%s.lib", false }, #ifdef DLL_SUPPORT /* Try "<prefix>foo.dll" (preferred dll name, if specified). */ - { "%s%s.dll", TRUE }, + { "%s%s.dll", true }, #endif /* Try "libfoo.dll" (default preferred dll name). */ - { "lib%s.dll", FALSE }, + { "lib%s.dll", false }, /* Finally try 'native' dll name "foo.dll". */ - { "%s.dll", FALSE }, + { "%s.dll", false }, /* Note: If adding more formats to this table, make sure to check to see if their length is longer than libname_fmt[0].format, and if so, update the call to xmalloc() below. */ - { NULL, FALSE } + { NULL, false } }; static unsigned int format_max_len = 0; const char * filename; @@ -2105,7 +2105,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive if (! entry->flags.maybe_archive || entry->flags.full_name_provided) - return FALSE; + return false; filename = entry->filename; @@ -2157,12 +2157,12 @@ gld_${EMULATION_NAME}_open_dynamic_archive if (!libname_fmt[i].format) { free (full_string); - return FALSE; + return false; } entry->filename = full_string; - return TRUE; + return true; } static int diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em index 003bc99..c8d39d8 100644 --- a/ld/emultempl/ppc32elf.em +++ b/ld/emultempl/ppc32elf.em @@ -125,7 +125,7 @@ prelim_size_sections (void) { expld.phase = lang_mark_phase_enum; expld.dataseg.phase = exp_seg_none; - one_lang_size_sections_pass (NULL, FALSE); + one_lang_size_sections_pass (NULL, false); /* We must not cache anything from the preliminary sizing. */ lang_reset_memory_regions (); } @@ -246,13 +246,13 @@ EOF if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then fragment <<EOF /* Special handling for embedded SPU executables. */ -extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *); +extern bool embedded_spu_file (lang_input_statement_type *, const char *); -static bfd_boolean +static bool ppc_recognized_file (lang_input_statement_type *entry) { if (embedded_spu_file (entry, "-m32")) - return TRUE; + return true; return ldelf_load_symbols (entry); } @@ -408,7 +408,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}' case OPTION_TRADITIONAL_FORMAT: notlsopt = 1; params.no_tls_get_addr_opt = 1; - return FALSE; + return false; case OPTION_PPC476_WORKAROUND: params.ppc476_workaround = 1; diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 8253604..5b07a04 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -272,7 +272,7 @@ prelim_size_sections (void) { expld.phase = lang_mark_phase_enum; expld.dataseg.phase = exp_seg_none; - one_lang_size_sections_pass (NULL, FALSE); + one_lang_size_sections_pass (NULL, false); /* We must not cache anything from the preliminary sizing. */ lang_reset_memory_regions (); } @@ -347,11 +347,11 @@ struct hook_stub_info /* Traverse the linker tree to find the spot where the stub goes. */ -static bfd_boolean +static bool hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) { lang_statement_union_type *l; - bfd_boolean ret; + bool ret; for (; (l = *lp) != NULL; lp = &l->header.next) { @@ -389,7 +389,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) before its associated input section. */ *lp = info->add.head; *(info->add.tail) = l; - return TRUE; + return true; } break; @@ -410,7 +410,7 @@ hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp) break; } } - return FALSE; + return false; } @@ -467,7 +467,7 @@ ppc_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - ldelf_map_segments (TRUE); + ldelf_map_segments (true); if (!bfd_link_relocatable (&link_info)) ppc64_elf_set_toc (&link_info, link_info.output_bfd); @@ -667,13 +667,13 @@ EOF if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then fragment <<EOF /* Special handling for embedded SPU executables. */ -extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *); +extern bool embedded_spu_file (lang_input_statement_type *, const char *); -static bfd_boolean +static bool ppc64_recognized_file (lang_input_statement_type *entry) { if (embedded_spu_file (entry, "-m64")) - return TRUE; + return true; return ldelf_load_symbols (entry); } @@ -1007,7 +1007,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}' no_toc_sort = 1; params.plt_static_chain = 1; params.no_pcrel_opt = 1; - return FALSE; + return false; ' # Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation diff --git a/ld/emultempl/rxelf.em b/ld/emultempl/rxelf.em index 2540b93..3be9c6d 100644 --- a/ld/emultempl/rxelf.em +++ b/ld/emultempl/rxelf.em @@ -27,15 +27,15 @@ fragment <<EOF #include "elf32-rx.h" -static bfd_boolean no_flag_mismatch_warnings = TRUE; -static bfd_boolean ignore_lma = TRUE; +static bool no_flag_mismatch_warnings = true; +static bool ignore_lma = true; /* This is a convenient point to tell BFD about target specific flags. After the output has been created, but before inputs are read. */ static void rx_elf_create_output_section_statements (void) { - extern void bfd_elf32_rx_set_target_flags (bfd_boolean, bfd_boolean); + extern void bfd_elf32_rx_set_target_flags (bool, bool); bfd_elf32_rx_set_target_flags (no_flag_mismatch_warnings, ignore_lma); } @@ -71,19 +71,19 @@ PARSE_AND_LIST_OPTIONS=' PARSE_AND_LIST_ARGS_CASES=' case OPTION_NO_FLAG_MISMATCH_WARNINGS: - no_flag_mismatch_warnings = TRUE; + no_flag_mismatch_warnings = true; break; case OPTION_FLAG_MISMATCH_WARNINGS: - no_flag_mismatch_warnings = FALSE; + no_flag_mismatch_warnings = false; break; case OPTION_IGNORE_LMA: - ignore_lma = TRUE; + ignore_lma = true; break; case OPTION_NO_IGNORE_LMA: - ignore_lma = FALSE; + ignore_lma = false; break; ' diff --git a/ld/emultempl/rxlinux.em b/ld/emultempl/rxlinux.em index cf800a6..d3a1c61 100644 --- a/ld/emultempl/rxlinux.em +++ b/ld/emultempl/rxlinux.em @@ -32,9 +32,9 @@ fragment <<EOF static void rx_linux_create_output_section_statements (void) { - extern void bfd_elf32_rx_set_target_flags (bfd_boolean, bfd_boolean); + extern void bfd_elf32_rx_set_target_flags (bool, bool); - bfd_elf32_rx_set_target_flags (FALSE, FALSE); + bfd_elf32_rx_set_target_flags (false, false); } EOF diff --git a/ld/emultempl/scoreelf.em b/ld/emultempl/scoreelf.em index 0efb3f1..9aea76a 100644 --- a/ld/emultempl/scoreelf.em +++ b/ld/emultempl/scoreelf.em @@ -36,10 +36,10 @@ gld${EMULATION_NAME}_before_parse (void) #ifndef TARGET_ /* I.e., if not generic. */ ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); #endif /* not TARGET_ */ - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - link_info.check_relocs_after_open_input = TRUE; + input_flags.dynamic = ${DYNAMIC_LINK-true}; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; + link_info.check_relocs_after_open_input = true; EOF if test -n "$COMMONPAGESIZE"; then fragment <<EOF diff --git a/ld/emultempl/solaris2.em b/ld/emultempl/solaris2.em index 396f34a..9fb739c 100644 --- a/ld/emultempl/solaris2.em +++ b/ld/emultempl/solaris2.em @@ -72,7 +72,7 @@ elf_solaris2_before_allocation (void) /* Lookup symbol. */ h = elf_link_hash_lookup (elf_hash_table (&link_info), *sym, - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) continue; @@ -90,7 +90,7 @@ elf_solaris2_before_allocation (void) /* Lookup symbol. */ h = elf_link_hash_lookup (elf_hash_table (&link_info), *sym, - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) continue; @@ -115,8 +115,8 @@ elf_solaris2_before_allocation (void) { /* Create a version pattern for this symbol. Some of them start off as local, others as global, so try both. */ - globals = lang_new_vers_pattern (globals, *sym, NULL, TRUE); - locals = lang_new_vers_pattern (locals, *sym, NULL, TRUE); + globals = lang_new_vers_pattern (globals, *sym, NULL, true); + locals = lang_new_vers_pattern (locals, *sym, NULL, true); } /* New version node for those symbols. */ diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index 0c51b8e..b4cdc4b 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -165,7 +165,7 @@ spu_place_special_section (asection *s, asection *o, const char *output_name) push_stat_ptr (&os->children); e_size = exp_intop (params.line_size - s->size); - lang_add_assignment (exp_assign (".", e_size, FALSE)); + lang_add_assignment (exp_assign (".", e_size, false)); pop_stat_ptr (); } lang_add_section (&os->children, s, NULL, NULL, os); @@ -192,7 +192,7 @@ spu_elf_load_ovl_mgr (void) mgr_stream = &icache_mgr_stream; } h = elf_link_hash_lookup (elf_hash_table (&link_info), - ovly_mgr_entry, FALSE, FALSE, FALSE); + ovly_mgr_entry, false, false, false); if (h != NULL && (h->root.type == bfd_link_hash_defined @@ -273,7 +273,7 @@ spu_before_allocation (void) rough layout so that overlays can be found. */ expld.phase = lang_mark_phase_enum; expld.dataseg.phase = exp_seg_none; - one_lang_size_sections_pass (NULL, TRUE); + one_lang_size_sections_pass (NULL, true); /* Find overlays by inspecting section vmas. */ ret = spu_elf_find_overlays (&link_info); @@ -476,9 +476,9 @@ base_name (const char *path) /* This function is called when building a ppc32 or ppc64 executable to handle embedded spu images. */ -extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *); +extern bool embedded_spu_file (lang_input_statement_type *, const char *); -bfd_boolean +bool embedded_spu_file (lang_input_statement_type *entry, const char *flags) { const char *cmd[6]; @@ -497,7 +497,7 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags) || strcmp (entry->the_bfd->xvec->name, "elf32-spu") != 0 || (entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_EXEC && entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_DYN)) - return FALSE; + return false; /* Use the filename as the symbol marking the program handle struct. */ sym = base_name (bfd_get_filename (entry->the_bfd)); @@ -509,7 +509,7 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags) fd = new_tmp_file (&oname); if (fd == -1) - return FALSE; + return false; close (fd); for (search = (void *) input_file_chain.head; @@ -557,13 +557,13 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags) } } if (status) - return FALSE; + return false; old_stat_tail = stat_ptr->tail; old_file_tail = input_file_chain.tail; if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL) - return FALSE; + return false; /* lang_add_input_file puts the new list entry at the end of the statement and input file lists. Move it to just after the current entry. */ @@ -579,8 +579,8 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags) /* Ensure bfd sections are excluded from the output. */ bfd_section_list_clear (entry->the_bfd); - entry->flags.loaded = TRUE; - return TRUE; + entry->flags.loaded = true; + return true; } EOF diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em index 030ed92..5df4116 100644 --- a/ld/emultempl/ticoff.em +++ b/ld/emultempl/ticoff.em @@ -69,13 +69,13 @@ gld_${EMULATION_NAME}_list_options (FILE * file) fprintf (file, _(" --format 0|1|2 Specify which COFF version to use\n")); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_COFF_FORMAT: if ((*optarg == '0' || *optarg == '1' || *optarg == '2') @@ -92,7 +92,7 @@ gld${EMULATION_NAME}_handle_option (int optc) } break; } - return FALSE; + return false; } static void diff --git a/ld/emultempl/v850elf.em b/ld/emultempl/v850elf.em index 32618d9..6735999 100644 --- a/ld/emultempl/v850elf.em +++ b/ld/emultempl/v850elf.em @@ -26,7 +26,7 @@ fragment <<EOF #include "ldctor.h" #include "elf32-v850.h" -static bfd_boolean +static bool is_v850_target (void) { extern const bfd_target v850_elf32_vec; diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em index 4c86962..243064f 100644 --- a/ld/emultempl/vms.em +++ b/ld/emultempl/vms.em @@ -28,11 +28,11 @@ static void gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); - input_flags.dynamic = TRUE; - config.has_shared = FALSE; /* Not yet. */ + input_flags.dynamic = true; + config.has_shared = false; /* Not yet. */ /* For ia64, harmless for alpha. */ - link_info.emit_hash = FALSE; + link_info.emit_hash = false; link_info.spare_dynamic_tags = 0; } @@ -50,7 +50,7 @@ gld${EMULATION_NAME}_create_output_section_statements (void) /* Try to open a dynamic archive. This is where we know that VMS shared images (dynamic libraries) have an extension of .exe. */ -static bfd_boolean +static bool gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search, lang_input_statement_type *entry) @@ -58,7 +58,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, char *string; if (! entry->flags.maybe_archive || entry->flags.full_name_provided) - return FALSE; + return false; string = (char *) xmalloc (strlen (search->name) + strlen (entry->filename) @@ -69,12 +69,12 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, if (! ldfile_try_open_bfd (string, entry)) { free (string); - return FALSE; + return false; } entry->filename = string; - return TRUE; + return true; } static int @@ -152,20 +152,20 @@ gld${EMULATION_NAME}_list_options (FILE *file) fprintf (file, _(" --identification <string> Set the identification of the output\n")); } -static bfd_boolean +static bool gld${EMULATION_NAME}_handle_option (int optc) { switch (optc) { default: - return FALSE; + return false; case OPTION_IDENTIFICATION: /* Currently ignored. */ break; } - return TRUE; + return true; } EOF diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em index 2b0fa5a..23ce9a3 100644 --- a/ld/emultempl/xtensaelf.em +++ b/ld/emultempl/xtensaelf.em @@ -52,8 +52,8 @@ static void xtensa_strip_inconsistent_linkonce_sections static bfd_vma xtensa_page_power = 12; /* 4K pages. */ /* To force a page break between literals and text, change - xtensa_use_literal_pages to "TRUE". */ -static bfd_boolean xtensa_use_literal_pages = FALSE; + xtensa_use_literal_pages to "true". */ +static bool xtensa_use_literal_pages = false; #define EXTRA_VALIDATION 0 @@ -96,7 +96,7 @@ remove_section (bfd *abfd, asection *os) } -static bfd_boolean +static bool replace_insn_sec_with_prop_sec (bfd *abfd, const char *insn_sec_name, const char *prop_sec_name, @@ -115,14 +115,14 @@ replace_insn_sec_with_prop_sec (bfd *abfd, *error_message = ""; insn_sec = bfd_get_section_by_name (abfd, insn_sec_name); if (insn_sec == NULL) - return TRUE; + return true; entry_count = insn_sec->size / 8; prop_sec = bfd_get_section_by_name (abfd, prop_sec_name); if (prop_sec != NULL && insn_sec != NULL) { *error_message = _("file already has property tables"); - return FALSE; + return false; } if (insn_sec->size != 0) @@ -173,7 +173,7 @@ replace_insn_sec_with_prop_sec (bfd *abfd, elf_section_data (insn_sec)->relocs = NULL; internal_relocs = - _bfd_elf_link_read_relocs (abfd, insn_sec, NULL, NULL, FALSE); + _bfd_elf_link_read_relocs (abfd, insn_sec, NULL, NULL, false); elf_section_data (insn_sec)->relocs = saved_relocs; if (internal_relocs == NULL) @@ -230,7 +230,7 @@ replace_insn_sec_with_prop_sec (bfd *abfd, free (insn_contents); - return TRUE; + return true; cleanup: if (prop_sec && prop_sec->owner) @@ -238,7 +238,7 @@ replace_insn_sec_with_prop_sec (bfd *abfd, free (insn_contents); free (internal_relocs); - return FALSE; + return false; } @@ -312,15 +312,15 @@ elf_xtensa_after_open (void) } -static bfd_boolean +static bool xt_config_info_unpack_and_check (char *data, - bfd_boolean *pmismatch, + bool *pmismatch, char **pmsg) { char *d, *key; int num; - *pmismatch = FALSE; + *pmismatch = false; d = data; while (*d) @@ -359,7 +359,7 @@ xt_config_info_unpack_and_check (char *data, } else if (num != elf32xtensa_abi) { - *pmismatch = TRUE; + *pmismatch = true; *pmsg = "ABI does not match"; } } @@ -367,7 +367,7 @@ xt_config_info_unpack_and_check (char *data, { if (num != XSHAL_USE_ABSOLUTE_LITERALS) { - *pmismatch = TRUE; + *pmismatch = true; *pmsg = "incompatible use of the Extended L32R option"; } } @@ -377,10 +377,10 @@ xt_config_info_unpack_and_check (char *data, goto error; } - return TRUE; + return true; error: - return FALSE; + return false; } @@ -392,7 +392,7 @@ static void check_xtensa_info (bfd *abfd, asection *info_sec) { char *data, *errmsg = ""; - bfd_boolean mismatch; + bool mismatch; data = xmalloc (info_sec->size); if (! bfd_get_section_contents (abfd, info_sec, data, 0, info_sec->size)) @@ -425,7 +425,7 @@ elf_xtensa_before_allocation (void) { asection *info_sec, *first_info_sec; bfd *first_bfd; - bfd_boolean is_big_endian = XCHAL_HAVE_BE; + bool is_big_endian = XCHAL_HAVE_BE; /* Check that the output endianness matches the Xtensa configuration. The BFD library always includes both big and @@ -565,7 +565,7 @@ struct reloc_deps_section_t { reloc_deps_e *preds; reloc_deps_e *succs; - bfd_boolean is_only_literal; + bool is_only_literal; }; @@ -585,16 +585,16 @@ typedef void (*deps_callback_t) (asection *, /* src_sec */ bfd_vma, /* target_offset */ void *); /* closure */ -extern bfd_boolean xtensa_callback_required_dependence +extern bool xtensa_callback_required_dependence (bfd *, asection *, struct bfd_link_info *, deps_callback_t, void *); static void xtensa_ldlang_clear_addresses (lang_statement_union_type *); -static bfd_boolean ld_local_file_relocations_fit +static bool ld_local_file_relocations_fit (lang_statement_union_type *, const reloc_deps_graph *); static bfd_vma ld_assign_relative_paged_dot (bfd_vma, lang_statement_union_type *, const reloc_deps_graph *, - bfd_boolean); + bool); static bfd_vma ld_xtensa_insert_page_offsets - (bfd_vma, lang_statement_union_type *, reloc_deps_graph *, bfd_boolean); + (bfd_vma, lang_statement_union_type *, reloc_deps_graph *, bool); #if EXTRA_VALIDATION static size_t ld_count_children (lang_statement_union_type *); #endif @@ -691,7 +691,7 @@ free_reloc_deps_graph (reloc_deps_graph *deps) } -static bfd_boolean +static bool section_is_source (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, lang_statement_union_type *s) { @@ -699,7 +699,7 @@ section_is_source (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, const reloc_deps_section *sec_deps; if (s->header.type != lang_input_section_enum) - return FALSE; + return false; sec = s->input_section.section; sec_deps = xtensa_get_section_deps (deps, sec); @@ -707,7 +707,7 @@ section_is_source (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, } -static bfd_boolean +static bool section_is_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, lang_statement_union_type *s) { @@ -715,7 +715,7 @@ section_is_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, const reloc_deps_section *sec_deps; if (s->header.type != lang_input_section_enum) - return FALSE; + return false; sec = s->input_section.section; sec_deps = xtensa_get_section_deps (deps, sec); @@ -723,7 +723,7 @@ section_is_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, } -static bfd_boolean +static bool section_is_source_or_target (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, lang_statement_union_type *s) { @@ -802,14 +802,14 @@ ld_xtensa_move_section_after (xtensa_ld_iter *to, xtensa_ld_iter *current) /* Can only be called with lang_statements that have lists. Returns FALSE if the list is empty. */ -static bfd_boolean +static bool iter_stack_empty (xtensa_ld_iter_stack **stack_p) { return *stack_p == NULL; } -static bfd_boolean +static bool iter_stack_push (xtensa_ld_iter_stack **stack_p, lang_statement_union_type *parent) { @@ -829,12 +829,12 @@ iter_stack_push (xtensa_ld_iter_stack **stack_p, break; default: ASSERT (0); - return FALSE; + return false; } /* Empty. do not push. */ if (l->tail == &l->head) - return FALSE; + return false; stack = xmalloc (sizeof (xtensa_ld_iter_stack)); memset (stack, 0, sizeof (xtensa_ld_iter_stack)); @@ -847,7 +847,7 @@ iter_stack_push (xtensa_ld_iter_stack **stack_p, if (*stack_p != NULL) (*stack_p)->prev = stack; *stack_p = stack; - return TRUE; + return true; } @@ -968,7 +968,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, xtensa_ld_iter current; /* Location we are checking. */ xtensa_ld_iter *current_p = NULL; - bfd_boolean in_literals = FALSE; + bool in_literals = false; if (deps->count == 0) return; @@ -977,7 +977,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, while (!iter_stack_empty (stack_p)) { - bfd_boolean skip_increment = FALSE; + bool skip_increment = false; lang_statement_union_type *l = iter_stack_current (stack_p); switch (l->header.type) @@ -985,7 +985,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, case lang_assignment_statement_enum: /* Any assignment statement should block reordering across it. */ front_p = NULL; - in_literals = FALSE; + in_literals = false; break; case lang_input_section_enum: @@ -1001,7 +1001,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, } else { - bfd_boolean is_target; + bool is_target; current_p = ¤t; iter_stack_copy_current (stack_p, current_p); is_target = (section_is_target (deps, l) @@ -1011,7 +1011,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, { iter_stack_copy_current (stack_p, front_p); if (!is_target) - in_literals = FALSE; + in_literals = false; } else { @@ -1038,7 +1038,7 @@ xtensa_colocate_literals (reloc_deps_graph *deps, front_p->loc = &(*front_p->loc)->header.next; /* Do not increment the current pointer. */ - skip_increment = TRUE; + skip_increment = true; } } } @@ -1104,7 +1104,7 @@ xtensa_move_dependencies_to_front (reloc_deps_graph *deps, } -static bfd_boolean +static bool deps_has_sec_edge (const reloc_deps_graph *deps, asection *src, asection *tgt) { const reloc_deps_section *sec_deps; @@ -1112,7 +1112,7 @@ deps_has_sec_edge (const reloc_deps_graph *deps, asection *src, asection *tgt) sec_deps = xtensa_get_section_deps (deps, src); if (sec_deps == NULL) - return FALSE; + return false; for (sec_deps_e = sec_deps->succs; sec_deps_e != NULL; @@ -1120,26 +1120,26 @@ deps_has_sec_edge (const reloc_deps_graph *deps, asection *src, asection *tgt) { ASSERT (sec_deps_e->src == src); if (sec_deps_e->tgt == tgt) - return TRUE; + return true; } - return FALSE; + return false; } -static bfd_boolean +static bool deps_has_edge (const reloc_deps_graph *deps, lang_statement_union_type *src, lang_statement_union_type *tgt) { if (!section_is_source (deps, src)) - return FALSE; + return false; if (!section_is_target (deps, tgt)) - return FALSE; + return false; if (src->header.type != lang_input_section_enum) - return FALSE; + return false; if (tgt->header.type != lang_input_section_enum) - return FALSE; + return false; return deps_has_sec_edge (deps, src->input_section.section, tgt->input_section.section); @@ -1275,7 +1275,7 @@ ld_count_children (lang_statement_union_type *s) /* Check if a particular section is included in the link. This will only be true for one instance of a particular linkonce section. */ -static bfd_boolean input_section_found = FALSE; +static bool input_section_found = false; static asection *input_section_target = NULL; static void @@ -1283,13 +1283,13 @@ input_section_linked_worker (lang_statement_union_type *statement) { if ((statement->header.type == lang_input_section_enum && (statement->input_section.section == input_section_target))) - input_section_found = TRUE; + input_section_found = true; } -static bfd_boolean +static bool input_section_linked (asection *sec) { - input_section_found = FALSE; + input_section_found = false; input_section_target = sec; lang_for_each_statement_worker (input_section_linked_worker, stat_ptr->head); return input_section_found; @@ -1306,7 +1306,7 @@ input_section_linked (asection *sec) static int linkonce_len = sizeof (".gnu.linkonce.") - 1; -static bfd_boolean +static bool is_inconsistent_linkonce_section (asection *sec) { bfd *abfd = sec->owner; @@ -1315,7 +1315,7 @@ is_inconsistent_linkonce_section (asection *sec) if ((bfd_section_flags (sec) & SEC_LINK_ONCE) == 0 || strncmp (sec_name, ".gnu.linkonce.", linkonce_len) != 0) - return FALSE; + return false; /* Check if this is an Xtensa property section or an exception table for Tensilica's XCC compiler. */ @@ -1342,12 +1342,12 @@ is_inconsistent_linkonce_section (asection *sec) if (dep_sec == NULL || ! input_section_linked (dep_sec)) { free (dep_sec_name); - return TRUE; + return true; } free (dep_sec_name); } - return FALSE; + return false; } @@ -1428,20 +1428,20 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement) size_t old_child_count; size_t new_child_count; #endif - bfd_boolean no_reorder; + bool no_reorder; w = &statement->wild_statement; - no_reorder = FALSE; + no_reorder = false; /* If it has 0 or 1 section bound, then do not reorder. */ if (w->children.head == NULL || (w->children.head->header.type == lang_input_section_enum && w->children.head->header.next == NULL)) - no_reorder = TRUE; + no_reorder = true; if (w->filenames_sorted) - no_reorder = TRUE; + no_reorder = true; /* Check for sorting in a section list wildcard spec as well. */ if (!no_reorder) @@ -1451,7 +1451,7 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement) { if (l->spec.sorted == by_name) { - no_reorder = TRUE; + no_reorder = true; break; } } @@ -1470,7 +1470,7 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement) && ((strcmp (".init", l->spec.name) == 0) || (strcmp (".fini", l->spec.name) == 0))) { - no_reorder = TRUE; + no_reorder = true; break; } } @@ -1533,9 +1533,9 @@ xtensa_layout_wild (const reloc_deps_graph *deps, lang_wild_statement_type *w) literal_wild.header.next = NULL; literal_wild.header.type = lang_wild_statement_enum; literal_wild.filename = NULL; - literal_wild.filenames_sorted = FALSE; + literal_wild.filenames_sorted = false; literal_wild.section_list = NULL; - literal_wild.keep_sections = FALSE; + literal_wild.keep_sections = false; literal_wild.children.head = NULL; literal_wild.children.tail = &literal_wild.children.head; @@ -1579,7 +1579,7 @@ xtensa_layout_wild (const reloc_deps_graph *deps, lang_wild_statement_type *w) while (literal_wild.children.head != NULL) { lang_statement_union_type *lit = literal_wild.children.head; - bfd_boolean placed = FALSE; + bool placed = false; #if EXTRA_VALIDATION ASSERT (ct2 > 0); @@ -1601,7 +1601,7 @@ xtensa_layout_wild (const reloc_deps_graph *deps, lang_wild_statement_type *w) /* Place it here. */ lit->header.next = *s_p; *s_p = lit; - placed = TRUE; + placed = true; break; } } @@ -1643,7 +1643,7 @@ xtensa_colocate_output_literals_callback (lang_statement_union_type *statement) size_t old_child_count; size_t new_child_count; #endif - bfd_boolean no_reorder = FALSE; + bool no_reorder = false; #if EXTRA_VALIDATION old_child_count = ld_count_children (statement); @@ -1709,7 +1709,7 @@ static bfd_vma ld_assign_relative_paged_dot (bfd_vma dot, lang_statement_union_type *s, const reloc_deps_graph *deps ATTRIBUTE_UNUSED, - bfd_boolean lit_align) + bool lit_align) { /* Walk through all of the input statements in this wild statement assign dot to all of them. */ @@ -1717,8 +1717,8 @@ ld_assign_relative_paged_dot (bfd_vma dot, xtensa_ld_iter_stack *stack = NULL; xtensa_ld_iter_stack **stack_p = &stack; - bfd_boolean first_section = FALSE; - bfd_boolean in_literals = FALSE; + bool first_section = false; + bool in_literals = false; for (iter_stack_create (stack_p, s); !iter_stack_empty (stack_p); @@ -1732,21 +1732,21 @@ ld_assign_relative_paged_dot (bfd_vma dot, { asection *section = l->input_section.section; size_t align_pow = section->alignment_power; - bfd_boolean do_xtensa_alignment = FALSE; + bool do_xtensa_alignment = false; if (lit_align) { - bfd_boolean sec_is_target = section_is_target (deps, l); - bfd_boolean sec_is_source = section_is_source (deps, l); + bool sec_is_target = section_is_target (deps, l); + bool sec_is_source = section_is_source (deps, l); if (section->size != 0 && (first_section || (in_literals && !sec_is_target) || (!in_literals && sec_is_target))) { - do_xtensa_alignment = TRUE; + do_xtensa_alignment = true; } - first_section = FALSE; + first_section = false; if (section->size != 0) in_literals = (sec_is_target && !sec_is_source); } @@ -1773,7 +1773,7 @@ ld_assign_relative_paged_dot (bfd_vma dot, } -static bfd_boolean +static bool ld_local_file_relocations_fit (lang_statement_union_type *statement, const reloc_deps_graph *deps ATTRIBUTE_UNUSED) { @@ -1831,17 +1831,17 @@ ld_local_file_relocations_fit (lang_statement_union_type *statement, fprintf (stderr, "Warning: " "l32r target section before l32r\n"); fflush (stderr); - return FALSE; + return false; } if (l32r_addr - target_addr > 256 * 1024 - align_penalty) - return FALSE; + return false; } } } } - return TRUE; + return true; } @@ -1849,16 +1849,16 @@ static bfd_vma ld_xtensa_insert_page_offsets (bfd_vma dot, lang_statement_union_type *s, reloc_deps_graph *deps, - bfd_boolean lit_align) + bool lit_align) { xtensa_ld_iter_stack *stack = NULL; xtensa_ld_iter_stack **stack_p = &stack; - bfd_boolean first_section = FALSE; - bfd_boolean in_literals = FALSE; + bool first_section = false; + bool in_literals = false; if (!lit_align) - return FALSE; + return false; for (iter_stack_create (stack_p, s); !iter_stack_empty (stack_p); @@ -1871,7 +1871,7 @@ ld_xtensa_insert_page_offsets (bfd_vma dot, case lang_input_section_enum: { asection *section = l->input_section.section; - bfd_boolean do_xtensa_alignment = FALSE; + bool do_xtensa_alignment = false; if (lit_align) { @@ -1880,9 +1880,9 @@ ld_xtensa_insert_page_offsets (bfd_vma dot, || (in_literals && !section_is_target (deps, l)) || (!in_literals && section_is_target (deps, l)))) { - do_xtensa_alignment = TRUE; + do_xtensa_alignment = true; } - first_section = FALSE; + first_section = false; if (section->size != 0) { in_literals = (section_is_target (deps, l) @@ -1897,7 +1897,7 @@ ld_xtensa_insert_page_offsets (bfd_vma dot, etree_type *name_op = exp_nameop (NAME, "."); etree_type *addend_op = exp_intop (1 << xtensa_page_power); etree_type *add_op = exp_binop ('+', name_op, addend_op); - etree_type *assign_op = exp_assign (".", add_op, FALSE); + etree_type *assign_op = exp_assign (".", add_op, false); lang_assignment_statement_type *assign_stmt; lang_statement_union_type *assign_union; diff --git a/ld/emultempl/z80.em b/ld/emultempl/z80.em index c112bdb..b72132e 100644 --- a/ld/emultempl/z80.em +++ b/ld/emultempl/z80.em @@ -46,7 +46,7 @@ z80_after_open (void) for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next) { const bfd_arch_info_type *info; - info = bfd_arch_get_compatible (link_info.output_bfd, abfd, FALSE); + info = bfd_arch_get_compatible (link_info.output_bfd, abfd, false); if (info == NULL) einfo (_("%F%P: %pB: Instruction sets of object files incompatible\n"), abfd); |