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/ldgram.y | |
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/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index 5912329..dd911f4 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -49,7 +49,7 @@ static enum section_type sectype; static lang_memory_region_type *region; -static bfd_boolean ldgram_had_keep = FALSE; +static bool ldgram_had_keep = false; static char *ldgram_vers_current_lang = NULL; #define ERROR_NAME_MAX 20 @@ -77,8 +77,8 @@ static int error_index; union etree_union *etree; struct phdr_info { - bfd_boolean filehdr; - bfd_boolean phdrs; + bool filehdr; + bool phdrs; union etree_union *at; union etree_union *flags; } phdr; @@ -252,7 +252,7 @@ mri_script_command: mri_script_lines END { ldlex_popstate (); } | START NAME - { lang_add_entry ($2, FALSE); } + { lang_add_entry ($2, false); } | ; @@ -289,11 +289,11 @@ extern_name_list: extern_name_list_body: NAME - { ldlang_add_undef ($1, FALSE); } + { ldlang_add_undef ($1, false); } | extern_name_list_body NAME - { ldlang_add_undef ($2, FALSE); } + { ldlang_add_undef ($2, false); } | extern_name_list_body ',' NAME - { ldlang_add_undef ($3, FALSE); } + { ldlang_add_undef ($3, false); } ; script_file: @@ -322,7 +322,7 @@ ifile_p1: | TARGET_K '(' NAME ')' { lang_add_target($3); } | SEARCH_DIR '(' filename ')' - { ldfile_add_library_path ($3, FALSE); } + { ldfile_add_library_path ($3, false); } | OUTPUT '(' filename ')' { lang_add_output($3, 1); } | OUTPUT_FORMAT '(' NAME ')' @@ -333,11 +333,11 @@ ifile_p1: | OUTPUT_ARCH '(' NAME ')' { ldfile_set_output_arch ($3, bfd_arch_unknown); } | FORCE_COMMON_ALLOCATION - { command_line.force_common_definition = TRUE ; } + { command_line.force_common_definition = true ; } | FORCE_GROUP_ALLOCATION - { command_line.force_group_allocation = TRUE ; } + { command_line.force_group_allocation = true ; } | INHIBIT_COMMON_ALLOCATION - { link_info.inhibit_common_definition = TRUE ; } + { link_info.inhibit_common_definition = true ; } | INPUT '(' input_list ')' | GROUP { lang_enter_group (); } @@ -394,17 +394,17 @@ input_list1: (char *)NULL); } | AS_NEEDED '(' { $<integer>$ = input_flags.add_DT_NEEDED_for_regular; - input_flags.add_DT_NEEDED_for_regular = TRUE; } + input_flags.add_DT_NEEDED_for_regular = true; } input_list1 ')' { input_flags.add_DT_NEEDED_for_regular = $<integer>3; } | input_list1 ',' AS_NEEDED '(' { $<integer>$ = input_flags.add_DT_NEEDED_for_regular; - input_flags.add_DT_NEEDED_for_regular = TRUE; } + input_flags.add_DT_NEEDED_for_regular = true; } input_list1 ')' { input_flags.add_DT_NEEDED_for_regular = $<integer>5; } | input_list1 AS_NEEDED '(' { $<integer>$ = input_flags.add_DT_NEEDED_for_regular; - input_flags.add_DT_NEEDED_for_regular = TRUE; } + input_flags.add_DT_NEEDED_for_regular = true; } input_list1 ')' { input_flags.add_DT_NEEDED_for_regular = $<integer>4; } ; @@ -421,7 +421,7 @@ sec_or_group_p1: statement_anywhere: ENTRY '(' NAME ')' - { lang_add_entry ($3, FALSE); } + { lang_add_entry ($3, false); } | assignment end | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' { ldlex_popstate (); @@ -534,7 +534,7 @@ sect_flag_list: NAME n->with = with_flags; n->name = $1; } - n->valid = FALSE; + n->valid = false; n->next = NULL; $$ = n; } @@ -552,7 +552,7 @@ sect_flag_list: NAME n->with = with_flags; n->name = $3; } - n->valid = FALSE; + n->valid = false; n->next = $1; $$ = n; } @@ -564,7 +564,7 @@ sect_flags: struct flag_info *n; n = ((struct flag_info *) xmalloc (sizeof *n)); n->flag_list = $3; - n->flags_initialized = FALSE; + n->flags_initialized = false; n->not_with_flags = 0; n->only_with_flags = 0; $$ = n; @@ -657,9 +657,9 @@ input_section_spec_no_keep: input_section_spec: input_section_spec_no_keep | KEEP '(' - { ldgram_had_keep = TRUE; } + { ldgram_had_keep = true; } input_section_spec_no_keep ')' - { ldgram_had_keep = FALSE; } + { ldgram_had_keep = false; } ; statement: @@ -676,7 +676,7 @@ statement: } | SORT_BY_NAME '(' CONSTRUCTORS ')' { - constructors_sorted = TRUE; + constructors_sorted = true; lang_add_attribute (lang_constructors_statement_enum); } | input_section_spec @@ -761,7 +761,7 @@ end: ';' | ',' assignment: NAME '=' mustbe_exp { - lang_add_assignment (exp_assign ($1, $3, FALSE)); + lang_add_assignment (exp_assign ($1, $3, false)); } | NAME assign_op mustbe_exp { @@ -769,19 +769,19 @@ assignment: exp_binop ($2, exp_nameop (NAME, $1), - $3), FALSE)); + $3), false)); } | HIDDEN '(' NAME '=' mustbe_exp ')' { - lang_add_assignment (exp_assign ($3, $5, TRUE)); + lang_add_assignment (exp_assign ($3, $5, true)); } | PROVIDE '(' NAME '=' mustbe_exp ')' { - lang_add_assignment (exp_provide ($3, $5, FALSE)); + lang_add_assignment (exp_provide ($3, $5, false)); } | PROVIDE_HIDDEN '(' NAME '=' mustbe_exp ')' { - lang_add_assignment (exp_provide ($3, $5, TRUE)); + lang_add_assignment (exp_provide ($3, $5, true)); } ; @@ -803,7 +803,7 @@ memory_spec_list: memory_spec: NAME - { region = lang_memory_region_lookup ($1, TRUE); } + { region = lang_memory_region_lookup ($1, true); } attributes_opt ':' origin_spec opt_comma length_spec {} @@ -875,9 +875,9 @@ low_level_library_NAME_list: floating_point_support: FLOAT - { lang_float(TRUE); } + { lang_float(true); } | NOFLOAT - { lang_float(FALSE); } + { lang_float(false); } ; nocrossref_list: @@ -1108,7 +1108,7 @@ section: NAME { ldlex_expression(); } opt_exp_with_type { ldlex_popstate (); - lang_add_assignment (exp_assign (".", $3, FALSE)); + lang_add_assignment (exp_assign (".", $3, false)); } '{' sec_or_group_p1 '}' | INCLUDE filename @@ -1173,7 +1173,7 @@ phdr_opt: n = ((struct lang_output_section_phdr_list *) xmalloc (sizeof *n)); n->name = $3; - n->used = FALSE; + n->used = false; n->next = $1; $$ = n; } @@ -1269,9 +1269,9 @@ phdr_qualifiers: { $$ = $3; if (strcmp ($1, "FILEHDR") == 0 && $2 == NULL) - $$.filehdr = TRUE; + $$.filehdr = true; else if (strcmp ($1, "PHDRS") == 0 && $2 == NULL) - $$.phdrs = TRUE; + $$.phdrs = true; else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL) $$.flags = $2; else @@ -1407,19 +1407,19 @@ vers_tag: vers_defns: VERS_IDENTIFIER { - $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, false); } | NAME { - $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE); + $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, true); } | vers_defns ';' VERS_IDENTIFIER { - $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, false); } | vers_defns ';' NAME { - $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, TRUE); + $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, true); } | vers_defns ';' EXTERN NAME '{' { @@ -1446,27 +1446,27 @@ vers_defns: } | GLOBAL { - $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, false); } | vers_defns ';' GLOBAL { - $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, false); } | LOCAL { - $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, false); } | vers_defns ';' LOCAL { - $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, false); } | EXTERN { - $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, false); } | vers_defns ';' EXTERN { - $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, FALSE); + $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, false); } ; |