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.
This commit is contained in:
Alan Modra 2021-03-31 10:39:51 +10:30
parent 015dc7e1f8
commit f38a2680c2
91 changed files with 1571 additions and 1532 deletions

View File

@ -1,3 +1,43 @@
2021-03-31 Alan Modra <amodra@gmail.com>
* 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.
2021-03-31 Alan Modra <amodra@gmail.com>
* elf-hints-local.h: Include stdint.h in place of bfd_stdint.h.

22
ld/configure vendored
View File

@ -17613,16 +17613,16 @@ _ACEOF
fi
fi
elf_list_options=FALSE
elf_shlib_list_options=FALSE
elf_plt_unwind_list_options=FALSE
elf_list_options=false
elf_shlib_list_options=false
elf_plt_unwind_list_options=false
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
all_targets=true
elf_list_options=TRUE
elf_shlib_list_options=TRUE
elf_plt_unwind_list_options=TRUE
elf_list_options=true
elf_shlib_list_options=true
elf_plt_unwind_list_options=true
else
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
@ -17658,25 +17658,25 @@ do
tdir_$i=$result"
case "${i}" in
*elf*)
elf_list_options=TRUE
elf_list_options=true
;;
*)
if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
elf_list_options=TRUE
elf_list_options=true
fi
;;
esac
if test "$elf_list_options" = "TRUE"; then
if test "$elf_list_options" = "true"; then
source_sh()
{
. $1
}
source_sh ${srcdir}/emulparams/${i}.sh
if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
elf_shlib_list_options=TRUE
elf_shlib_list_options=true
fi
if test x${PLT_UNWIND} = xyes; then
elf_plt_unwind_list_options=TRUE
elf_plt_unwind_list_options=true
fi
fi
;;

View File

@ -359,16 +359,16 @@ if test x${want64} = xfalse; then
fi
fi
elf_list_options=FALSE
elf_shlib_list_options=FALSE
elf_plt_unwind_list_options=FALSE
elf_list_options=false
elf_shlib_list_options=false
elf_plt_unwind_list_options=false
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
all_targets=true
elf_list_options=TRUE
elf_shlib_list_options=TRUE
elf_plt_unwind_list_options=TRUE
elf_list_options=true
elf_shlib_list_options=true
elf_plt_unwind_list_options=true
else
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
@ -404,25 +404,25 @@ do
tdir_$i=$result"
case "${i}" in
*elf*)
elf_list_options=TRUE
elf_list_options=true
;;
*)
if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
elf_list_options=TRUE
elf_list_options=true
fi
;;
esac
if test "$elf_list_options" = "TRUE"; then
if test "$elf_list_options" = "true"; then
source_sh()
{
. $1
}
source_sh ${srcdir}/emulparams/${i}.sh
if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
elf_shlib_list_options=TRUE
elf_shlib_list_options=true
fi
if test x${PLT_UNWIND} = xyes; then
elf_plt_unwind_list_options=TRUE
elf_plt_unwind_list_options=true
fi
fi
;;

View File

@ -7,12 +7,12 @@ PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
{
if (strcmp (optarg + 9, "prefix-addr") == 0)
{
params.call_nop_as_suffix = FALSE;
params.call_nop_as_suffix = false;
params.call_nop_byte = 0x67;
}
else if (strcmp (optarg + 9, "suffix-nop") == 0)
{
params.call_nop_as_suffix = TRUE;
params.call_nop_as_suffix = true;
params.call_nop_byte = 0x90;
}
else if (strncmp (optarg + 9, "prefix-", 7) == 0)
@ -22,7 +22,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
if (*end)
einfo (_("%F%P: invalid number for -z call-nop=prefix-: %s\n"),
optarg + 16);
params.call_nop_as_suffix = FALSE;
params.call_nop_as_suffix = false;
}
else if (strncmp (optarg + 9, "suffix-", 7) == 0)
{
@ -31,7 +31,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
if (*end)
einfo (_("%F%P: invalid number for -z call-nop=suffix-: %s\n"),
optarg + 16);
params.call_nop_as_suffix = TRUE;
params.call_nop_as_suffix = true;
}
else
einfo (_("%F%P: unsupported option: -z %s\n"), optarg);

View File

@ -11,11 +11,11 @@ PARSE_AND_LIST_OPTIONS_CET='
'
PARSE_AND_LIST_ARGS_CASE_Z_CET='
else if (strcmp (optarg, "ibtplt") == 0)
params.ibtplt = TRUE;
params.ibtplt = true;
else if (strcmp (optarg, "ibt") == 0)
params.ibt = TRUE;
params.ibt = true;
else if (strcmp (optarg, "shstk") == 0)
params.shstk = TRUE;
params.shstk = true;
else if (strncmp (optarg, "cet-report=", 11) == 0)
{
if (strcmp (optarg + 11, "none") == 0)

View File

@ -6,9 +6,9 @@ PARSE_AND_LIST_OPTIONS_DYNAMIC_UNDEFINED_WEAK='
PARSE_AND_LIST_ARGS_CASE_Z_DYNAMIC_UNDEFINED_WEAK='
else if (strcmp (optarg, "dynamic-undefined-weak") == 0)
link_info.dynamic_undefined_weak = TRUE;
link_info.dynamic_undefined_weak = true;
else if (strcmp (optarg, "nodynamic-undefined-weak") == 0)
link_info.dynamic_undefined_weak = FALSE;
link_info.dynamic_undefined_weak = false;
'
PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_DYNAMIC_UNDEFINED_WEAK"

View File

@ -6,4 +6,4 @@ source_sh ${srcdir}/emulparams/elf32bmip.sh
TEXT_START_ADDR=0xa0020000
unset SHLIB_TEXT_START_ADDR
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
DYNAMIC_LINK=FALSE
DYNAMIC_LINK=false

View File

@ -6,5 +6,5 @@ MAXPAGESIZE=0x1000
EMBEDDED=yes
TEMPLATE_NAME=elf
TEXT_START_ADDR=0x0000
DYNAMIC_LINK=FALSE
DYNAMIC_LINK=false
ALIGNMENT=4

View File

@ -9,7 +9,7 @@ ARCH=mips:5900
MACHINE=
MAXPAGESIZE=128
EMBEDDED=yes
DYNAMIC_LINK=FALSE
DYNAMIC_LINK=false
unset DATA_ADDR
SHLIB_TEXT_START_ADDR=0

View File

@ -9,7 +9,7 @@ ARCH=mips:5900
MACHINE=
MAXPAGESIZE=128
EMBEDDED=yes
DYNAMIC_LINK=FALSE
DYNAMIC_LINK=false
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_SECTIONS="

View File

@ -6,4 +6,4 @@ NONPAGED_TEXT_START_ADDR=0x10000
ARCH=visium
MACHINE=
TEMPLATE_NAME=elf
DYNAMIC_LINK=FALSE
DYNAMIC_LINK=false

View File

@ -52,7 +52,7 @@ case "$target" in
'
PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT='
else if (strcmp (optarg, "bndplt") == 0)
params.bndplt = TRUE;
params.bndplt = true;
'
PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_BNDPLT"
PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT"

View File

@ -5,7 +5,7 @@ PARSE_AND_LIST_OPTIONS_NOEXTEN_PROTECTED_DATA='
PARSE_AND_LIST_ARGS_CASE_Z_NOEXTEN_PROTECTED_DATA='
else if (strcmp (optarg, "noextern-protected-data") == 0)
link_info.extern_protected_data = FALSE;
link_info.extern_protected_data = false;
'

View File

@ -14,10 +14,10 @@ PARSE_AND_LIST_LONGOPTS='
PARSE_AND_LIST_ARGS_CASES='
case OPTION_LD_GENERATED_UNWIND_INFO:
link_info.no_ld_generated_unwind_info = FALSE;
link_info.no_ld_generated_unwind_info = false;
break;
case OPTION_NO_LD_GENERATED_UNWIND_INFO:
link_info.no_ld_generated_unwind_info = TRUE;
link_info.no_ld_generated_unwind_info = true;
break;
'

View File

@ -4,7 +4,7 @@ PARSE_AND_LIST_OPTIONS_RELOC_OVERFLOW='
'
PARSE_AND_LIST_ARGS_CASE_Z_RELOC_OVERFLOW='
else if (strcmp (optarg, "noreloc-overflow") == 0)
params.no_reloc_overflow_check = TRUE;
params.no_reloc_overflow_check = true;
'
PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_RELOC_OVERFLOW"

View File

@ -1,12 +1,12 @@
PARSE_AND_LIST_ARGS_CASES="$PARSE_AND_LIST_ARGS_CASES
case OPTION_DYNAMIC_LINKER:
params.has_dynamic_linker = TRUE;
return FALSE;
params.has_dynamic_linker = true;
return false;
case OPTION_NON_SHARED:
/* Check if -static is passed at command-line before all input
files. */
if (!lang_has_input_file)
params.static_before_all_inputs = TRUE;
return FALSE;
params.static_before_all_inputs = true;
return false;
"

View File

@ -15,7 +15,7 @@ PARSE_AND_LIST_OPTIONS_LAM='
'
PARSE_AND_LIST_ARGS_CASE_Z_LAM='
else if (strcmp (optarg, "lam-u48") == 0)
params.lam_u48 = TRUE;
params.lam_u48 = true;
else if (strncmp (optarg, "lam-u48-report=", 15) == 0)
{
if (strcmp (optarg + 15, "none") == 0)
@ -29,7 +29,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_LAM='
optarg + 15);
}
else if (strcmp (optarg, "lam-u57") == 0)
params.lam_u57 = TRUE;
params.lam_u57 = true;
else if (strncmp (optarg, "lam-u57-report=", 15) == 0)
{
if (strcmp (optarg + 15, "none") == 0)

View File

@ -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;
}

View File

@ -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 = {

View File

@ -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;
'

View File

@ -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

View File

@ -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)

View File

@ -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;
'

View File

@ -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\$)". */

View File

@ -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;
'

View File

@ -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 ();
}

View File

@ -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 ();
}

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
'

View File

@ -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 ();
}

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;
'

View File

@ -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

View File

@ -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

View File

@ -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. */

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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 = &current;
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;

View File

@ -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);

62
ld/ld.h
View File

@ -122,25 +122,25 @@ enum endian_enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE };
typedef struct
{
/* 1 => assign space to common symbols even if `relocatable_output'. */
bfd_boolean force_common_definition;
bool force_common_definition;
/* If TRUE, build MIPS embedded PIC relocation tables in the output
file. */
bfd_boolean embedded_relocs;
bool embedded_relocs;
/* If TRUE, force generation of a file with a .exe file. */
bfd_boolean force_exe_suffix;
bool force_exe_suffix;
/* If TRUE, generate a cross reference report. */
bfd_boolean cref;
bool cref;
/* If TRUE (which is the default), warn about mismatched input
files. */
bfd_boolean warn_mismatch;
bool warn_mismatch;
/* Warn on attempting to open an incompatible library during a library
search. */
bfd_boolean warn_search_mismatch;
bool warn_search_mismatch;
/* If non-zero check section addresses, once computed,
for overlaps. Relocatable links only check when this is > 0. */
@ -150,21 +150,21 @@ typedef struct
assuming that the user knows what they are doing. This was the old
behaviour of the linker. The new default behaviour is to reject such
input files. */
bfd_boolean accept_unknown_input_arch;
bool accept_unknown_input_arch;
/* Name of the import library to generate. */
char *out_implib_filename;
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
bool print_output_format;
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
bool print_memory_usage;
/* Should we force section groups to be resolved? Controlled with
--force-group-allocation on the command line or FORCE_GROUP_ALLOCATION
in the linker script. */
bfd_boolean force_group_allocation;
bool force_group_allocation;
/* Big or little endian as set on command line. */
enum endian_enum endian;
@ -224,61 +224,61 @@ enum orphan_handling_enum
typedef struct
{
bfd_boolean magic_demand_paged;
bfd_boolean make_executable;
bool magic_demand_paged;
bool make_executable;
/* If TRUE, -shared is supported. */
/* ??? A better way to do this is perhaps to define this in the
ld_emulation_xfer_struct since this is really a target dependent
parameter. */
bfd_boolean has_shared;
bool has_shared;
/* If TRUE, build constructors. */
bfd_boolean build_constructors;
bool build_constructors;
/* If TRUE, warn about any constructors. */
bfd_boolean warn_constructors;
bool warn_constructors;
/* If TRUE, warn about merging common symbols with others. */
bfd_boolean warn_common;
bool warn_common;
/* If TRUE, only warn once about a particular undefined symbol. */
bfd_boolean warn_once;
bool warn_once;
/* How should we deal with orphan sections. */
enum orphan_handling_enum orphan_handling;
/* If TRUE, warn if multiple global-pointers are needed (Alpha
only). */
bfd_boolean warn_multiple_gp;
bool warn_multiple_gp;
/* If TRUE, warn if the starting address of an output section
changes due to the alignment of an input section. */
bfd_boolean warn_section_align;
bool warn_section_align;
/* If TRUE, warning messages are fatal */
bfd_boolean fatal_warnings;
bool fatal_warnings;
sort_order sort_common;
bfd_boolean text_read_only;
bool text_read_only;
bfd_boolean stats;
bool stats;
/* If set, orphan input sections will be mapped to separate output
sections. */
bfd_boolean unique_orphan_sections;
bool unique_orphan_sections;
/* If set, only search library directories explicitly selected
on the command line. */
bfd_boolean only_cmd_line_lib_dirs;
bool only_cmd_line_lib_dirs;
/* If set, numbers and absolute symbols are simply treated as
numbers everywhere. */
bfd_boolean sane_expr;
bool sane_expr;
/* If set, code and non-code sections should never be in one segment. */
bfd_boolean separate_code;
bool separate_code;
/* The rpath separation character. Usually ':'. */
char rpath_separator;
@ -295,25 +295,25 @@ typedef struct
unsigned long hash_table_size;
/* If set, print discarded sections in map file output. */
bfd_boolean print_map_discarded;
bool print_map_discarded;
/* If set, emit the names and types of statically-linked variables
into the CTF. */
bfd_boolean ctf_variables;
bool ctf_variables;
/* If set, share only duplicated types in CTF, rather than sharing
all types that are not in conflict. */
bfd_boolean ctf_share_duplicated;
bool ctf_share_duplicated;
} ld_config_type;
extern ld_config_type config;
extern FILE * saved_script_handle;
extern bfd_boolean force_make_executable;
extern bool force_make_executable;
extern int yyparse (void);
extern void add_cref (const char *, bfd *, asection *, bfd_vma);
extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
extern bool handle_asneeded_cref (bfd *, enum notice_asneeded_action);
extern void output_cref (FILE *);
extern void check_nocrossrefs (void);
extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;

View File

@ -32,14 +32,14 @@
#define streq(a,b) strcmp ((a), (b)) == 0
#define strneq(a,b,n) strncmp ((a), (b), (n)) == 0
bfd_boolean
bool
validate_build_id_style (const char *style)
{
if ((streq (style, "md5")) || (streq (style, "sha1"))
|| (streq (style, "uuid")) || (strneq (style, "0x", 2)))
return TRUE;
return true;
return FALSE;
return false;
}
bfd_size_type
@ -94,7 +94,7 @@ read_hex (const char xdigit)
return 0;
}
bfd_boolean
bool
generate_build_id (bfd *abfd,
const char *style,
checksum_fn checksum_contents,
@ -107,7 +107,7 @@ generate_build_id (bfd *abfd,
md5_init_ctx (&ctx);
if (!(*checksum_contents) (abfd, (sum_fn) &md5_process_bytes, &ctx))
return FALSE;
return false;
md5_finish_ctx (&ctx, id_bits);
}
else if (streq (style, "sha1"))
@ -116,7 +116,7 @@ generate_build_id (bfd *abfd,
sha1_init_ctx (&ctx);
if (!(*checksum_contents) (abfd, (sum_fn) &sha1_process_bytes, &ctx))
return FALSE;
return false;
sha1_finish_ctx (&ctx, id_bits);
}
else if (streq (style, "uuid"))
@ -126,11 +126,11 @@ generate_build_id (bfd *abfd,
int fd = open ("/dev/urandom", O_RDONLY);
if (fd < 0)
return FALSE;
return false;
n = read (fd, id_bits, size);
close (fd);
if (n < size)
return FALSE;
return false;
#else /* __MINGW32__ */
typedef RPC_STATUS (RPC_ENTRY * UuidCreateFn) (UUID *);
UUID uuid;
@ -138,18 +138,18 @@ generate_build_id (bfd *abfd,
HMODULE rpc_library = LoadLibrary ("rpcrt4.dll");
if (!rpc_library)
return FALSE;
return false;
uuid_create = (UuidCreateFn) (void (WINAPI *)(void)) GetProcAddress (rpc_library, "UuidCreate");
if (!uuid_create)
{
FreeLibrary (rpc_library);
return FALSE;
return false;
}
if (uuid_create (&uuid) != RPC_S_OK)
{
FreeLibrary (rpc_library);
return FALSE;
return false;
}
FreeLibrary (rpc_library);
memcpy (id_bits, &uuid,
@ -179,5 +179,5 @@ generate_build_id (bfd *abfd,
else
abort (); /* Should have been validated earlier. */
return TRUE;
return true;
}

View File

@ -21,7 +21,7 @@
#ifndef LDBUILDID_H
#define LDBUILDID_H
extern bfd_boolean
extern bool
validate_build_id_style (const char *);
extern bfd_size_type
@ -29,11 +29,11 @@ compute_build_id_size (const char *);
typedef void (*sum_fn) (const void *, size_t, void *);
typedef bfd_boolean (*checksum_fn) (bfd *,
void (*) (const void *, size_t, void *),
void *);
typedef bool (*checksum_fn) (bfd *,
void (*) (const void *, size_t, void *),
void *);
extern bfd_boolean
extern bool
generate_build_id (bfd *, const char *, checksum_fn, unsigned char *, int);
#endif /* LDBUILDID_H */

View File

@ -77,8 +77,8 @@ struct cref_hash_table
static void output_one_cref (FILE *, struct cref_hash_entry *);
static void check_local_sym_xref (lang_input_statement_type *);
static bfd_boolean check_nocrossref (struct cref_hash_entry *, void *);
static void check_refs (const char *, bfd_boolean, asection *, bfd *,
static bool check_nocrossref (struct cref_hash_entry *, void *);
static void check_refs (const char *, bool, asection *, bfd *,
struct lang_nocrossrefs *);
static void check_reloc_refs (bfd *, asection *, void *);
@ -93,8 +93,7 @@ static void check_reloc_refs (bfd *, asection *, void *);
#define cref_hash_traverse(table, func, info) \
(bfd_hash_traverse \
(&(table)->root, \
(bfd_boolean (*) (struct bfd_hash_entry *, void *)) (func), \
(info)))
(bool (*) (struct bfd_hash_entry *, void *)) (func), (info)))
/* The cref hash table. */
@ -102,7 +101,7 @@ static struct cref_hash_table cref_table;
/* Whether the cref hash table has been initialized. */
static bfd_boolean cref_initialized;
static bool cref_initialized;
/* The number of symbols seen so far. */
@ -169,10 +168,10 @@ add_cref (const char *name,
if (!bfd_hash_table_init (&cref_table.root, cref_hash_newfunc,
sizeof (struct cref_hash_entry)))
einfo (_("%X%P: bfd_hash_table_init of cref table failed: %E\n"));
cref_initialized = TRUE;
cref_initialized = true;
}
h = cref_hash_lookup (&cref_table, name, TRUE, FALSE);
h = cref_hash_lookup (&cref_table, name, true, false);
if (h == NULL)
einfo (_("%X%P: cref_hash_lookup failed: %E\n"));
@ -188,31 +187,31 @@ add_cref (const char *name,
r->next = h->refs;
h->refs = r;
r->abfd = abfd;
r->def = FALSE;
r->common = FALSE;
r->undef = FALSE;
r->def = false;
r->common = false;
r->undef = false;
}
if (bfd_is_und_section (section))
r->undef = TRUE;
r->undef = true;
else if (bfd_is_com_section (section))
r->common = TRUE;
r->common = true;
else
r->def = TRUE;
r->def = true;
}
/* Called before loading an as-needed library to take a snapshot of
the cref hash table, and after we have loaded or found that the
library was not needed. */
bfd_boolean
bool
handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
enum notice_asneeded_action act)
{
unsigned int i;
if (!cref_initialized)
return TRUE;
return true;
if (act == notice_as_needed)
{
@ -238,7 +237,7 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
if (alloc_mark == NULL)
return FALSE;
return false;
memcpy (old_tab, cref_table.root.table, tabsize);
old_ent = (char *) old_tab + tabsize;
@ -266,7 +265,7 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
}
}
}
return TRUE;
return true;
}
if (act == notice_not_needed)
@ -278,8 +277,8 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
/* The only way old_tab can be NULL is if the cref hash table
had not been initialised when notice_as_needed. */
bfd_hash_table_free (&cref_table.root);
cref_initialized = FALSE;
return TRUE;
cref_initialized = false;
return true;
}
old_ent = (char *) old_tab + tabsize;
@ -313,18 +312,18 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
alloc_mark);
}
else if (act != notice_needed)
return FALSE;
return false;
free (old_tab);
old_tab = NULL;
return TRUE;
return true;
}
/* Copy the addresses of the hash table entries into an array. This
is called via cref_hash_traverse. We also fill in the demangled
name. */
static bfd_boolean
static bool
cref_fill_array (struct cref_hash_entry *h, void *data)
{
struct cref_hash_entry ***pph = (struct cref_hash_entry ***) data;
@ -339,7 +338,7 @@ cref_fill_array (struct cref_hash_entry *h, void *data)
++*pph;
return TRUE;
return true;
}
/* Sort an array of cref hash table entries by name. */
@ -408,8 +407,8 @@ output_one_cref (FILE *fp, struct cref_hash_entry *h)
struct bfd_link_hash_entry *hl;
struct cref_ref *r;
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
FALSE, TRUE);
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, false,
false, true);
if (hl == NULL)
einfo (_("%P: symbol `%pT' missing from main hash table\n"),
h->root.string);
@ -537,7 +536,7 @@ check_local_sym_xref (lang_input_statement_type *statement)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
{
if (strcmp (ncr->name, outsecname) == 0)
check_refs (symname, FALSE, sym->section, abfd, ncrs);
check_refs (symname, false, sym->section, abfd, ncrs);
/* The NOCROSSREFS_TO command only checks symbols defined in
the first section in the list. */
if (ncrs->onlyfirst)
@ -549,7 +548,7 @@ check_local_sym_xref (lang_input_statement_type *statement)
/* Check one symbol to see if it is a prohibited cross reference. */
static bfd_boolean
static bool
check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
{
struct bfd_link_hash_entry *hl;
@ -559,22 +558,22 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
struct lang_nocrossref *ncr;
struct cref_ref *ref;
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
FALSE, TRUE);
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, false,
false, true);
if (hl == NULL)
{
einfo (_("%P: symbol `%pT' missing from main hash table\n"),
h->root.string);
return TRUE;
return true;
}
if (hl->type != bfd_link_hash_defined
&& hl->type != bfd_link_hash_defweak)
return TRUE;
return true;
defsec = hl->u.def.section->output_section;
if (defsec == NULL)
return TRUE;
return true;
defsecname = bfd_section_name (defsec);
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
@ -582,7 +581,7 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
{
if (strcmp (ncr->name, defsecname) == 0)
for (ref = h->refs; ref != NULL; ref = ref->next)
check_refs (hl->root.string, TRUE, hl->u.def.section,
check_refs (hl->root.string, true, hl->u.def.section,
ref->abfd, ncrs);
/* The NOCROSSREFS_TO command only checks symbols defined in the first
section in the list. */
@ -590,7 +589,7 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
break;
}
return TRUE;
return true;
}
/* The struct is used to pass information from check_refs to
@ -602,7 +601,7 @@ struct check_refs_info
asection *defsec;
struct lang_nocrossrefs *ncrs;
asymbol **asymbols;
bfd_boolean global;
bool global;
};
/* This function is called for each symbol defined in a section which
@ -612,7 +611,7 @@ struct check_refs_info
static void
check_refs (const char *name,
bfd_boolean global,
bool global,
asection *sec,
bfd *abfd,
struct lang_nocrossrefs *ncrs)
@ -652,7 +651,7 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
const char *outdefsecname;
struct lang_nocrossref *ncr;
const char *symname;
bfd_boolean global;
bool global;
long relsize;
arelent **relpp;
long relcount;

View File

@ -40,7 +40,7 @@ lang_statement_list_type constructor_list;
/* Whether the constructors should be sorted. Note that this is
global for the entire link; we assume that there is only a single
CONSTRUCTORS command in the linker script. */
bfd_boolean constructors_sorted;
bool constructors_sorted;
/* The sets we have seen. */
struct set_info *sets;
@ -195,15 +195,15 @@ ctor_cmp (const void *p1, const void *p2)
void
ldctor_build_sets (void)
{
static bfd_boolean called;
bfd_boolean header_printed;
static bool called;
bool header_printed;
struct set_info *p;
/* The emulation code may call us directly, but we only want to do
this once. */
if (called)
return;
called = TRUE;
called = true;
if (constructors_sorted)
{
@ -246,7 +246,7 @@ ldctor_build_sets (void)
lang_list_init (&constructor_list);
push_stat_ptr (&constructor_list);
header_printed = FALSE;
header_printed = false;
for (p = sets; p != NULL; p = p->next)
{
struct set_element *e;
@ -326,10 +326,10 @@ ldctor_build_sets (void)
lang_add_assignment (exp_assign (".",
exp_unop (ALIGN_K,
exp_intop (reloc_size)),
FALSE));
false));
lang_add_assignment (exp_assign (p->h->root.string,
exp_nameop (NAME, "."),
FALSE));
false));
lang_add_data (size, exp_intop (p->count));
for (e = p->elements; e != NULL; e = e->u.next)
@ -341,7 +341,7 @@ ldctor_build_sets (void)
if (!header_printed)
{
minfo (_("\nSet Symbol\n\n"));
header_printed = TRUE;
header_printed = true;
}
minfo ("%s", p->h->root.string);

View File

@ -27,7 +27,7 @@ extern lang_statement_list_type constructor_list;
/* Whether the constructors should be sorted. Note that this is
global for the entire link; we assume that there is only a single
CONSTRUCTORS command in the linker script. */
extern bfd_boolean constructors_sorted;
extern bool constructors_sorted;
/* We keep a list of these structures for each set we build. */

View File

@ -56,7 +56,7 @@ static struct bfd_link_needed_list *global_needed;
static lang_input_statement_type *global_found;
static struct stat global_stat;
static struct bfd_link_needed_list *global_vercheck_needed;
static bfd_boolean global_vercheck_failed;
static bool global_vercheck_failed;
void
ldelf_after_parse (void)
@ -76,7 +76,7 @@ ldelf_after_parse (void)
/* Handle the generation of DT_NEEDED tags. */
bfd_boolean
bool
ldelf_load_symbols (lang_input_statement_type *entry)
{
int link_class = 0;
@ -100,13 +100,13 @@ ldelf_load_symbols (lang_input_statement_type *entry)
if (link_class == 0
|| (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
return FALSE;
return false;
bfd_elf_set_dyn_lib_class (entry->the_bfd,
(enum dynamic_lib_link_class) link_class);
/* Continue on with normal load_symbols processing. */
return FALSE;
return false;
}
/* On Linux, it's possible to have different versions of the same
@ -168,7 +168,7 @@ ldelf_vercheck (lang_input_statement_type *s)
FOO.SO.VER2, and VER1 and VER2 are different. This
appears to be a version mismatch, so we tell the caller
to try a different version of this library. */
global_vercheck_failed = TRUE;
global_vercheck_failed = true;
return;
}
}
@ -246,7 +246,7 @@ ldelf_stat_needed (lang_input_statement_type *s)
named by a DT_NEEDED entry. The FORCE parameter indicates whether
to skip the check for a conflicting version. */
static bfd_boolean
static bool
ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
{
bfd *abfd;
@ -259,7 +259,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
{
if (verbose)
info_msg (_("attempt to open %s failed\n"), name);
return FALSE;
return false;
}
track_dependency_files (name);
@ -270,19 +270,19 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
if (! bfd_check_format (abfd, bfd_object))
{
bfd_close (abfd);
return FALSE;
return false;
}
if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
{
bfd_close (abfd);
return FALSE;
return false;
}
/* For DT_NEEDED, they have to match. */
if (abfd->xvec != link_info.output_bfd->xvec)
{
bfd_close (abfd);
return FALSE;
return false;
}
/* Check whether this object would include any conflicting library
@ -300,14 +300,14 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
if (needs != NULL)
{
global_vercheck_needed = needs;
global_vercheck_failed = FALSE;
global_vercheck_failed = false;
lang_for_each_input_file (ldelf_vercheck);
if (global_vercheck_failed)
{
bfd_close (abfd);
/* Return FALSE to force the caller to move on to try
another file on the search path. */
return FALSE;
return false;
}
/* But wait! It gets much worse. On Linux, if a shared
@ -326,7 +326,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
if (l == NULL)
{
bfd_close (abfd);
return FALSE;
return false;
}
}
}
@ -357,7 +357,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
{
/* Return TRUE to indicate that we found the file, even though
we aren't going to do anything with it. */
return TRUE;
return true;
}
/* Specify the soname to use. */
@ -384,12 +384,12 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
if (! bfd_link_add_symbols (abfd, &link_info))
einfo (_("%F%P: %pB: error adding symbols: %E\n"), abfd);
return TRUE;
return true;
}
/* Search for a needed file in a path. */
static bfd_boolean
static bool
ldelf_search_needed (const char *path, struct dt_needed *n, int force,
int is_linux, int elfsize)
{
@ -402,7 +402,7 @@ ldelf_search_needed (const char *path, struct dt_needed *n, int force,
return ldelf_try_needed (n, force, is_linux);
if (path == NULL || *path == '\0')
return FALSE;
return false;
needed.by = n->by;
needed.name = n->name;
@ -586,7 +586,7 @@ ldelf_search_needed (const char *path, struct dt_needed *n, int force,
needed.name = filename;
if (ldelf_try_needed (&needed, force, is_linux))
return TRUE;
return true;
free (filename);
@ -595,7 +595,7 @@ ldelf_search_needed (const char *path, struct dt_needed *n, int force,
path = s + 1;
}
return FALSE;
return false;
}
/* Prefix the sysroot to absolute paths in PATH, a string containing
@ -687,11 +687,11 @@ ldelf_add_sysroot (const char *path)
#include "elf-hints-local.h"
#endif
static bfd_boolean
static bool
ldelf_check_ld_elf_hints (const struct bfd_link_needed_list *l, int force,
int elfsize)
{
static bfd_boolean initialized;
static bool initialized;
static const char *ld_elf_hints;
struct dt_needed needed;
@ -726,15 +726,15 @@ ldelf_check_ld_elf_hints (const struct bfd_link_needed_list *l, int force,
fclose (f);
}
initialized = TRUE;
initialized = true;
}
if (ld_elf_hints == NULL)
return FALSE;
return false;
needed.by = l->by;
needed.name = l->name;
return ldelf_search_needed (ld_elf_hints, &needed, force, FALSE, elfsize);
return ldelf_search_needed (ld_elf_hints, &needed, force, false, elfsize);
}
/* For a native linker, check the file /etc/ld.so.conf for directories
@ -747,7 +747,7 @@ struct ldelf_ld_so_conf
size_t len, alloc;
};
static bfd_boolean
static bool
ldelf_parse_ld_so_conf (struct ldelf_ld_so_conf *, const char *);
static void
@ -788,7 +788,7 @@ ldelf_parse_ld_so_conf_include (struct ldelf_ld_so_conf *info,
free (newp);
}
static bfd_boolean
static bool
ldelf_parse_ld_so_conf (struct ldelf_ld_so_conf *info, const char *filename)
{
FILE *f = fopen (filename, FOPEN_RT);
@ -796,7 +796,7 @@ ldelf_parse_ld_so_conf (struct ldelf_ld_so_conf *info, const char *filename)
size_t linelen;
if (f == NULL)
return FALSE;
return false;
linelen = 256;
line = xmalloc (linelen);
@ -893,14 +893,14 @@ ldelf_parse_ld_so_conf (struct ldelf_ld_so_conf *info, const char *filename)
while (! feof (f));
free (line);
fclose (f);
return TRUE;
return true;
}
static bfd_boolean
static bool
ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
int elfsize, const char *prefix)
{
static bfd_boolean initialized;
static bool initialized;
static const char *ld_so_conf;
struct dt_needed needed;
@ -927,16 +927,16 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
ld_so_conf = ldelf_add_sysroot (info.path);
free (info.path);
}
initialized = TRUE;
initialized = true;
}
if (ld_so_conf == NULL)
return FALSE;
return false;
needed.by = l->by;
needed.name = l->name;
return ldelf_search_needed (ld_so_conf, &needed, force, TRUE, elfsize);
return ldelf_search_needed (ld_so_conf, &needed, force, true, elfsize);
}
/* See if an input file matches a DT_NEEDED entry by name. */
@ -1073,7 +1073,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
if (!link_info.traditional_format)
{
bfd *elfbfd = NULL;
bfd_boolean warn_eh_frame = FALSE;
bool warn_eh_frame = false;
int seen_type = 0;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
@ -1116,7 +1116,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
elfbfd = abfd;
warn_eh_frame = TRUE;
warn_eh_frame = true;
}
}
@ -1135,7 +1135,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
&& bfd_set_section_alignment (s, 2))
{
htab->eh_info.hdr_sec = s;
warn_eh_frame = FALSE;
warn_eh_frame = false;
}
}
if (warn_eh_frame)
@ -1202,7 +1202,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
if (global_found != NULL)
{
nn.name = global_found->filename;
if (ldelf_try_needed (&nn, TRUE, is_linux))
if (ldelf_try_needed (&nn, true, is_linux))
continue;
}
@ -1347,7 +1347,7 @@ id_note_section_size (bfd *abfd ATTRIBUTE_UNUSED)
return size;
}
static bfd_boolean
static bool
write_build_id (bfd *abfd)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
@ -1366,7 +1366,7 @@ write_build_id (bfd *abfd)
{
einfo (_("%P: warning: .note.gnu.build-id section discarded,"
" --build-id ignored\n"));
return TRUE;
return true;
}
i_shdr = &elf_section_data (asec->output_section)->this_hdr;
@ -1400,7 +1400,7 @@ write_build_id (bfd *abfd)
/* Make .note.gnu.build-id section, and set up elf_tdata->build_id. */
bfd_boolean
bool
ldelf_setup_build_id (bfd *ibfd)
{
asection *s;
@ -1411,7 +1411,7 @@ ldelf_setup_build_id (bfd *ibfd)
if (size == 0)
{
einfo (_("%P: warning: unrecognized --build-id style ignored\n"));
return FALSE;
return false;
}
flags = (SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY
@ -1425,12 +1425,12 @@ ldelf_setup_build_id (bfd *ibfd)
t->o->build_id.sec = s;
elf_section_type (s) = SHT_NOTE;
s->size = size;
return TRUE;
return true;
}
einfo (_("%P: warning: cannot create .note.gnu.build-id section,"
" --build-id ignored\n"));
return FALSE;
return false;
}
/* Look through an expression for an assignment statement. */
@ -1438,13 +1438,13 @@ ldelf_setup_build_id (bfd *ibfd)
static void
ldelf_find_exp_assignment (etree_type *exp)
{
bfd_boolean provide = FALSE;
bool provide = false;
switch (exp->type.node_class)
{
case etree_provide:
case etree_provided:
provide = TRUE;
provide = true;
/* Fallthru */
case etree_assign:
/* We call record_link_assignment even if the symbol is defined.
@ -1564,7 +1564,7 @@ ldelf_before_allocation (char *audit, char *depaudit,
{
struct elf_link_hash_table *htab = elf_hash_table (&link_info);
struct elf_link_hash_entry *h
= elf_link_hash_lookup (htab, "__ehdr_start", FALSE, FALSE, TRUE);
= elf_link_hash_lookup (htab, "__ehdr_start", false, false, true);
/* Only adjust the export class if the symbol was referenced
and not defined, otherwise leave it alone. */
@ -1576,7 +1576,7 @@ ldelf_before_allocation (char *audit, char *depaudit,
{
const struct elf_backend_data *bed;
bed = get_elf_backend_data (link_info.output_bfd);
(*bed->elf_backend_hide_symbol) (&link_info, h, TRUE);
(*bed->elf_backend_hide_symbol) (&link_info, h, true);
if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL)
h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
/* Don't leave the symbol undefined. Undefined hidden
@ -1725,17 +1725,17 @@ ldelf_before_allocation (char *audit, char *depaudit,
dynamic libraries have an extension of .so (or .sl on oddball systems
like hpux). */
bfd_boolean
bool
ldelf_open_dynamic_archive (const char *arch, search_dirs_type *search,
lang_input_statement_type *entry)
{
const char *filename;
char *string;
size_t len;
bfd_boolean opened = FALSE;
bool opened = false;
if (! entry->flags.maybe_archive)
return FALSE;
return false;
filename = entry->filename;
len = strlen (search->name) + strlen (filename);
@ -1769,7 +1769,7 @@ ldelf_open_dynamic_archive (const char *arch, search_dirs_type *search,
if (!opened && !ldfile_try_open_bfd (string, entry))
{
free (string);
return FALSE;
return false;
}
entry->filename = string;
@ -1800,7 +1800,7 @@ ldelf_open_dynamic_archive (const char *arch, search_dirs_type *search,
bfd_elf_set_dt_needed_name (entry->the_bfd, filename);
}
return TRUE;
return true;
}
/* A variant of lang_output_section_find used by place_orphan. */
@ -1869,7 +1869,7 @@ output_rel_find (int isdyn, int rela)
/* Return whether IN is suitable to be part of OUT. */
static bfd_boolean
static bool
elf_orphan_compatible (asection *in, asection *out)
{
/* Non-zero sh_info implies a section with SHF_INFO_LINK with
@ -1880,7 +1880,7 @@ elf_orphan_compatible (asection *in, asection *out)
shouldn't merge sections with differing unknown semantics. */
if (elf_section_data (out)->this_hdr.sh_info
!= elf_section_data (in)->this_hdr.sh_info)
return FALSE;
return false;
/* We can't merge with a member of an output section group or merge
two sections with differing SHF_EXCLUDE or other processor and OS
specific flags when doing a relocatable link. */
@ -1888,7 +1888,7 @@ elf_orphan_compatible (asection *in, asection *out)
&& (elf_next_in_group (out) != NULL
|| ((elf_section_flags (out) ^ elf_section_flags (in))
& (SHF_MASKPROC | SHF_MASKOS)) != 0))
return FALSE;
return false;
return _bfd_elf_match_sections_by_type (link_info.output_bfd, out,
in->owner, in);
}

View File

@ -21,12 +21,12 @@
extern const char *ldelf_emit_note_gnu_build_id;
extern void ldelf_after_parse (void);
extern bfd_boolean ldelf_load_symbols (lang_input_statement_type *);
extern bool ldelf_load_symbols (lang_input_statement_type *);
extern void ldelf_after_open (int, int, int, int, int, const char *);
extern bfd_boolean ldelf_setup_build_id (bfd *);
extern bool ldelf_setup_build_id (bfd *);
extern void ldelf_append_to_separated_string (char **, char *);
extern void ldelf_before_allocation (char *, char *, const char *);
extern bfd_boolean ldelf_open_dynamic_archive
extern bool ldelf_open_dynamic_archive
(const char *, search_dirs_type *, lang_input_statement_type *);
extern lang_output_section_statement_type *ldelf_place_orphan
(asection *, const char *, int);

View File

@ -52,7 +52,7 @@ struct os_sections
/* Add IS to data kept for OS. */
static bfd_boolean
static bool
add_link_order_input_section (lang_input_section_type *is,
lang_output_section_statement_type *os)
{
@ -83,18 +83,18 @@ add_link_order_input_section (lang_input_section_type *is,
&& (s->flags & SEC_LINKER_CREATED) == 0
&& elf_linked_to_section (s) != NULL)
os_info->ordered++;
return FALSE;
return false;
}
/* Run over the linker's statement list, extracting info about input
sections attached to each output section. */
static bfd_boolean
static bool
link_order_scan (lang_statement_union_type *u,
lang_output_section_statement_type *os)
{
asection *s;
bfd_boolean ret = FALSE;
bool ret = false;
for (; u != NULL; u = u->header.next)
{
@ -102,21 +102,21 @@ link_order_scan (lang_statement_union_type *u,
{
case lang_wild_statement_enum:
if (link_order_scan (u->wild_statement.children.head, os))
ret = TRUE;
ret = true;
break;
case lang_constructors_statement_enum:
if (link_order_scan (constructor_list.head, os))
ret = TRUE;
ret = true;
break;
case lang_output_section_statement_enum:
if (u->output_section_statement.constraint != -1
&& link_order_scan (u->output_section_statement.children.head,
&u->output_section_statement))
ret = TRUE;
ret = true;
break;
case lang_group_statement_enum:
if (link_order_scan (u->group_statement.children.head, os))
ret = TRUE;
ret = true;
break;
case lang_input_section_enum:
s = u->input_section.section;
@ -127,7 +127,7 @@ link_order_scan (lang_statement_union_type *u,
|| ((s->output_section->flags & (SEC_LOAD | SEC_THREAD_LOCAL))
== (SEC_LOAD | SEC_THREAD_LOCAL))))
if (add_link_order_input_section (&u->input_section, os))
ret = TRUE;
ret = true;
break;
default:
break;
@ -195,7 +195,7 @@ compare_link_order (const void *a, const void *b)
/* Rearrange sections with SHF_LINK_ORDER into the same order as their
linked sections. */
static bfd_boolean
static bool
fixup_link_order (lang_output_section_statement_type *os)
{
struct os_sections *os_info = os->data;
@ -223,7 +223,7 @@ fixup_link_order (lang_output_section_statement_type *os)
if (os_info->isec[i].idx != i)
break;
if (i == os_info->count)
return FALSE;
return false;
/* Now reorder the linker input section statements to reflect the
proper sorting. The is done by rewriting the existing statements
@ -247,19 +247,19 @@ fixup_link_order (lang_output_section_statement_type *os)
}
free (save_s);
free (orig_is);
return TRUE;
return true;
}
void
ldelf_map_segments (bfd_boolean need_layout)
ldelf_map_segments (bool need_layout)
{
int tries = 10;
static bfd_boolean done_link_order_scan = FALSE;
static bool done_link_order_scan = false;
do
{
lang_relax_sections (need_layout);
need_layout = FALSE;
need_layout = false;
if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour)
{
@ -267,7 +267,7 @@ ldelf_map_segments (bfd_boolean need_layout)
if (!done_link_order_scan)
{
link_order_scan (statement_list.head, NULL);
done_link_order_scan = TRUE;
done_link_order_scan = true;
}
for (os = (void *) lang_os_list.head; os != NULL; os = os->next)
{
@ -284,7 +284,7 @@ ldelf_map_segments (bfd_boolean need_layout)
}
if (os_info->count > 1
&& fixup_link_order (os))
need_layout = TRUE;
need_layout = true;
}
}
}
@ -308,11 +308,11 @@ ldelf_map_segments (bfd_boolean need_layout)
if (tries > 6)
/* The first few times we allow any change to
phdr_size . */
need_layout = TRUE;
need_layout = true;
else if (phdr_size
< elf_program_header_size (link_info.output_bfd))
/* After that we only allow the size to grow. */
need_layout = TRUE;
need_layout = true;
else
elf_program_header_size (link_info.output_bfd) = phdr_size;
}

View File

@ -22,7 +22,7 @@ struct elf_internal_sym;
struct elf_strtab_hash;
struct ctf_dict;
extern void ldelf_map_segments (bfd_boolean);
extern void ldelf_map_segments (bool);
extern int ldelf_emit_ctf_early (void);
extern void ldelf_acquire_strings_for_ctf
(struct ctf_dict *ctf_output, struct elf_strtab_hash *strtab);

View File

@ -121,13 +121,13 @@ ldemul_get_script (int *isfile)
return ld_emulation->get_script (isfile);
}
bfd_boolean
bool
ldemul_open_dynamic_archive (const char *arch, search_dirs_type *search,
lang_input_statement_type *entry)
{
if (ld_emulation->open_dynamic_archive)
return (*ld_emulation->open_dynamic_archive) (arch, search, entry);
return FALSE;
return false;
}
lang_output_section_statement_type *
@ -148,41 +148,41 @@ ldemul_add_options (int ns, char **shortopts, int nl,
nrl, really_longopts);
}
bfd_boolean
bool
ldemul_handle_option (int optc)
{
if (ld_emulation->handle_option)
return (*ld_emulation->handle_option) (optc);
return FALSE;
return false;
}
bfd_boolean
bool
ldemul_parse_args (int argc, char **argv)
{
/* Try and use the emulation parser if there is one. */
if (ld_emulation->parse_args)
return (*ld_emulation->parse_args) (argc, argv);
return FALSE;
return false;
}
/* Let the emulation code handle an unrecognized file. */
bfd_boolean
bool
ldemul_unrecognized_file (lang_input_statement_type *entry)
{
if (ld_emulation->unrecognized_file)
return (*ld_emulation->unrecognized_file) (entry);
return FALSE;
return false;
}
/* Let the emulation code handle a recognized file. */
bfd_boolean
bool
ldemul_recognized_file (lang_input_statement_type *entry)
{
if (ld_emulation->recognized_file)
return (*ld_emulation->recognized_file) (entry);
return FALSE;
return false;
}
char *
@ -220,7 +220,7 @@ after_parse_default (void)
if (entry_symbol.name != NULL
&& (bfd_link_executable (&link_info) || entry_from_cmdline))
{
bfd_boolean is_vma = FALSE;
bool is_vma = false;
if (entry_from_cmdline)
{
@ -242,25 +242,25 @@ after_parse_default (void)
void
after_open_default (void)
{
link_info.big_endian = TRUE;
link_info.big_endian = true;
if (bfd_big_endian (link_info.output_bfd))
;
else if (bfd_little_endian (link_info.output_bfd))
link_info.big_endian = FALSE;
link_info.big_endian = false;
else
{
if (command_line.endian == ENDIAN_BIG)
;
else if (command_line.endian == ENDIAN_LITTLE)
link_info.big_endian = FALSE;
link_info.big_endian = false;
else if (command_line.endian == ENDIAN_UNSET)
{
LANG_FOR_EACH_INPUT_STATEMENT (s)
if (s->the_bfd != NULL)
{
if (bfd_little_endian (s->the_bfd))
link_info.big_endian = FALSE;
link_info.big_endian = false;
break;
}
}
@ -280,7 +280,7 @@ before_place_orphans_default (void)
void
after_allocation_default (void)
{
lang_relax_sections (FALSE);
lang_relax_sections (false);
}
void
@ -344,12 +344,12 @@ void
ldemul_list_emulations (FILE *f)
{
ld_emulation_xfer_type **eptr = ld_emulations;
bfd_boolean first = TRUE;
bool first = true;
for (; *eptr; eptr++)
{
if (first)
first = FALSE;
first = false;
else
fprintf (f, " ");
fprintf (f, "%s", (*eptr)->emulation_name);
@ -430,7 +430,7 @@ ldemul_new_dynsym_for_ctf (struct ctf_dict *ctf_output, int symidx,
ld_emulation->new_dynsym_for_ctf (ctf_output, symidx, sym);
}
bfd_boolean
bool
ldemul_print_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
{
if (ld_emulation->print_symbol)

View File

@ -62,17 +62,17 @@ extern void ldemul_create_output_section_statements
(void);
extern lang_output_section_statement_type *ldemul_place_orphan
(asection *, const char *, int);
extern bfd_boolean ldemul_parse_args
extern bool ldemul_parse_args
(int, char **);
extern void ldemul_add_options
(int, char **, int, struct option **, int, struct option **);
extern bfd_boolean ldemul_handle_option
extern bool ldemul_handle_option
(int);
extern bfd_boolean ldemul_unrecognized_file
extern bool ldemul_unrecognized_file
(struct lang_input_statement_struct *);
extern bfd_boolean ldemul_recognized_file
extern bool ldemul_recognized_file
(struct lang_input_statement_struct *);
extern bfd_boolean ldemul_open_dynamic_archive
extern bool ldemul_open_dynamic_archive
(const char *, struct search_dirs *, struct lang_input_statement_struct *);
extern char *ldemul_default_target
(int, char**);
@ -114,7 +114,7 @@ extern void ldemul_acquire_strings_for_ctf
extern void ldemul_new_dynsym_for_ctf
(struct ctf_dict *, int symidx, struct elf_internal_sym *);
extern bfd_boolean ldemul_print_symbol
extern bool ldemul_print_symbol
(struct bfd_link_hash_entry *hash_entry, void *ptr);
typedef struct ld_emulation_xfer_struct {
@ -170,7 +170,7 @@ typedef struct ld_emulation_xfer_struct {
/* Try to open a dynamic library. ARCH is an architecture name, and
is normally the empty string. ENTRY is the lang_input_statement
that should be opened. */
bfd_boolean (*open_dynamic_archive)
bool (*open_dynamic_archive)
(const char *arch, struct search_dirs *,
struct lang_input_statement_struct *entry);
@ -186,7 +186,7 @@ typedef struct ld_emulation_xfer_struct {
/* Parse args which the base linker doesn't understand.
Return TRUE if the arg needs no further processing. */
bfd_boolean (*parse_args) (int, char **);
bool (*parse_args) (int, char **);
/* Hook to add options to parameters passed by the base linker to
getopt_long and getopt_long_only calls. */
@ -195,11 +195,11 @@ typedef struct ld_emulation_xfer_struct {
/* Companion to the above to handle an option. Returns TRUE if it is
one of our options. */
bfd_boolean (*handle_option) (int);
bool (*handle_option) (int);
/* Run to handle files which are not recognized as object files or
archives. Return TRUE if the file was handled. */
bfd_boolean (*unrecognized_file)
bool (*unrecognized_file)
(struct lang_input_statement_struct *);
/* Run to list the command line options which parse_args handles. */
@ -207,7 +207,7 @@ typedef struct ld_emulation_xfer_struct {
/* Run to specially handle files which *are* recognized as object
files or archives. Return TRUE if the file was handled. */
bfd_boolean (*recognized_file)
bool (*recognized_file)
(struct lang_input_statement_struct *);
/* Called when looking for libraries in a directory specified
@ -251,7 +251,7 @@ typedef struct ld_emulation_xfer_struct {
/* Called when printing a symbol to the map file. AIX uses this
hook to flag gc'd symbols. */
bfd_boolean (*print_symbol)
bool (*print_symbol)
(struct bfd_link_hash_entry *hash_entry, void *ptr);
} ld_emulation_xfer_type;

View File

@ -161,14 +161,14 @@ make_log2ceil (void)
{
bfd_vma value = expld.result.value;
bfd_vma result = -1;
bfd_boolean round_up = FALSE;
bool round_up = false;
do
{
result++;
/* If more than one bit is set in the value we will need to round up. */
if ((value > 1) && (value & 1))
round_up = TRUE;
round_up = true;
}
while (value >>= 1);
@ -184,13 +184,13 @@ make_abs (void)
if (expld.result.section != NULL)
expld.result.value += expld.result.section->vma;
expld.result.section = bfd_abs_section_ptr;
expld.rel_from_abs = FALSE;
expld.rel_from_abs = false;
}
static void
new_abs (bfd_vma value)
{
expld.result.valid_p = TRUE;
expld.result.valid_p = true;
expld.result.section = bfd_abs_section_ptr;
expld.result.value = value;
expld.result.str = NULL;
@ -240,7 +240,7 @@ exp_relop (asection *section, bfd_vma value)
static void
new_number (bfd_vma value)
{
expld.result.valid_p = TRUE;
expld.result.valid_p = true;
expld.result.value = value;
expld.result.str = NULL;
expld.result.section = NULL;
@ -249,7 +249,7 @@ new_number (bfd_vma value)
static void
new_rel (bfd_vma value, asection *section)
{
expld.result.valid_p = TRUE;
expld.result.valid_p = true;
expld.result.value = value;
expld.result.str = NULL;
expld.result.section = section;
@ -260,8 +260,8 @@ new_rel_from_abs (bfd_vma value)
{
asection *s = expld.section;
expld.rel_from_abs = TRUE;
expld.result.valid_p = TRUE;
expld.rel_from_abs = true;
expld.result.valid_p = true;
expld.result.value = value - s->vma;
expld.result.str = NULL;
expld.result.section = s;
@ -297,26 +297,26 @@ static struct definedness_hash_entry *
symbol_defined (const char *name)
{
return ((struct definedness_hash_entry *)
bfd_hash_lookup (&definedness_table, name, FALSE, FALSE));
bfd_hash_lookup (&definedness_table, name, false, false));
}
/* Update the definedness state of NAME. Return FALSE if script symbol
is multiply defining a strong symbol in an object. */
static bfd_boolean
static bool
update_definedness (const char *name, struct bfd_link_hash_entry *h)
{
bfd_boolean ret;
bool ret;
struct definedness_hash_entry *defentry
= (struct definedness_hash_entry *)
bfd_hash_lookup (&definedness_table, name, TRUE, FALSE);
bfd_hash_lookup (&definedness_table, name, true, false);
if (defentry == NULL)
einfo (_("%F%P: bfd_hash_lookup failed creating symbol %s\n"), name);
/* If the symbol was already defined, and not by a script, then it
must be defined by an object file or by the linker target code. */
ret = TRUE;
ret = true;
if (!h->ldscript_def
&& (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak
@ -326,7 +326,7 @@ update_definedness (const char *name, struct bfd_link_hash_entry *h)
if (h->type == bfd_link_hash_defined
&& h->u.def.section->output_section != NULL
&& !h->linker_def)
ret = FALSE;
ret = false;
}
defentry->iteration = lang_statement_iteration;
@ -344,7 +344,7 @@ fold_segment_end (seg_align_type *seg)
if (expld.phase == lang_first_phase_enum
|| expld.section != bfd_abs_section_ptr)
{
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
}
else if (seg->phase == exp_seg_align_seen
|| seg->phase == exp_seg_relro_seen)
@ -359,7 +359,7 @@ fold_segment_end (seg_align_type *seg)
/* OK. */
}
else
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
}
static void
@ -374,7 +374,7 @@ fold_unary (etree_type *tree)
if (expld.phase != lang_first_phase_enum)
new_rel_from_abs (align_n (expld.dot, expld.result.value));
else
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
break;
case ABSOLUTE:
@ -405,7 +405,7 @@ fold_unary (etree_type *tree)
expld.result.value = align_n (expld.dot, expld.result.value);
}
else
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
break;
case DATA_SEGMENT_END:
@ -451,7 +451,7 @@ fold_segment_align (seg_align_type *seg, etree_value_type *lhs)
seg->relro = exp_seg_relro_start;
if (expld.phase == lang_first_phase_enum
|| expld.section != bfd_abs_section_ptr)
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
else
{
bfd_vma maxpage = lhs->value;
@ -482,7 +482,7 @@ fold_segment_align (seg_align_type *seg, etree_value_type *lhs)
seg->relro_end = 0;
}
else
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
}
}
}
@ -496,7 +496,7 @@ fold_segment_relro_end (seg_align_type *seg, etree_value_type *lhs)
seg->relro_offset = expld.result.value;
if (expld.phase == lang_first_phase_enum
|| expld.section != bfd_abs_section_ptr)
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
else if (seg->phase == exp_seg_align_seen
|| seg->phase == exp_seg_adjust
|| seg->phase == exp_seg_relro_adjust
@ -520,7 +520,7 @@ fold_segment_relro_end (seg_align_type *seg, etree_value_type *lhs)
seg->phase = exp_seg_relro_seen;
}
else
expld.result.valid_p = FALSE;
expld.result.valid_p = false;
}
static void
@ -552,7 +552,7 @@ fold_binary (etree_type *tree)
einfo (_("%P: warning: address of `%s' "
"isn't multiple of maximum page size\n"),
segment_name);
seg->used = TRUE;
seg->used = true;
value = seg->value;
break;
}
@ -710,7 +710,7 @@ fold_name (etree_type *tree)
h = bfd_wrapped_link_hash_lookup (link_info.output_bfd,
&link_info,
tree->name.name,
FALSE, FALSE, TRUE);
false, false, true);
new_number (h != NULL
&& (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak
@ -729,7 +729,7 @@ fold_name (etree_type *tree)
h = bfd_wrapped_link_hash_lookup (link_info.output_bfd,
&link_info,
tree->name.name,
TRUE, FALSE, TRUE);
true, false, true);
if (!h)
{
if (expld.phase != lang_first_phase_enum)
@ -872,7 +872,7 @@ fold_name (etree_type *tree)
{
lang_memory_region_type *mem;
mem = lang_memory_region_lookup (tree->name.name, FALSE);
mem = lang_memory_region_lookup (tree->name.name, false);
if (mem != NULL)
new_number (mem->length);
else
@ -886,7 +886,7 @@ fold_name (etree_type *tree)
{
lang_memory_region_type *mem;
mem = lang_memory_region_lookup (tree->name.name, FALSE);
mem = lang_memory_region_lookup (tree->name.name, false);
if (mem != NULL)
new_rel_from_abs (mem->origin);
else
@ -914,7 +914,7 @@ fold_name (etree_type *tree)
/* Return true if TREE is '.'. */
static bfd_boolean
static bool
is_dot (const etree_type *tree)
{
return (tree->type.node_class == etree_name
@ -925,7 +925,7 @@ is_dot (const etree_type *tree)
/* Return true if TREE is a constant equal to VAL. */
static bfd_boolean
static bool
is_value (const etree_type *tree, bfd_vma val)
{
return (tree->type.node_class == etree_value
@ -935,7 +935,7 @@ is_value (const etree_type *tree, bfd_vma val)
/* Return true if TREE is an absolute symbol equal to VAL defined in
a linker script. */
static bfd_boolean
static bool
is_sym_value (const etree_type *tree, bfd_vma val)
{
struct bfd_link_hash_entry *h;
@ -948,7 +948,7 @@ is_sym_value (const etree_type *tree, bfd_vma val)
&& (h = bfd_wrapped_link_hash_lookup (link_info.output_bfd,
&link_info,
tree->name.name,
FALSE, FALSE, TRUE)) != NULL
false, false, true)) != NULL
&& h->ldscript_def
&& h->type == bfd_link_hash_defined
&& h->u.def.section == bfd_abs_section_ptr
@ -957,7 +957,7 @@ is_sym_value (const etree_type *tree, bfd_vma val)
/* Return true if TREE is ". != 0". */
static bfd_boolean
static bool
is_dot_ne_0 (const etree_type *tree)
{
return (tree->type.node_class == etree_binary
@ -969,7 +969,7 @@ is_dot_ne_0 (const etree_type *tree)
/* Return true if TREE is ". = . + 0" or ". = . + sym" where sym is an
absolute constant with value 0 defined in a linker script. */
static bfd_boolean
static bool
is_dot_plus_0 (const etree_type *tree)
{
return (tree->type.node_class == etree_binary
@ -981,7 +981,7 @@ is_dot_plus_0 (const etree_type *tree)
/* Return true if TREE is "ALIGN (. != 0 ? some_expression : 1)". */
static bfd_boolean
static bool
is_align_conditional (const etree_type *tree)
{
if (tree->type.node_class == etree_unary
@ -992,7 +992,7 @@ is_align_conditional (const etree_type *tree)
&& is_dot_ne_0 (tree->trinary.cond)
&& is_value (tree->trinary.rhs, 1));
}
return FALSE;
return false;
}
static void
@ -1055,9 +1055,9 @@ exp_fold_tree_1 (etree_type *tree)
if (expld.phase != lang_first_phase_enum)
{
/* Notify the folder that this is an assignment to dot. */
expld.assigning_to_dot = TRUE;
expld.assigning_to_dot = true;
exp_fold_tree_1 (tree->assign.src);
expld.assigning_to_dot = FALSE;
expld.assigning_to_dot = false;
/* If we are assigning to dot inside an output section
arrange to keep the section, except for certain
@ -1126,7 +1126,7 @@ exp_fold_tree_1 (etree_type *tree)
if (tree->type.node_class == etree_provide)
{
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
FALSE, FALSE, TRUE);
false, false, true);
if (h == NULL
|| !(h->type == bfd_link_hash_new
|| h->type == bfd_link_hash_undefined
@ -1164,7 +1164,7 @@ exp_fold_tree_1 (etree_type *tree)
if (h == NULL)
{
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
TRUE, FALSE, TRUE);
true, false, true);
if (h == NULL)
einfo (_("%F%P:%s: hash creation failed\n"),
tree->assign.dst);
@ -1179,7 +1179,7 @@ exp_fold_tree_1 (etree_type *tree)
{
expld.result.value = 0;
expld.result.section = NULL;
expld.result.valid_p = TRUE;
expld.result.valid_p = true;
}
if (expld.result.valid_p)
@ -1231,7 +1231,7 @@ exp_fold_tree_1 (etree_type *tree)
{
bfd_copy_link_hash_symbol_type (link_info.output_bfd,
h, expld.assign_src);
expld.assign_src->non_ir_ref_regular = TRUE;
expld.assign_src->non_ir_ref_regular = true;
}
}
}
@ -1255,7 +1255,7 @@ exp_fold_tree_1 (etree_type *tree)
void
exp_fold_tree (etree_type *tree, asection *current_section, bfd_vma *dotp)
{
expld.rel_from_abs = FALSE;
expld.rel_from_abs = false;
expld.dot = *dotp;
expld.dotp = dotp;
expld.section = current_section;
@ -1265,7 +1265,7 @@ exp_fold_tree (etree_type *tree, asection *current_section, bfd_vma *dotp)
void
exp_fold_tree_no_dot (etree_type *tree)
{
expld.rel_from_abs = FALSE;
expld.rel_from_abs = false;
expld.dot = 0;
expld.dotp = NULL;
expld.section = bfd_abs_section_ptr;
@ -1363,7 +1363,7 @@ static etree_type *
exp_assop (const char *dst,
etree_type *src,
enum node_tree_enum class,
bfd_boolean hidden)
bool hidden)
{
etree_type *n;
@ -1381,7 +1381,7 @@ exp_assop (const char *dst,
/* Handle linker script assignments and HIDDEN. */
etree_type *
exp_assign (const char *dst, etree_type *src, bfd_boolean hidden)
exp_assign (const char *dst, etree_type *src, bool hidden)
{
return exp_assop (dst, src, etree_assign, hidden);
}
@ -1391,13 +1391,13 @@ exp_assign (const char *dst, etree_type *src, bfd_boolean hidden)
etree_type *
exp_defsym (const char *dst, etree_type *src)
{
return exp_assop (dst, src, etree_assign, FALSE);
return exp_assop (dst, src, etree_assign, false);
}
/* Handle PROVIDE. */
etree_type *
exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
exp_provide (const char *dst, etree_type *src, bool hidden)
{
return exp_assop (dst, src, etree_provide, hidden);
}
@ -1422,7 +1422,7 @@ exp_assert (etree_type *exp, const char *message)
void
exp_print_tree (etree_type *tree)
{
bfd_boolean function_like;
bool function_like;
if (config.map_file == NULL)
config.map_file = stderr;
@ -1445,7 +1445,7 @@ exp_print_tree (etree_type *tree)
return;
case etree_assign:
fputs (tree->assign.dst, config.map_file);
exp_print_token (tree->type.node_code, TRUE);
exp_print_token (tree->type.node_code, true);
exp_print_tree (tree->assign.src);
break;
case etree_provide:
@ -1455,7 +1455,7 @@ exp_print_tree (etree_type *tree)
fputc (')', config.map_file);
break;
case etree_binary:
function_like = FALSE;
function_like = false;
switch (tree->type.node_code)
{
case MAX_K:
@ -1463,12 +1463,12 @@ exp_print_tree (etree_type *tree)
case ALIGN_K:
case DATA_SEGMENT_ALIGN:
case DATA_SEGMENT_RELRO_END:
function_like = TRUE;
function_like = true;
break;
case SEGMENT_START:
/* Special handling because arguments are in reverse order and
the segment name is quoted. */
exp_print_token (tree->type.node_code, FALSE);
exp_print_token (tree->type.node_code, false);
fputs (" (\"", config.map_file);
exp_print_tree (tree->binary.rhs);
fputs ("\", ", config.map_file);
@ -1478,7 +1478,7 @@ exp_print_tree (etree_type *tree)
}
if (function_like)
{
exp_print_token (tree->type.node_code, FALSE);
exp_print_token (tree->type.node_code, false);
fputc (' ', config.map_file);
}
fputc ('(', config.map_file);
@ -1486,7 +1486,7 @@ exp_print_tree (etree_type *tree)
if (function_like)
fprintf (config.map_file, ", ");
else
exp_print_token (tree->type.node_code, TRUE);
exp_print_token (tree->type.node_code, true);
exp_print_tree (tree->binary.rhs);
fputc (')', config.map_file);
break;
@ -1498,7 +1498,7 @@ exp_print_tree (etree_type *tree)
exp_print_tree (tree->trinary.rhs);
break;
case etree_unary:
exp_print_token (tree->unary.type.node_code, FALSE);
exp_print_token (tree->unary.type.node_code, false);
if (tree->unary.child)
{
fprintf (config.map_file, " (");
@ -1518,7 +1518,7 @@ exp_print_tree (etree_type *tree)
fputs (tree->name.name, config.map_file);
else
{
exp_print_token (tree->type.node_code, FALSE);
exp_print_token (tree->type.node_code, false);
if (tree->name.name)
fprintf (config.map_file, " (%s)", tree->name.name);
}
@ -1673,7 +1673,7 @@ ldexp_init (void)
SEGMENT_START or ORIGIN) outside of an output section statement,
to section relative. */
static bfd_boolean
static bool
set_sym_sections (struct bfd_hash_entry *bh, void *inf ATTRIBUTE_UNUSED)
{
struct definedness_hash_entry *def = (struct definedness_hash_entry *) bh;
@ -1681,7 +1681,7 @@ set_sym_sections (struct bfd_hash_entry *bh, void *inf ATTRIBUTE_UNUSED)
{
struct bfd_link_hash_entry *h;
h = bfd_link_hash_lookup (link_info.hash, bh->string,
FALSE, FALSE, TRUE);
false, false, true);
if (h != NULL
&& h->type == bfd_link_hash_defined
&& h->u.def.section == bfd_abs_section_ptr)
@ -1690,7 +1690,7 @@ set_sym_sections (struct bfd_hash_entry *bh, void *inf ATTRIBUTE_UNUSED)
h->u.def.section = def->final_sec;
}
}
return TRUE;
return true;
}
void
@ -1702,7 +1702,7 @@ ldexp_finalize_syms (void)
/* Determine whether a symbol is going to remain absolute even after
ldexp_finalize_syms() has run. */
bfd_boolean
bool
ldexp_is_final_sym_absolute (const struct bfd_link_hash_entry *h)
{
if (h->type == bfd_link_hash_defined
@ -1711,14 +1711,14 @@ ldexp_is_final_sym_absolute (const struct bfd_link_hash_entry *h)
const struct definedness_hash_entry *def;
if (!h->ldscript_def)
return TRUE;
return true;
def = symbol_defined (h->root.string);
if (def != NULL)
return def->final_sec == bfd_abs_section_ptr;
}
return FALSE;
return false;
}
void

View File

@ -26,7 +26,7 @@ typedef struct {
bfd_vma value;
char *str;
asection *section;
bfd_boolean valid_p;
bool valid_p;
} etree_value_type;
enum node_tree_enum {
@ -66,7 +66,7 @@ typedef union etree_union {
node_type type;
const char *dst;
union etree_union *src;
bfd_boolean hidden;
bool hidden;
} assign;
struct {
node_type type;
@ -149,14 +149,14 @@ struct ldexp_control {
lang_phase_type phase;
/* Principally used for diagnostics. */
bfd_boolean assigning_to_dot;
bool assigning_to_dot;
/* Set if the current expression used "dot", SEGMENT_START or
ORIGIN, but not ABSOLUTE or combined symbols in a way that forces
an absolute result. Used in tracking symbols assigned from dot
outside of output section statements, in order to later convert
them from absolute. */
bfd_boolean rel_from_abs;
bool rel_from_abs;
/* If evaluating an assignment, the destination. Cleared if an
etree_name NAME matches this, to signal a self-assignment.
@ -193,7 +193,7 @@ typedef struct segment_struct {
bfd_vma value;
/* True if a SEGMENT_START directive corresponding to this segment
has been seen. */
bfd_boolean used;
bool used;
} segment_type;
/* The segments specified by the user on the command-line. */
@ -220,11 +220,11 @@ etree_type *exp_unop
etree_type *exp_nameop
(int, const char *);
etree_type *exp_assign
(const char *, etree_type *, bfd_boolean);
(const char *, etree_type *, bool);
etree_type *exp_defsym
(const char *, etree_type *);
etree_type *exp_provide
(const char *, etree_type *, bfd_boolean);
(const char *, etree_type *, bool);
etree_type *exp_assert
(etree_type *, const char *);
void exp_print_tree
@ -239,7 +239,7 @@ bfd_vma exp_get_abs_int
(etree_type *, int, char *);
void ldexp_init (void);
void ldexp_finalize_syms (void);
bfd_boolean ldexp_is_final_sym_absolute (const struct bfd_link_hash_entry *);
bool ldexp_is_final_sym_absolute (const struct bfd_link_hash_entry *);
void ldexp_finish (void);
#endif

View File

@ -39,7 +39,7 @@
#include "plugin.h"
#endif /* BFD_SUPPORTS_PLUGINS */
bfd_boolean ldfile_assumed_script = FALSE;
bool ldfile_assumed_script = false;
const char *ldfile_output_machine_name = "";
unsigned long ldfile_output_machine;
enum bfd_architecture ldfile_output_architecture;
@ -68,19 +68,19 @@ static search_arch_type **search_arch_tail_ptr = &search_arch_head;
/* Test whether a pathname, after canonicalization, is the same or a
sub-directory of the sysroot directory. */
static bfd_boolean
static bool
is_sysrooted_pathname (const char *name)
{
char *realname;
int len;
bfd_boolean result;
bool result;
if (ld_canon_sysroot == NULL)
return FALSE;
return false;
realname = lrealpath (name);
len = strlen (realname);
result = FALSE;
result = false;
if (len > ld_canon_sysroot_len
&& IS_DIR_SEPARATOR (realname[ld_canon_sysroot_len]))
{
@ -96,7 +96,7 @@ is_sysrooted_pathname (const char *name)
Makes a copy of NAME using xmalloc(). */
void
ldfile_add_library_path (const char *name, bfd_boolean cmdline)
ldfile_add_library_path (const char *name, bool cmdline)
{
search_dirs_type *new_dirs;
@ -121,7 +121,7 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
/* Try to open a BFD for a lang_input_statement. */
bfd_boolean
bool
ldfile_try_open_bfd (const char *attempt,
lang_input_statement_type *entry)
{
@ -139,7 +139,7 @@ ldfile_try_open_bfd (const char *attempt,
{
if (bfd_get_error () == bfd_error_invalid_target)
einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
return FALSE;
return false;
}
track_dependency_files (attempt);
@ -162,8 +162,8 @@ ldfile_try_open_bfd (const char *attempt,
a dynamic object.
In the code below, it's OK to exit early if the check fails,
closing the checked BFD and returning FALSE, but if the BFD
checks out compatible, do not exit early returning TRUE, or
closing the checked BFD and returning false, but if the BFD
checks out compatible, do not exit early returning true, or
the plugins will not get a chance to claim the file. */
if (entry->flags.search_dirs || !entry->flags.dynamic)
@ -191,7 +191,7 @@ ldfile_try_open_bfd (const char *attempt,
/* Try to interpret the file as a linker script. */
ldfile_open_command_file (attempt);
ldfile_assumed_script = TRUE;
ldfile_assumed_script = true;
parser_input = input_selected;
ldlex_both ();
token = INPUT_SCRIPT;
@ -258,7 +258,7 @@ ldfile_try_open_bfd (const char *attempt,
token = yylex ();
}
ldlex_popstate ();
ldfile_assumed_script = FALSE;
ldfile_assumed_script = false;
fclose (yyin);
yyin = NULL;
if (skip)
@ -269,7 +269,7 @@ ldfile_try_open_bfd (const char *attempt,
attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
return false;
}
}
goto success;
@ -281,7 +281,7 @@ ldfile_try_open_bfd (const char *attempt,
attempt);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
return false;
}
if (entry->flags.search_dirs
@ -299,7 +299,7 @@ ldfile_try_open_bfd (const char *attempt,
attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
return false;
}
}
}
@ -322,13 +322,13 @@ ldfile_try_open_bfd (const char *attempt,
/* It opened OK, the format checked out, and the plugins have had
their chance to claim it, so this is success. */
return TRUE;
return true;
}
/* Search for and open the file specified by ENTRY. If it is an
archive, use ARCH, LIB and SUFFIX to modify the file name. */
bfd_boolean
bool
ldfile_open_file_search (const char *arch,
lang_input_statement_type *entry,
const char *lib,
@ -347,15 +347,15 @@ ldfile_open_file_search (const char *arch,
if (ldfile_try_open_bfd (name, entry))
{
entry->filename = name;
return TRUE;
return true;
}
free (name);
}
else if (ldfile_try_open_bfd (entry->filename, entry))
return TRUE;
return true;
if (IS_ABSOLUTE_PATH (entry->filename))
return FALSE;
return false;
}
for (search = search_head; search != NULL; search = search->next)
@ -365,7 +365,7 @@ ldfile_open_file_search (const char *arch,
if (entry->flags.dynamic && !bfd_link_relocatable (&link_info))
{
if (ldemul_open_dynamic_archive (arch, search, entry))
return TRUE;
return true;
}
if (entry->flags.maybe_archive && !entry->flags.full_name_provided)
@ -378,13 +378,13 @@ ldfile_open_file_search (const char *arch,
if (ldfile_try_open_bfd (string, entry))
{
entry->filename = string;
return TRUE;
return true;
}
free (string);
}
return FALSE;
return false;
}
/* Open the input file specified by ENTRY.
@ -409,13 +409,13 @@ ldfile_open_file (lang_input_statement_type *entry)
else
einfo (_("%P: cannot find %s: %E\n"), entry->local_sym_name);
entry->flags.missing_file = TRUE;
input_flags.missing_file = TRUE;
entry->flags.missing_file = true;
input_flags.missing_file = true;
}
else
{
search_arch_type *arch;
bfd_boolean found = FALSE;
bool found = false;
/* If extra_search_path is set, entry->filename is a relative path.
Search the directory of the current linker script before searching
@ -427,7 +427,7 @@ ldfile_open_file (lang_input_statement_type *entry)
if (ldfile_try_open_bfd (path, entry))
{
entry->filename = path;
entry->flags.search_dirs = FALSE;
entry->flags.search_dirs = false;
return;
}
@ -453,7 +453,7 @@ ldfile_open_file (lang_input_statement_type *entry)
/* If we have found the file, we don't need to search directories
again. */
if (found)
entry->flags.search_dirs = FALSE;
entry->flags.search_dirs = false;
else
{
if (entry->flags.sysrooted
@ -513,8 +513,8 @@ ldfile_open_file (lang_input_statement_type *entry)
}
}
entry->flags.missing_file = TRUE;
input_flags.missing_file = TRUE;
entry->flags.missing_file = true;
input_flags.missing_file = true;
}
}
}
@ -522,7 +522,7 @@ ldfile_open_file (lang_input_statement_type *entry)
/* Try to open NAME. */
static FILE *
try_open (const char *name, bfd_boolean *sysrooted)
try_open (const char *name, bool *sysrooted)
{
FILE *result;
@ -544,12 +544,12 @@ try_open (const char *name, bfd_boolean *sysrooted)
/* Return TRUE iff directory DIR contains an "ldscripts" subdirectory. */
static bfd_boolean
static bool
check_for_scripts_dir (char *dir)
{
char *buf;
struct stat s;
bfd_boolean res;
bool res;
buf = concat (dir, "/ldscripts", (const char *) NULL);
res = stat (buf, &s) == 0 && S_ISDIR (s.st_mode);
@ -604,8 +604,8 @@ find_scripts_dir (void)
static FILE *
ldfile_find_command_file (const char *name,
bfd_boolean default_only,
bfd_boolean *sysrooted)
bool default_only,
bool *sysrooted)
{
search_dirs_type *search;
FILE *result = NULL;
@ -627,7 +627,7 @@ ldfile_find_command_file (const char *name,
{
search_dirs_type **save_tail_ptr = search_tail_ptr;
search_tail_ptr = &script_search;
ldfile_add_library_path (script_dir, TRUE);
ldfile_add_library_path (script_dir, true);
search_tail_ptr = save_tail_ptr;
}
}
@ -673,7 +673,7 @@ static void
ldfile_open_command_file_1 (const char *name, enum script_open_style open_how)
{
FILE *ldlex_input_stack;
bfd_boolean sysrooted;
bool sysrooted;
static struct script_name_list *processed_scripts = NULL;
struct script_name_list *script;
size_t len;

View File

@ -21,7 +21,7 @@
#ifndef LDFILE_H
#define LDFILE_H
extern bfd_boolean ldfile_assumed_script;
extern bool ldfile_assumed_script;
extern unsigned long ldfile_output_machine;
extern enum bfd_architecture ldfile_output_architecture;
extern const char *ldfile_output_machine_name;
@ -35,7 +35,7 @@ typedef struct search_dirs {
/* Name of directory. */
const char *name;
/* TRUE if this is from the command line. */
bfd_boolean cmdline;
bool cmdline;
} search_dirs_type;
extern search_dirs_type *search_head;
@ -43,7 +43,7 @@ extern search_dirs_type *search_head;
extern void ldfile_add_arch
(const char *);
extern void ldfile_add_library_path
(const char *, bfd_boolean cmdline);
(const char *, bool cmdline);
extern void ldfile_open_command_file
(const char *name);
extern void ldfile_open_script_file
@ -52,11 +52,11 @@ extern void ldfile_open_default_command_file
(const char *name);
extern void ldfile_open_file
(struct lang_input_statement_struct *);
extern bfd_boolean ldfile_try_open_bfd
extern bool ldfile_try_open_bfd
(const char *, struct lang_input_statement_struct *);
extern void ldfile_set_output_arch
(const char *, enum bfd_architecture);
extern bfd_boolean ldfile_open_file_search
extern bool ldfile_open_file_search
(const char *arch, struct lang_input_statement_struct *,
const char *lib, const char *suffix);

View File

@ -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);
}
;

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ typedef struct memory_region_struct
union lang_statement_union *last_os;
flagword flags;
flagword not_flags;
bfd_boolean had_full_message;
bool had_full_message;
} lang_memory_region_type;
enum statement_enum
@ -131,7 +131,7 @@ typedef struct lang_output_section_phdr_list
{
struct lang_output_section_phdr_list *next;
const char *name;
bfd_boolean used;
bool used;
} lang_output_section_phdr_list;
typedef struct lang_output_section_statement_struct
@ -343,7 +343,7 @@ typedef struct input_section_userdata_struct
unsigned long map_symbol_def_count;
} input_section_userdata_type;
static inline bfd_boolean
static inline bool
bfd_input_just_syms (const bfd *abfd)
{
lang_input_statement_type *is = bfd_usrdata (abfd);
@ -360,8 +360,8 @@ typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
callback_t callback,
void *data);
typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
bfd *, const asection *);
typedef bool (*lang_match_sec_type_func) (bfd *, const asection *,
bfd *, const asection *);
/* Binary search tree structure to efficiently sort sections by
name. */
@ -377,9 +377,9 @@ struct lang_wild_statement_struct
{
lang_statement_header_type header;
const char *filename;
bfd_boolean filenames_sorted;
bool filenames_sorted;
struct wildcard_list *section_list;
bfd_boolean keep_sections;
bool keep_sections;
lang_statement_list_type children;
struct name_list *exclude_name_list;
@ -421,7 +421,7 @@ typedef struct
{
lang_statement_header_type header;
const char *where;
bfd_boolean is_before;
bool is_before;
} lang_insert_statement_type;
typedef union lang_statement_union
@ -451,8 +451,8 @@ struct lang_phdr
struct lang_phdr *next;
const char *name;
unsigned long type;
bfd_boolean filehdr;
bfd_boolean phdrs;
bool filehdr;
bool phdrs;
etree_type *at;
etree_type *flags;
};
@ -472,7 +472,7 @@ struct lang_nocrossrefs
{
struct lang_nocrossrefs *next;
lang_nocrossref_type *list;
bfd_boolean onlyfirst;
bool onlyfirst;
};
/* This structure is used to hold a list of input section names which
@ -510,14 +510,14 @@ extern const char *output_target;
extern lang_output_section_statement_type *abs_output_section;
extern lang_statement_list_type lang_os_list;
extern struct lang_input_statement_flags input_flags;
extern bfd_boolean lang_has_input_file;
extern bool lang_has_input_file;
extern lang_statement_list_type statement_list;
extern lang_statement_list_type *stat_ptr;
extern bfd_boolean delete_output_file_on_failure;
extern bool delete_output_file_on_failure;
extern struct bfd_sym_chain entry_symbol;
extern const char *entry_section;
extern bfd_boolean entry_from_cmdline;
extern bool entry_from_cmdline;
extern lang_statement_list_type file_chain;
extern lang_statement_list_type input_file_chain;
@ -533,7 +533,7 @@ extern void lang_init
extern void lang_finish
(void);
extern lang_memory_region_type * lang_memory_region_lookup
(const char * const, bfd_boolean);
(const char * const, bool);
extern void lang_memory_region_alias
(const char *, const char *);
extern void lang_map
@ -548,19 +548,19 @@ extern lang_output_section_statement_type *lang_enter_output_section_statement
extern void lang_final
(void);
extern void lang_relax_sections
(bfd_boolean);
(bool);
extern void lang_process
(void);
extern void lang_section_start
(const char *, union etree_union *, const segment_type *);
extern void lang_add_entry
(const char *, bfd_boolean);
(const char *, bool);
extern void lang_default_entry
(const char *);
extern void lang_add_target
(const char *);
extern void lang_add_wild
(struct wildcard_spec *, struct wildcard_list *, bfd_boolean);
(struct wildcard_spec *, struct wildcard_list *, bool);
extern void lang_add_map
(const char *);
extern void lang_add_fill
@ -572,7 +572,7 @@ extern void lang_add_attribute
extern void lang_startup
(const char *);
extern void lang_float
(bfd_boolean);
(bool);
extern void lang_leave_output_section_statement
(fill_type *, const char *, lang_output_section_phdr_list *,
const char *);
@ -617,7 +617,7 @@ extern lang_output_section_statement_type *lang_output_section_statement_lookup
extern lang_output_section_statement_type *next_matching_output_section_statement
(lang_output_section_statement_type *, int);
extern void ldlang_add_undef
(const char *const, bfd_boolean);
(const char *const, bool);
extern void ldlang_add_require_defined
(const char *const);
extern void lang_add_output_format
@ -646,9 +646,9 @@ extern void lang_clear_os_map
extern void dprint_statement
(lang_statement_union_type *, int);
extern void lang_size_sections
(bfd_boolean *, bfd_boolean);
(bool *, bool);
extern void one_lang_size_sections_pass
(bfd_boolean *, bfd_boolean);
(bool *, bool);
extern void lang_add_insert
(const char *, int);
extern void lang_enter_group
@ -659,7 +659,7 @@ extern void lang_add_section
(lang_statement_list_type *, asection *, struct wildcard_list *,
struct flag_info *, lang_output_section_statement_type *);
extern void lang_new_phdr
(const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *,
(const char *, etree_type *, bool, bool, etree_type *,
etree_type *);
extern void lang_add_nocrossref
(lang_nocrossref_type *);
@ -676,7 +676,7 @@ extern void lang_leave_overlay
lang_output_section_phdr_list *, const char *);
extern struct bfd_elf_version_expr *lang_new_vers_pattern
(struct bfd_elf_version_expr *, const char *, const char *, bfd_boolean);
(struct bfd_elf_version_expr *, const char *, const char *, bool);
extern struct bfd_elf_version_tree *lang_new_vers_node
(struct bfd_elf_version_expr *, struct bfd_elf_version_expr *);
extern struct bfd_elf_version_deps *lang_add_vers_depend
@ -692,7 +692,7 @@ extern void lang_add_unique
extern const char *lang_get_output_target
(void);
extern void add_excluded_libs (const char *);
extern bfd_boolean load_symbols
extern bool load_symbols
(lang_input_statement_type *, lang_statement_list_type *);
struct elf_sym_strtab;
@ -703,9 +703,9 @@ extern void ldlang_ctf_new_dynsym
(int symidx, struct elf_internal_sym *);
extern void ldlang_write_ctf_late
(void);
extern bfd_boolean
extern bool
ldlang_override_segment_assignment
(struct bfd_link_info *, bfd *, asection *, asection *, bfd_boolean);
(struct bfd_link_info *, bfd *, asection *, asection *, bool);
extern void
lang_ld_feature (char *);
@ -716,7 +716,7 @@ lang_print_memory_usage (void);
extern void
lang_add_gc_name (const char *);
extern bfd_boolean
extern bool
print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr);
#endif

View File

@ -60,7 +60,7 @@
FILE *saved_script_handle = NULL;
FILE *previous_script_handle = NULL;
bfd_boolean force_make_executable = FALSE;
bool force_make_executable = false;
char *default_target;
const char *output_filename = "a.out";
@ -82,14 +82,14 @@ int g_switch_value = 8;
unsigned int trace_files;
/* Nonzero means report actions taken by the linker, and describe the linker script in use. */
bfd_boolean verbose;
bool verbose;
/* Nonzero means version number was printed, so exit successfully
instead of complaining if no input files are given. */
bfd_boolean version_printed;
bool version_printed;
/* TRUE if we should demangle symbol names. */
bfd_boolean demangling;
bool demangling;
args_type command_line;
@ -101,7 +101,7 @@ static const char *get_sysroot
(int, char **);
static char *get_emulation
(int, char **);
static bfd_boolean add_archive_element
static bool add_archive_element
(struct bfd_link_info *, bfd *, const char *, bfd **);
static void multiple_definition
(struct bfd_link_info *, struct bfd_link_hash_entry *,
@ -113,7 +113,7 @@ static void add_to_set
(struct bfd_link_info *, struct bfd_link_hash_entry *,
bfd_reloc_code_real_type, bfd *, asection *, bfd_vma);
static void constructor_callback
(struct bfd_link_info *, bfd_boolean, const char *, bfd *,
(struct bfd_link_info *, bool, const char *, bfd *,
asection *, bfd_vma);
static void warning_callback
(struct bfd_link_info *, const char *, const char *, bfd *,
@ -122,7 +122,7 @@ static void warning_find_reloc
(bfd *, asection *, void *);
static void undefined_symbol
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
bfd_boolean);
bool);
static void reloc_overflow
(struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
const char *, bfd_vma, bfd *, asection *, bfd_vma);
@ -130,7 +130,7 @@ static void reloc_dangerous
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static void unattached_reloc
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static bfd_boolean notice
static bool notice
(struct bfd_link_info *, struct bfd_link_hash_entry *,
struct bfd_link_hash_entry *, bfd *, asection *, bfd_vma, flagword);
@ -226,7 +226,7 @@ static void
ld_bfd_assert_handler (const char *fmt, const char *bfdver,
const char *file, int line)
{
config.make_executable = FALSE;
config.make_executable = false;
(*default_bfd_assert_handler) (fmt, bfdver, file, line);
}
@ -236,7 +236,7 @@ static void
ld_bfd_error_handler (const char *fmt, va_list ap)
{
if (config.fatal_warnings)
config.make_executable = FALSE;
config.make_executable = false;
(*default_bfd_error_handler) (fmt, ap);
}
@ -310,18 +310,18 @@ main (int argc, char **argv)
}
#endif
config.build_constructors = TRUE;
config.build_constructors = true;
config.rpath_separator = ':';
config.split_by_reloc = (unsigned) -1;
config.split_by_file = (bfd_size_type) -1;
config.make_executable = TRUE;
config.magic_demand_paged = TRUE;
config.text_read_only = TRUE;
config.print_map_discarded = TRUE;
config.make_executable = true;
config.magic_demand_paged = true;
config.text_read_only = true;
config.print_map_discarded = true;
link_info.disable_target_specific_optimizations = -1;
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.warn_mismatch = true;
command_line.warn_search_mismatch = true;
command_line.check_section_addresses = -1;
/* We initialize DEMANGLING based on the environment variable
@ -331,11 +331,11 @@ main (int argc, char **argv)
interface by default. */
demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
link_info.allow_undefined_version = TRUE;
link_info.keep_memory = TRUE;
link_info.combreloc = TRUE;
link_info.strip_discarded = TRUE;
link_info.prohibit_multiple_definition_absolute = FALSE;
link_info.allow_undefined_version = true;
link_info.keep_memory = true;
link_info.combreloc = true;
link_info.strip_discarded = true;
link_info.prohibit_multiple_definition_absolute = false;
link_info.textrel_check = DEFAULT_LD_TEXTREL_CHECK;
link_info.emit_hash = DEFAULT_EMIT_SYSV_HASH;
link_info.emit_gnu_hash = DEFAULT_EMIT_GNU_HASH;
@ -357,7 +357,7 @@ main (int argc, char **argv)
#ifdef DEFAULT_NEW_DTAGS
link_info.new_dtags = DEFAULT_NEW_DTAGS;
#endif
link_info.start_stop_gc = FALSE;
link_info.start_stop_gc = false;
link_info.start_stop_visibility = STV_PROTECTED;
ldfile_add_arch ("");
@ -367,7 +367,7 @@ main (int argc, char **argv)
lang_init ();
ldexp_init ();
ldemul_before_parse ();
lang_has_input_file = FALSE;
lang_has_input_file = false;
parse_args (argc, argv);
if (config.hash_table_size != 0)
@ -444,9 +444,9 @@ main (int argc, char **argv)
if (command_line.force_group_allocation
|| !bfd_link_relocatable (&link_info))
link_info.resolve_section_groups = TRUE;
link_info.resolve_section_groups = true;
else
link_info.resolve_section_groups = FALSE;
link_info.resolve_section_groups = false;
if (command_line.print_output_format)
info_msg ("%s\n", lang_get_output_target ());
@ -491,7 +491,7 @@ main (int argc, char **argv)
config.map_filename);
}
}
link_info.has_map_file = TRUE;
link_info.has_map_file = true;
}
lang_process ();
@ -749,7 +749,7 @@ add_ysym (const char *name)
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.notice_hash, name, TRUE, TRUE) == NULL)
if (bfd_hash_lookup (link_info.notice_hash, name, true, true) == NULL)
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
@ -766,7 +766,7 @@ add_ignoresym (struct bfd_link_info *info, const char *name)
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL)
if (bfd_hash_lookup (info->ignore_hash, name, true, true) == NULL)
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
@ -786,7 +786,7 @@ add_wrap (const char *name)
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.wrap_hash, name, TRUE, TRUE) == NULL)
if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
@ -844,7 +844,7 @@ add_keepsyms_file (const char *filename)
buf[len] = '\0';
if (bfd_hash_lookup (link_info.keep_hash, buf, TRUE, TRUE) == NULL)
if (bfd_hash_lookup (link_info.keep_hash, buf, true, true) == NULL)
einfo (_("%F%P: bfd_hash_lookup for insertion failed: %E\n"));
}
}
@ -862,7 +862,7 @@ add_keepsyms_file (const char *filename)
/* This is called when BFD has decided to include an archive member in
a link. */
static bfd_boolean
static bool
add_archive_element (struct bfd_link_info *info,
bfd *abfd,
const char *name,
@ -898,9 +898,9 @@ add_archive_element (struct bfd_link_info *info,
info_msg ("%pI: no new IR symbols to claim\n",
&orig_input);
input->flags.claimed = 0;
return FALSE;
return false;
}
input->flags.claim_archive = TRUE;
input->flags.claim_archive = true;
*subsbfd = input->the_bfd;
}
}
@ -914,7 +914,7 @@ add_archive_element (struct bfd_link_info *info,
match actual symbols defined by the element. */
free (input);
bfd_set_error (bfd_error_malformed_archive);
return FALSE;
return false;
}
/* Set the file_chain pointer of archives to the last element loaded
@ -927,16 +927,16 @@ add_archive_element (struct bfd_link_info *info,
if (config.map_file != NULL)
{
static bfd_boolean header_printed;
static bool header_printed;
struct bfd_link_hash_entry *h;
bfd *from;
int len;
h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
h = bfd_link_hash_lookup (info->hash, name, false, false, true);
if (h == NULL
&& info->pei386_auto_import
&& startswith (name, "__imp_"))
h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE);
h = bfd_link_hash_lookup (info->hash, name + 6, false, false, true);
if (h == NULL)
from = NULL;
@ -967,7 +967,7 @@ add_archive_element (struct bfd_link_info *info,
if (!header_printed)
{
minfo (_("Archive member included to satisfy reference by file (symbol)\n\n"));
header_printed = TRUE;
header_printed = true;
}
if (abfd->my_archive == NULL
@ -1008,7 +1008,7 @@ add_archive_element (struct bfd_link_info *info,
|| trace_files > 1
|| (trace_files && bfd_is_thin_archive (orig_input.the_bfd->my_archive)))
info_msg ("%pI\n", &orig_input);
return TRUE;
return true;
}
/* This is called when BFD has discovered a symbol which is defined
@ -1233,7 +1233,7 @@ add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
static void
constructor_callback (struct bfd_link_info *info,
bfd_boolean constructor,
bool constructor,
const char *name,
bfd *abfd,
asection *section,
@ -1264,7 +1264,7 @@ constructor_callback (struct bfd_link_info *info,
else
strcpy (s, "__DTOR_LIST__");
h = bfd_link_hash_lookup (info->hash, set_name, TRUE, TRUE, TRUE);
h = bfd_link_hash_lookup (info->hash, set_name, 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)
@ -1284,7 +1284,7 @@ constructor_callback (struct bfd_link_info *info,
struct warning_callback_info
{
bfd_boolean found;
bool found;
const char *warning;
const char *symbol;
asymbol **asymbols;
@ -1293,7 +1293,7 @@ struct warning_callback_info
/* Look through the relocs to see if we can find a plausible address
for SYMBOL in ABFD. Return TRUE if found. Otherwise return FALSE. */
static bfd_boolean
static bool
symbol_warning (const char *warning, const char *symbol, bfd *abfd)
{
struct warning_callback_info cinfo;
@ -1301,7 +1301,7 @@ symbol_warning (const char *warning, const char *symbol, bfd *abfd)
if (!bfd_generic_link_read_symbols (abfd))
einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
cinfo.found = FALSE;
cinfo.found = false;
cinfo.warning = warning;
cinfo.symbol = symbol;
cinfo.asymbols = bfd_get_outsymbols (abfd);
@ -1383,7 +1383,7 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
/* We found a reloc for the symbol we are looking for. */
einfo ("%P: %C: %s%s\n", abfd, sec, q->address, _("warning: "),
info->warning);
info->found = TRUE;
info->found = true;
break;
}
}
@ -1403,7 +1403,7 @@ undefined_symbol (struct bfd_link_info *info,
bfd *abfd,
asection *section,
bfd_vma address,
bfd_boolean error)
bool error)
{
static char *error_name;
static unsigned int error_count;
@ -1411,7 +1411,7 @@ undefined_symbol (struct bfd_link_info *info,
#define MAX_ERRORS_IN_A_ROW 5
if (info->ignore_hash != NULL
&& bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
&& bfd_hash_lookup (info->ignore_hash, name, false, false) != NULL)
return;
if (config.warn_once)
@ -1616,7 +1616,7 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
linker script; and if plugins are active, since they need to monitor
all references from non-IR files. */
static bfd_boolean
static bool
notice (struct bfd_link_info *info,
struct bfd_link_hash_entry *h,
struct bfd_link_hash_entry *inh ATTRIBUTE_UNUSED,
@ -1631,12 +1631,12 @@ notice (struct bfd_link_info *info,
{
if (command_line.cref || nocrossref_list != NULL)
return handle_asneeded_cref (abfd, (enum notice_asneeded_action) value);
return TRUE;
return true;
}
name = h->root.string;
if (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL)
&& bfd_hash_lookup (info->notice_hash, name, false, false) != NULL)
{
if (bfd_is_und_section (section))
einfo (_("%P: %pB: reference to %s\n"), abfd, name);
@ -1647,5 +1647,5 @@ notice (struct bfd_link_info *info,
if (command_line.cref || nocrossref_list != NULL)
add_cref (name, abfd, section, value);
return TRUE;
return true;
}

View File

@ -27,12 +27,12 @@ extern char *ld_canon_sysroot;
extern int ld_canon_sysroot_len;
extern FILE *saved_script_handle;
extern FILE *previous_script_handle;
extern bfd_boolean force_make_executable;
extern bool force_make_executable;
extern char *default_target;
extern unsigned int trace_files;
extern bfd_boolean verbose;
extern bfd_boolean version_printed;
extern bfd_boolean demangling;
extern bool verbose;
extern bool version_printed;
extern bool demangling;
extern int g_switch_value;
extern const char *output_filename;
extern struct bfd_link_info link_info;

View File

@ -66,9 +66,9 @@
*/
void
vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
{
bfd_boolean fatal = FALSE;
bool fatal = false;
const char *scan;
int arg_type;
unsigned int arg_count = 0;
@ -235,7 +235,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
case 'X':
/* no object output, fail return */
config.make_executable = FALSE;
config.make_executable = false;
break;
case 'V':
@ -291,7 +291,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
case 'F':
/* Error is fatal. */
fatal = TRUE;
fatal = true;
break;
case 'P':
@ -321,8 +321,8 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
const char *filename;
const char *functionname;
unsigned int linenumber;
bfd_boolean discard_last;
bfd_boolean done;
bool discard_last;
bool done;
bfd_error_type last_bfd_error = bfd_get_error ();
abfd = args[arg_no].reladdr.abfd;
@ -346,7 +346,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
We do not always have a line number available so if
we cannot find them we print out the section name and
offset instead. */
discard_last = TRUE;
discard_last = true;
if (abfd != NULL
&& bfd_find_nearest_line (abfd, section, asymbols, offset,
&filename, &functionname,
@ -383,7 +383,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
free (last_function);
last_function = xstrdup (functionname);
}
discard_last = FALSE;
discard_last = false;
}
else
lfinfo (fp, "%pB:", abfd);
@ -397,12 +397,12 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
else if (filename != NULL && linenumber != 0)
fprintf (fp, "%u%s", linenumber, done ? "" : ":");
else
done = FALSE;
done = false;
}
else
{
lfinfo (fp, "%pB:", abfd);
done = FALSE;
done = false;
}
if (!done)
lfinfo (fp, "(%pA+0x%v)", section, offset);
@ -581,7 +581,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
}
if (is_warning && config.fatal_warnings)
config.make_executable = FALSE;
config.make_executable = false;
if (fatal)
xexit (1);
@ -598,7 +598,7 @@ info_msg (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
vfinfo (stdout, fmt, arg, FALSE);
vfinfo (stdout, fmt, arg, false);
va_end (arg);
}
@ -611,7 +611,7 @@ einfo (const char *fmt, ...)
fflush (stdout);
va_start (arg, fmt);
vfinfo (stderr, fmt, arg, TRUE);
vfinfo (stderr, fmt, arg, true);
va_end (arg);
fflush (stderr);
}
@ -647,7 +647,7 @@ minfo (const char *fmt, ...)
asneeded_list_tail = &m->next;
}
else
vfinfo (config.map_file, fmt, arg, FALSE);
vfinfo (config.map_file, fmt, arg, false);
va_end (arg);
}
}
@ -658,7 +658,7 @@ lfinfo (FILE *file, const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
vfinfo (file, fmt, arg, FALSE);
vfinfo (file, fmt, arg, false);
va_end (arg);
}

View File

@ -21,7 +21,7 @@
#ifndef LDMISC_H
#define LDMISC_H
extern void vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning);
extern void vfinfo (FILE *fp, const char *fmt, va_list arg, bool is_warning);
extern void einfo (const char *, ...);
extern void minfo (const char *, ...);
extern void info_msg (const char *, ...);

View File

@ -278,7 +278,7 @@ build_link_order (lang_statement_union_type *statement)
/* Return true if NAME is the name of an unsplittable section. These
are the stabs strings, dwarf strings. */
static bfd_boolean
static bool
unsplittable_name (const char *name)
{
if (startswith (name, ".stab"))
@ -287,11 +287,11 @@ unsplittable_name (const char *name)
".stab...str" */
unsigned len = strlen (name);
if (strcmp (&name[len-3], "str") == 0)
return TRUE;
return true;
}
else if (strcmp (name, "$GDB_STRINGS$") == 0)
return TRUE;
return FALSE;
return true;
return false;
}
/* Wander around the input sections, make sure that
@ -339,7 +339,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
if ((sname = bfd_get_unique_section_name (abfd, tname, count)) == NULL
|| (n = bfd_make_section_anyway (abfd, sname)) == NULL
|| (h = bfd_link_hash_lookup (link_info.hash,
sname, TRUE, TRUE, FALSE)) == NULL)
sname, true, true, false)) == NULL)
{
einfo (_("%F%P: clone section failed: %E\n"));
/* Silence gcc warnings. einfo exits, so we never reach here. */

View File

@ -805,10 +805,10 @@ parse_args (unsigned argc, char **argv)
``use only shared libraries'' but, then, we don't
currently support shared libraries on HP/UX anyhow. */
if (strcmp (optarg, "archive") == 0)
input_flags.dynamic = FALSE;
input_flags.dynamic = false;
else if (strcmp (optarg, "shared") == 0
|| strcmp (optarg, "default") == 0)
input_flags.dynamic = TRUE;
input_flags.dynamic = true;
else
einfo (_("%F%P: unrecognized -a option `%s'\n"), optarg);
break;
@ -837,20 +837,20 @@ parse_args (unsigned argc, char **argv)
yyparse ();
break;
case OPTION_CALL_SHARED:
input_flags.dynamic = TRUE;
input_flags.dynamic = true;
break;
case OPTION_NON_SHARED:
input_flags.dynamic = FALSE;
input_flags.dynamic = false;
break;
case OPTION_CREF:
command_line.cref = TRUE;
link_info.notice_all = TRUE;
command_line.cref = true;
link_info.notice_all = true;
break;
case 'd':
command_line.force_common_definition = TRUE;
command_line.force_common_definition = true;
break;
case OPTION_FORCE_GROUP_ALLOCATION:
command_line.force_group_allocation = TRUE;
command_line.force_group_allocation = true;
break;
case OPTION_DEFSYM:
lex_string = optarg;
@ -860,7 +860,7 @@ parse_args (unsigned argc, char **argv)
lex_string = NULL;
break;
case OPTION_DEMANGLE:
demangling = TRUE;
demangling = true;
if (optarg != NULL)
{
enum demangling_styles style;
@ -891,23 +891,23 @@ parse_args (unsigned argc, char **argv)
command_line.endian = ENDIAN_LITTLE;
break;
case OPTION_EMBEDDED_RELOCS:
command_line.embedded_relocs = TRUE;
command_line.embedded_relocs = true;
break;
case OPTION_EXPORT_DYNAMIC:
case 'E': /* HP/UX compatibility. */
link_info.export_dynamic = TRUE;
link_info.export_dynamic = true;
break;
case OPTION_NO_EXPORT_DYNAMIC:
link_info.export_dynamic = FALSE;
link_info.export_dynamic = false;
break;
case OPTION_NON_CONTIGUOUS_REGIONS:
link_info.non_contiguous_regions = TRUE;
link_info.non_contiguous_regions = true;
break;
case OPTION_NON_CONTIGUOUS_REGIONS_WARNINGS:
link_info.non_contiguous_regions_warnings = TRUE;
link_info.non_contiguous_regions_warnings = true;
break;
case 'e':
lang_add_entry (optarg, TRUE);
lang_add_entry (optarg, true);
break;
case 'f':
if (command_line.auxiliary_filters == NULL)
@ -936,7 +936,7 @@ parse_args (unsigned argc, char **argv)
command_line.filter_shlib = optarg;
break;
case OPTION_FORCE_EXE_SUFFIX:
command_line.force_exe_suffix = TRUE;
command_line.force_exe_suffix = true;
break;
case 'G':
{
@ -950,20 +950,20 @@ parse_args (unsigned argc, char **argv)
/* Ignore. */
break;
case OPTION_GC_SECTIONS:
link_info.gc_sections = TRUE;
link_info.gc_sections = true;
break;
case OPTION_PRINT_GC_SECTIONS:
link_info.print_gc_sections = TRUE;
link_info.print_gc_sections = true;
break;
case OPTION_GC_KEEP_EXPORTED:
link_info.gc_keep_exported = TRUE;
link_info.gc_keep_exported = true;
break;
case OPTION_HELP:
help ();
xexit (0);
break;
case 'L':
ldfile_add_library_path (optarg, TRUE);
ldfile_add_library_path (optarg, true);
break;
case 'l':
lang_add_input_file (optarg, lang_input_file_is_l_enum, NULL);
@ -978,35 +978,35 @@ parse_args (unsigned argc, char **argv)
config.map_filename = optarg;
break;
case 'N':
config.text_read_only = FALSE;
config.magic_demand_paged = FALSE;
input_flags.dynamic = FALSE;
config.text_read_only = false;
config.magic_demand_paged = false;
input_flags.dynamic = false;
break;
case OPTION_NO_OMAGIC:
config.text_read_only = TRUE;
config.magic_demand_paged = TRUE;
config.text_read_only = true;
config.magic_demand_paged = true;
/* NB/ Does not set input_flags.dynamic to TRUE.
Use --call-shared or -Bdynamic for this. */
break;
case 'n':
config.text_read_only = TRUE;
config.magic_demand_paged = FALSE;
input_flags.dynamic = FALSE;
config.text_read_only = true;
config.magic_demand_paged = false;
input_flags.dynamic = false;
break;
case OPTION_NO_DEFINE_COMMON:
link_info.inhibit_common_definition = TRUE;
link_info.inhibit_common_definition = true;
break;
case OPTION_NO_DEMANGLE:
demangling = FALSE;
demangling = false;
break;
case OPTION_NO_GC_SECTIONS:
link_info.gc_sections = FALSE;
link_info.gc_sections = false;
break;
case OPTION_NO_PRINT_GC_SECTIONS:
link_info.print_gc_sections = FALSE;
link_info.print_gc_sections = false;
break;
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = FALSE;
link_info.keep_memory = false;
break;
case OPTION_NO_UNDEFINED:
link_info.unresolved_syms_in_objects = RM_DIAGNOSE;
@ -1042,13 +1042,13 @@ parse_args (unsigned argc, char **argv)
einfo (_("%F%P: bad --unresolved-symbols option: %s\n"), optarg);
break;
case OPTION_WARN_UNRESOLVED_SYMBOLS:
link_info.warn_unresolved_syms = TRUE;
link_info.warn_unresolved_syms = true;
break;
case OPTION_ERROR_UNRESOLVED_SYMBOLS:
link_info.warn_unresolved_syms = FALSE;
link_info.warn_unresolved_syms = false;
break;
case OPTION_ALLOW_MULTIPLE_DEFINITION:
link_info.allow_multiple_definition = TRUE;
link_info.allow_multiple_definition = true;
break;
#if SUPPORT_ERROR_HANDLING_SCRIPT
@ -1060,28 +1060,28 @@ parse_args (unsigned argc, char **argv)
#endif
case OPTION_NO_UNDEFINED_VERSION:
link_info.allow_undefined_version = FALSE;
link_info.allow_undefined_version = false;
break;
case OPTION_DEFAULT_SYMVER:
link_info.create_default_symver = TRUE;
link_info.create_default_symver = true;
break;
case OPTION_DEFAULT_IMPORTED_SYMVER:
link_info.default_imported_symver = TRUE;
link_info.default_imported_symver = true;
break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = FALSE;
command_line.warn_mismatch = false;
break;
case OPTION_NO_WARN_SEARCH_MISMATCH:
command_line.warn_search_mismatch = FALSE;
command_line.warn_search_mismatch = false;
break;
case OPTION_NOINHIBIT_EXEC:
force_make_executable = TRUE;
force_make_executable = true;
break;
case OPTION_NOSTDLIB:
config.only_cmd_line_lib_dirs = TRUE;
config.only_cmd_line_lib_dirs = true;
break;
case OPTION_NO_WHOLE_ARCHIVE:
input_flags.whole_archive = FALSE;
input_flags.whole_archive = false;
break;
case 'O':
/* FIXME "-O<non-digits> <value>" used to set the address of
@ -1108,7 +1108,7 @@ parse_args (unsigned argc, char **argv)
xexit (0);
break;
case OPTION_PRINT_OUTPUT_FORMAT:
command_line.print_output_format = TRUE;
command_line.print_output_format = true;
break;
#if BFD_SUPPORTS_PLUGINS
case OPTION_PLUGIN:
@ -1120,7 +1120,7 @@ parse_args (unsigned argc, char **argv)
break;
#endif /* BFD_SUPPORTS_PLUGINS */
case 'q':
link_info.emitrelocations = TRUE;
link_info.emitrelocations = true;
break;
case 'i':
case 'r':
@ -1140,10 +1140,10 @@ parse_args (unsigned argc, char **argv)
bfd_link_dll (&link_info) ? "-shared" : "-pie");
link_info.type = type_relocatable;
config.build_constructors = FALSE;
config.magic_demand_paged = FALSE;
config.text_read_only = FALSE;
input_flags.dynamic = FALSE;
config.build_constructors = false;
config.magic_demand_paged = false;
config.text_read_only = false;
input_flags.dynamic = false;
break;
case 'R':
/* The GNU linker traditionally uses -R to mean to include
@ -1234,13 +1234,13 @@ parse_args (unsigned argc, char **argv)
link_info.strip = strip_all;
break;
case OPTION_STRIP_DISCARDED:
link_info.strip_discarded = TRUE;
link_info.strip_discarded = true;
break;
case OPTION_NO_STRIP_DISCARDED:
link_info.strip_discarded = FALSE;
link_info.strip_discarded = false;
break;
case OPTION_DISABLE_MULTIPLE_DEFS_ABS:
link_info.prohibit_multiple_definition_absolute = TRUE;
link_info.prohibit_multiple_definition_absolute = true;
break;
case OPTION_SHARED:
if (config.has_shared)
@ -1299,7 +1299,7 @@ parse_args (unsigned argc, char **argv)
optarg);
break;
case OPTION_STATS:
config.stats = TRUE;
config.stats = true;
break;
case OPTION_SYMBOLIC:
opt_symbolic = symbolic;
@ -1373,10 +1373,10 @@ parse_args (unsigned argc, char **argv)
set_segment_start (".ldata-segment", optarg);
break;
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = TRUE;
link_info.traditional_format = true;
break;
case OPTION_TASK_LINK:
link_info.task_link = TRUE;
link_info.task_link = true;
/* Fall through. */
case OPTION_UR:
if (bfd_link_pic (&link_info))
@ -1384,13 +1384,13 @@ parse_args (unsigned argc, char **argv)
bfd_link_dll (&link_info) ? "-shared" : "-pie");
link_info.type = type_relocatable;
config.build_constructors = TRUE;
config.magic_demand_paged = FALSE;
config.text_read_only = FALSE;
input_flags.dynamic = FALSE;
config.build_constructors = true;
config.magic_demand_paged = false;
config.text_read_only = false;
input_flags.dynamic = false;
break;
case 'u':
ldlang_add_undef (optarg, TRUE);
ldlang_add_undef (optarg, true);
break;
case OPTION_REQUIRE_DEFINED_SYMBOL:
ldlang_add_require_defined (optarg);
@ -1399,12 +1399,12 @@ parse_args (unsigned argc, char **argv)
if (optarg != NULL)
lang_add_unique (optarg);
else
config.unique_orphan_sections = TRUE;
config.unique_orphan_sections = true;
break;
case OPTION_VERBOSE:
ldversion (1);
version_printed = TRUE;
verbose = TRUE;
version_printed = true;
verbose = true;
overflow_cutoff_limit = -2;
if (optarg != NULL)
{
@ -1419,11 +1419,11 @@ parse_args (unsigned argc, char **argv)
break;
case 'v':
ldversion (0);
version_printed = TRUE;
version_printed = true;
break;
case 'V':
ldversion (1);
version_printed = TRUE;
version_printed = true;
break;
case OPTION_VERSION:
ldversion (2);
@ -1483,7 +1483,7 @@ parse_args (unsigned argc, char **argv)
{
struct bfd_elf_version_expr *expr
= lang_new_vers_pattern (NULL, xstrdup (optarg), NULL,
FALSE);
false);
lang_append_dynamic_list (&export_list, expr);
}
break;
@ -1503,46 +1503,46 @@ parse_args (unsigned argc, char **argv)
}
break;
case OPTION_WARN_COMMON:
config.warn_common = TRUE;
config.warn_common = true;
break;
case OPTION_WARN_CONSTRUCTORS:
config.warn_constructors = TRUE;
config.warn_constructors = true;
break;
case OPTION_WARN_FATAL:
config.fatal_warnings = TRUE;
config.fatal_warnings = true;
break;
case OPTION_NO_WARN_FATAL:
config.fatal_warnings = FALSE;
config.fatal_warnings = false;
break;
case OPTION_WARN_MULTIPLE_GP:
config.warn_multiple_gp = TRUE;
config.warn_multiple_gp = true;
break;
case OPTION_WARN_ONCE:
config.warn_once = TRUE;
config.warn_once = true;
break;
case OPTION_WARN_SECTION_ALIGN:
config.warn_section_align = TRUE;
config.warn_section_align = true;
break;
case OPTION_WARN_TEXTREL:
link_info.textrel_check = textrel_check_warning;
break;
case OPTION_WARN_ALTERNATE_EM:
link_info.warn_alternate_em = TRUE;
link_info.warn_alternate_em = true;
break;
case OPTION_WHOLE_ARCHIVE:
input_flags.whole_archive = TRUE;
input_flags.whole_archive = true;
break;
case OPTION_ADD_DT_NEEDED_FOR_DYNAMIC:
input_flags.add_DT_NEEDED_for_dynamic = TRUE;
input_flags.add_DT_NEEDED_for_dynamic = true;
break;
case OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC:
input_flags.add_DT_NEEDED_for_dynamic = FALSE;
input_flags.add_DT_NEEDED_for_dynamic = false;
break;
case OPTION_ADD_DT_NEEDED_FOR_REGULAR:
input_flags.add_DT_NEEDED_for_regular = TRUE;
input_flags.add_DT_NEEDED_for_regular = true;
break;
case OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR:
input_flags.add_DT_NEEDED_for_regular = FALSE;
input_flags.add_DT_NEEDED_for_regular = false;
break;
case OPTION_WRAP:
add_wrap (optarg);
@ -1590,10 +1590,10 @@ parse_args (unsigned argc, char **argv)
command_line.check_section_addresses = 0;
break;
case OPTION_ACCEPT_UNKNOWN_INPUT_ARCH:
command_line.accept_unknown_input_arch = TRUE;
command_line.accept_unknown_input_arch = true;
break;
case OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH:
command_line.accept_unknown_input_arch = FALSE;
command_line.accept_unknown_input_arch = false;
break;
case '(':
lang_enter_group ();
@ -1616,7 +1616,7 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_REDUCE_MEMORY_OVERHEADS:
link_info.reduce_memory_overheads = TRUE;
link_info.reduce_memory_overheads = true;
if (config.hash_table_size == 0)
config.hash_table_size = 1021;
break;
@ -1651,7 +1651,7 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_PRINT_MEMORY_USAGE:
command_line.print_memory_usage = TRUE;
command_line.print_memory_usage = true;
break;
case OPTION_ORPHAN_HANDLING:
@ -1669,11 +1669,11 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_NO_PRINT_MAP_DISCARDED:
config.print_map_discarded = FALSE;
config.print_map_discarded = false;
break;
case OPTION_PRINT_MAP_DISCARDED:
config.print_map_discarded = TRUE;
config.print_map_discarded = true;
break;
case OPTION_DEPENDENCY_FILE:
@ -1681,18 +1681,18 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_CTF_VARIABLES:
config.ctf_variables = TRUE;
config.ctf_variables = true;
break;
case OPTION_NO_CTF_VARIABLES:
config.ctf_variables = FALSE;
config.ctf_variables = false;
break;
case OPTION_CTF_SHARE_TYPES:
if (strcmp (optarg, "share-unconflicted") == 0)
config.ctf_share_duplicated = FALSE;
config.ctf_share_duplicated = false;
else if (strcmp (optarg, "share-duplicated") == 0)
config.ctf_share_duplicated = TRUE;
config.ctf_share_duplicated = true;
else
einfo (_("%F%P: bad --ctf-share-types option: %s\n"), optarg);
break;
@ -1851,10 +1851,10 @@ parse_args (unsigned argc, char **argv)
case dynamic_list_unset:
break;
case dynamic_list_data:
link_info.dynamic_data = TRUE;
link_info.dynamic_data = true;
/* Fall through. */
case dynamic_list:
link_info.dynamic = TRUE;
link_info.dynamic = true;
opt_symbolic = symbolic_unset;
break;
}
@ -1866,7 +1866,7 @@ parse_args (unsigned argc, char **argv)
case symbolic_unset:
break;
case symbolic:
link_info.symbolic = TRUE;
link_info.symbolic = true;
if (link_info.dynamic_list)
{
struct bfd_elf_version_expr *ent, *next;
@ -1880,8 +1880,8 @@ parse_args (unsigned argc, char **argv)
}
break;
case symbolic_functions:
link_info.dynamic = TRUE;
link_info.dynamic_data = TRUE;
link_info.dynamic = true;
link_info.dynamic_data = true;
break;
}
@ -1918,7 +1918,7 @@ set_default_dirlist (char *dirlist_ptr)
if (p != NULL)
*p = '\0';
if (*dirlist_ptr != '\0')
ldfile_add_library_path (dirlist_ptr, TRUE);
ldfile_add_library_path (dirlist_ptr, true);
if (p == NULL)
break;
dirlist_ptr = p + 1;
@ -1960,7 +1960,7 @@ set_segment_start (const char *section, char *valstr)
seg = stat_alloc (sizeof (*seg));
seg->name = name;
seg->value = val;
seg->used = FALSE;
seg->used = false;
/* Add it to the linked list of segments. */
seg->next = segments;
segments = seg;
@ -2149,8 +2149,7 @@ elf_plt_unwind_list_options (FILE *file)
}
static void
ld_list_options (FILE *file, bfd_boolean elf, bfd_boolean shlib,
bfd_boolean plt_unwind)
ld_list_options (FILE *file, bool elf, bool shlib, bool plt_unwind)
{
if (!elf)
return;
@ -2179,12 +2178,12 @@ help (void)
{
if (ld_options[i].doc != NULL)
{
bfd_boolean comma;
bool comma;
unsigned j;
printf (" ");
comma = FALSE;
comma = false;
len = 2;
j = i;
@ -2205,7 +2204,7 @@ help (void)
printf ("%s", _(ld_options[j].arg));
len += strlen (_(ld_options[j].arg));
}
comma = TRUE;
comma = true;
}
++j;
}
@ -2234,7 +2233,7 @@ help (void)
printf (" %s", _(ld_options[j].arg));
len += 1 + strlen (_(ld_options[j].arg));
}
comma = TRUE;
comma = true;
}
++j;
}

View File

@ -219,7 +219,7 @@ mri_draw_tree (void)
tmp->spec.exclude_name_list = NULL;
tmp->spec.sorted = none;
tmp->spec.section_flag_list = NULL;
lang_add_wild (NULL, tmp, FALSE);
lang_add_wild (NULL, tmp, false);
/* If there is an alias for this section, add it too. */
for (aptr = alias; aptr; aptr = aptr->next)
@ -231,7 +231,7 @@ mri_draw_tree (void)
tmp->spec.exclude_name_list = NULL;
tmp->spec.sorted = none;
tmp->spec.section_flag_list = NULL;
lang_add_wild (NULL, tmp, FALSE);
lang_add_wild (NULL, tmp, false);
}
lang_leave_output_section_statement (0, "*default*", NULL, NULL);
@ -294,7 +294,7 @@ mri_format (const char *name)
void
mri_public (const char *name, etree_type *exp)
{
lang_add_assignment (exp_assign (name, exp, FALSE));
lang_add_assignment (exp_assign (name, exp, false));
}
void

View File

@ -170,7 +170,7 @@ static struct bfd_section *edata_s, *reloc_s;
static unsigned char *edata_d, *reloc_d;
static size_t edata_sz, reloc_sz;
static int runtime_pseudo_relocs_created = 0;
static bfd_boolean runtime_pseudp_reloc_v2_init = FALSE;
static bool runtime_pseudp_reloc_v2_init = false;
typedef struct
{
@ -186,7 +186,7 @@ typedef struct
unsigned int imagebase_reloc;
int pe_arch;
int bfd_arch;
bfd_boolean underscored;
bool underscored;
const autofilter_entry_type* autofilter_symbollist;
}
pe_details_type;
@ -264,9 +264,9 @@ static pe_details_type pe_detail_list[] =
PE_ARCH_i386,
bfd_arch_i386,
#ifdef pe_use_x86_64
FALSE,
false,
#else
TRUE,
true,
#endif
autofilter_symbollist_i386
},
@ -277,7 +277,7 @@ static pe_details_type pe_detail_list[] =
3 /* R_IMAGEBASE */,
PE_ARCH_i386,
bfd_arch_i386,
FALSE,
false,
autofilter_symbollist_i386
},
#else
@ -287,7 +287,7 @@ static pe_details_type pe_detail_list[] =
7 /* R_IMAGEBASE */,
PE_ARCH_i386,
bfd_arch_i386,
TRUE,
true,
autofilter_symbollist_i386
},
#endif
@ -297,7 +297,7 @@ static pe_details_type pe_detail_list[] =
16 /* R_SH_IMAGEBASE */,
PE_ARCH_sh,
bfd_arch_sh,
TRUE,
true,
autofilter_symbollist_generic
},
{
@ -306,7 +306,7 @@ static pe_details_type pe_detail_list[] =
34 /* MIPS_R_RVA */,
PE_ARCH_mips,
bfd_arch_mips,
FALSE,
false,
autofilter_symbollist_generic
},
{
@ -315,7 +315,7 @@ static pe_details_type pe_detail_list[] =
11 /* ARM_RVA32 */,
PE_ARCH_arm,
bfd_arch_arm,
TRUE,
true,
autofilter_symbollist_generic
},
{
@ -324,10 +324,10 @@ static pe_details_type pe_detail_list[] =
2, /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c. */
PE_ARCH_arm_wince,
bfd_arch_arm,
FALSE,
false,
autofilter_symbollist_generic
},
{ NULL, NULL, 0, 0, 0, FALSE, NULL }
{ NULL, NULL, 0, 0, 0, false, NULL }
};
static const pe_details_type *pe_details;
@ -542,7 +542,7 @@ pe_dll_add_excludes (const char *new_excludes, const exclude_type type)
free (local_copy);
}
static bfd_boolean
static bool
is_import (const char* n)
{
return (startswith (n, "__imp_"));
@ -674,7 +674,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
bfd *b;
struct bfd_section *s;
def_file_export *e = 0;
bfd_boolean resort_needed;
bool resort_needed;
if (!pe_def_file)
pe_def_file = def_file_empty ();
@ -707,7 +707,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
{
struct coff_link_hash_entry *sym_hash;
sym_hash = coff_link_hash_lookup (coff_hash_table (info),
ac->symbol_name, FALSE, FALSE, FALSE);
ac->symbol_name, false, false, false);
if (sym_hash && sym_hash->root.type == bfd_link_hash_common
&& sym_hash->root.u.c.p->alignment_power < (unsigned) ac->alignment)
{
@ -746,7 +746,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
/* We should export symbols which are either global or not
anything at all. (.bss data is the latter)
We should not export undefined symbols. */
bfd_boolean would_export
bool would_export
= (symbols[j]->section != bfd_und_section_ptr
&& ((symbols[j]->flags & BSF_GLOBAL)
|| (symbols[j]->flags == 0)));
@ -768,7 +768,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
sprintf (name, "%s%s", "__imp_", sn);
blhe = bfd_link_hash_lookup (info->hash, name,
FALSE, FALSE, FALSE);
false, false, false);
free (name);
if (blhe && blhe->type == bfd_link_hash_defined)
@ -801,7 +801,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
if (NE == 0)
return;
resort_needed = FALSE;
resort_needed = false;
/* Canonicalize the export list. */
if (pe_dll_kill_ats)
@ -826,7 +826,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
einfo (_("%X%P: cannot export %s: invalid export name\n"),
pe_def_file->exports[i].name);
pe_def_file->exports[i].name = tmp;
resort_needed = TRUE;
resort_needed = true;
}
}
}
@ -937,7 +937,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
blhe = bfd_link_hash_lookup (info->hash,
name,
FALSE, FALSE, TRUE);
false, false, true);
if (blhe
&& (blhe->type == bfd_link_hash_defined
@ -1186,7 +1186,7 @@ fill_exported_offsets (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
blhe = bfd_link_hash_lookup (info->hash,
name,
FALSE, FALSE, TRUE);
false, false, true);
if (blhe && blhe->type == bfd_link_hash_defined)
exported_symbol_offsets[i] = blhe->u.def.value;
@ -1342,7 +1342,7 @@ pe_walk_relocs (struct bfd_link_info *info,
/* Warning: the callback needs to be passed NAME directly. */
if (import_hash)
{
if (bfd_hash_lookup (import_hash, sym->name, FALSE, FALSE))
if (bfd_hash_lookup (import_hash, sym->name, false, false))
{
strcpy (name, sym->name);
cb (relocs[i], s, name, symname);
@ -1423,7 +1423,7 @@ pe_find_data_imports (const char *symhead,
if (sym && sym->type == bfd_link_hash_defined)
{
if (import_hash)
bfd_hash_lookup (import_hash, undef->root.string, TRUE, FALSE);
bfd_hash_lookup (import_hash, undef->root.string, true, false);
else
{
bfd *b = sym->u.def.section->owner;
@ -1471,7 +1471,7 @@ pe_find_data_imports (const char *symhead,
if (link_info.pei386_auto_import == -1)
{
static bfd_boolean warned = FALSE;
static bool warned = false;
info_msg (_("Info: resolving %s by linking to %s "
"(auto-import)\n"), name, impname);
@ -1484,7 +1484,7 @@ pe_find_data_imports (const char *symhead,
"command line; this should work unless it "
"involves constant data structures referencing "
"symbols from auto-imported DLLs\n"));
warned = TRUE;
warned = true;
}
}
}
@ -1581,7 +1581,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
const struct bfd_link_hash_entry *blhe
= bfd_wrapped_link_hash_lookup (abfd, info, sym->name,
FALSE, FALSE, FALSE);
false, false, false);
/* Don't create relocs for undefined weak symbols. */
if (sym->flags == BSF_WEAK)
@ -2271,7 +2271,7 @@ static const unsigned char jmp_arm_bytes[] =
static bfd *
make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
make_one (def_file_export *exp, bfd *parent, bool include_jmp_stub)
{
asection *tx, *id7, *id5, *id4, *id6;
unsigned char *td = NULL, *d7, *d5, *d4, *d6 = NULL;
@ -2552,7 +2552,7 @@ make_import_fixup_mark (arelent *rel, char *name)
bh = NULL;
bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
current_sec, /* sym->section, */
rel->address, NULL, TRUE, FALSE, &bh);
rel->address, NULL, true, false, &bh);
return bh->root.string;
}
@ -2664,7 +2664,7 @@ make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED,
if (!runtime_pseudp_reloc_v2_init)
{
size += 12;
runtime_pseudp_reloc_v2_init = TRUE;
runtime_pseudp_reloc_v2_init = true;
}
quick_symbol (abfd, "__imp_", name, "", UNDSEC, BSF_GLOBAL, 0);
@ -2774,7 +2774,7 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend, char *name,
add_bfd_to_link (b, bfd_get_filename (b), &link_info);
/* If we ever use autoimport, we have to cast text section writable. */
config.text_read_only = FALSE;
config.text_read_only = false;
link_info.output_bfd->flags &= ~WP_TEXT;
}
@ -2926,7 +2926,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename, struct bfd_link_
struct coff_link_hash_entry *h;
h = coff_link_hash_lookup (coff_hash_table (info), internal,
FALSE, FALSE, FALSE);
false, false, false);
if (h != NULL
/* If the symbol is hidden and undefined then it
has been swept up by garbage collection. */
@ -2943,7 +2943,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename, struct bfd_link_
sprintf (name, "_%s", internal);
h = coff_link_hash_lookup (coff_hash_table (info), name,
FALSE, FALSE, FALSE);
false, false, false);
free (name);
if (h != NULL
@ -3024,7 +3024,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
if (kv)
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
h = bfd_link_hash_lookup (linfo->hash, kv->oname, false, false, false);
if (h->type == bfd_link_hash_undefined)
goto return_h;
}
@ -3047,7 +3047,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
sizeof (struct key_value), undef_sort_cmp);
if (kv)
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
h = bfd_link_hash_lookup (linfo->hash, kv->oname, false, false, false);
if (h->type == bfd_link_hash_undefined)
goto return_h;
}
@ -3059,7 +3059,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
sizeof (struct key_value), undef_sort_cmp);
if (kv)
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
h = bfd_link_hash_lookup (linfo->hash, kv->oname, false, false, false);
if (h->type == bfd_link_hash_undefined)
goto return_h;
}
@ -3073,7 +3073,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
if (kv)
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
h = bfd_link_hash_lookup (linfo->hash, kv->oname, false, false, false);
if (h->type == bfd_link_hash_undefined)
goto return_h;
}
@ -3092,7 +3092,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
if (kv)
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
h = bfd_link_hash_lookup (linfo->hash, kv->oname, false, false, false);
if (h->type == bfd_link_hash_undefined)
goto return_h;
}
@ -3104,16 +3104,16 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
return h;
}
static bfd_boolean
static bool
pe_undef_count (struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED,
void *inf ATTRIBUTE_UNUSED)
{
if (h->type == bfd_link_hash_undefined)
undef_count++;
return TRUE;
return true;
}
static bfd_boolean
static bool
pe_undef_fill (struct bfd_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
{
if (h->type == bfd_link_hash_undefined)
@ -3128,7 +3128,7 @@ pe_undef_fill (struct bfd_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
udef_table[undef_count].oname = h->root.string;
undef_count++;
}
return TRUE;
return true;
}
static void
@ -3204,12 +3204,12 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
/* See if we need this import. */
size_t len = strlen (imp[i].internal_name);
char *name = xmalloc (len + 2 + 6);
bfd_boolean include_jmp_stub = FALSE;
bfd_boolean is_cdecl = FALSE;
bfd_boolean is_undef = FALSE;
bool include_jmp_stub = false;
bool is_cdecl = false;
bool is_undef = false;
if (!lead_at && strchr (imp[i].internal_name, '@') == NULL)
is_cdecl = TRUE;
is_cdecl = true;
if (lead_at)
sprintf (name, "%s", imp[i].internal_name);
@ -3217,7 +3217,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
sprintf (name, "%s%s",U (""), imp[i].internal_name);
blhe = bfd_link_hash_lookup (linfo->hash, name,
FALSE, FALSE, FALSE);
false, false, false);
/* Include the jump stub for <sym> only if the <sym>
is undefined. */
@ -3230,13 +3230,13 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
imp[i].internal_name);
blhe = bfd_link_hash_lookup (linfo->hash, name,
FALSE, FALSE, FALSE);
false, false, false);
if (blhe)
is_undef = (blhe->type == bfd_link_hash_undefined);
}
else
{
include_jmp_stub = TRUE;
include_jmp_stub = true;
is_undef = (blhe->type == bfd_link_hash_undefined);
}
@ -3244,7 +3244,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
{
sprintf (name, "%s%s",U (""), imp[i].internal_name);
blhe = pe_find_cdecl_alias_match (linfo, name);
include_jmp_stub = TRUE;
include_jmp_stub = true;
if (blhe)
is_undef = (blhe->type == bfd_link_hash_undefined);
}
@ -3323,7 +3323,7 @@ pe_as32 (void *ptr)
return b[0] + (b[1] << 8) + (b[2] << 16) + ((unsigned) b[3] << 24);
}
bfd_boolean
bool
pe_implied_import_dll (const char *filename)
{
bfd *dll;
@ -3350,7 +3350,7 @@ pe_implied_import_dll (const char *filename)
if (!dll)
{
einfo (_("%X%P: open %s: %E\n"), filename);
return FALSE;
return false;
}
track_dependency_files (filename);
@ -3359,7 +3359,7 @@ pe_implied_import_dll (const char *filename)
if (!bfd_check_format (dll, bfd_object))
{
einfo (_("%X%P: %s: this doesn't appear to be a DLL\n"), filename);
return FALSE;
return false;
}
/* Get pe_header, optional header and numbers of directory entries. */
@ -3373,7 +3373,7 @@ pe_implied_import_dll (const char *filename)
/* No import or export directory entry. */
if (num_entries < 1)
return FALSE;
return false;
#ifdef pe_use_x86_64
export_rva = pe_get32 (dll, opthdr_ofs + 96 + 4 * 4);
@ -3385,7 +3385,7 @@ pe_implied_import_dll (const char *filename)
/* No export table - nothing to export. */
if (export_size == 0)
return FALSE;
return false;
nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
secptr = (pe_header_offset + 4 + 20 +
@ -3482,7 +3482,7 @@ pe_implied_import_dll (const char *filename)
{
if (pe_dll_extra_pe_debug)
printf ("%s is already loaded\n", dllname);
return TRUE;
return true;
}
/* This is an optimized version of the insertion loop, which avoids lots of
@ -3516,7 +3516,7 @@ pe_implied_import_dll (const char *filename)
(unsigned long) func_rva, is_data ? "(data)" : "");
}
return TRUE;
return true;
}
/* Iterate through the list of symbols. */
@ -3554,7 +3554,7 @@ pe_implied_import_dll (const char *filename)
}
}
return TRUE;
return true;
}
void
@ -3631,7 +3631,7 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
/* Resize the sections. */
lang_reset_memory_regions ();
lang_size_sections (NULL, TRUE);
lang_size_sections (NULL, true);
/* Redo special stuff. */
ldemul_after_allocation ();
@ -3643,7 +3643,7 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
reloc_s->contents = reloc_d;
}
bfd_boolean
bool
pe_bfd_is_dll (bfd *abfd)
{
return (bfd_get_format (abfd) == bfd_object

View File

@ -52,7 +52,7 @@ extern void pe_dll_generate_implib
(def_file *, const char *, struct bfd_link_info *);
extern void pe_process_import_defs
(bfd *, struct bfd_link_info *);
extern bfd_boolean pe_implied_import_dll
extern bool pe_implied_import_dll
(const char *);
extern void pe_dll_build_sections
(bfd *, struct bfd_link_info *);
@ -66,7 +66,7 @@ extern void pe_find_data_imports
(const char *, void (*cb) (arelent *, asection *, char *, const char *));
extern void pe_create_import_fixup
(arelent * rel, asection *, bfd_vma, char *, const char *);
extern bfd_boolean pe_bfd_is_dll
extern bool pe_bfd_is_dll
(bfd *);
extern void pe_output_file_set_long_section_names
(bfd *);

View File

@ -48,7 +48,7 @@ extern void pep_dll_add_excludes (const char *, const exclude_type);
extern void pep_dll_generate_def_file (const char *);
extern void pep_dll_generate_implib (def_file *, const char *, struct bfd_link_info *);
extern void pep_process_import_defs (bfd *, struct bfd_link_info *);
extern bfd_boolean pep_implied_import_dll (const char *);
extern bool pep_implied_import_dll (const char *);
extern void pep_dll_build_sections (bfd *, struct bfd_link_info *);
extern void pep_exe_build_sections (bfd *, struct bfd_link_info *);
extern void pep_dll_fill_sections (bfd *, struct bfd_link_info *);
@ -58,7 +58,7 @@ extern void pep_find_data_imports (const char *,
const char *));
extern void pep_create_import_fixup (arelent * rel, asection *, bfd_vma,
char *, const char *);
extern bfd_boolean pep_bfd_is_dll (bfd *);
extern bool pep_bfd_is_dll (bfd *);
extern void pep_output_file_set_long_section_names (bfd *);
#endif /* PEP_DLL_H */

View File

@ -56,7 +56,7 @@ extern int errno;
#endif
/* Report plugin symbols. */
bfd_boolean report_plugin_symbols;
bool report_plugin_symbols;
/* The suffix to append to the name of the real (claimed) object file
when generating a dummy BFD to hold the IR symbols sent from the
@ -88,7 +88,7 @@ typedef struct plugin
ld_plugin_all_symbols_read_handler all_symbols_read_handler;
ld_plugin_cleanup_handler cleanup_handler;
/* TRUE if the cleanup handlers have been called. */
bfd_boolean cleanup_done;
bool cleanup_done;
} plugin_t;
typedef struct view_buffer
@ -106,7 +106,7 @@ typedef struct plugin_input_file
view_buffer_t view_buffer;
char *name;
int fd;
bfd_boolean use_mmap;
bool use_mmap;
off_t offset;
off_t filesize;
} plugin_input_file_t;
@ -130,7 +130,7 @@ static plugin_t *called_plugin = NULL;
static const char *error_plugin = NULL;
/* State of linker "notice" interface before we poked at it. */
static bfd_boolean orig_notice_all;
static bool orig_notice_all;
/* Original linker callbacks, and the plugin version. */
static const struct bfd_link_callbacks *orig_callbacks;
@ -138,7 +138,7 @@ static struct bfd_link_callbacks plugin_callbacks;
/* Set at all symbols read time, to avoid recursively offering the plugin
its own newly-added input files and libs to claim. */
bfd_boolean no_more_claiming = FALSE;
bool no_more_claiming = false;
#if HAVE_MMAP && HAVE_GETPAGESIZE
/* Page size used by mmap. */
@ -171,10 +171,10 @@ static const enum ld_plugin_tag tv_header_tags[] =
static const size_t tv_header_size = ARRAY_SIZE (tv_header_tags);
/* Forward references. */
static bfd_boolean plugin_notice (struct bfd_link_info *,
struct bfd_link_hash_entry *,
struct bfd_link_hash_entry *,
bfd *, asection *, bfd_vma, flagword);
static bool plugin_notice (struct bfd_link_info *,
struct bfd_link_hash_entry *,
struct bfd_link_hash_entry *,
bfd *, asection *, bfd_vma, flagword);
static bfd_cleanup plugin_object_p (bfd *);
@ -220,7 +220,7 @@ set_plugin_error (const char *plugin)
}
/* Test if an error occurred. */
static bfd_boolean
static bool
plugin_error_p (void)
{
return error_plugin != NULL;
@ -309,7 +309,7 @@ static bfd *
plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
{
bfd *abfd;
bfd_boolean bfd_plugin_target;
bool bfd_plugin_target;
bfd_use_reserved_id = 1;
bfd_plugin_target = bfd_plugin_target_p (srctemplate->xvec);
@ -343,7 +343,7 @@ plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
}
/* Check if the BFD passed in is an IR dummy object file. */
static inline bfd_boolean
static inline bool
is_ir_dummy_bfd (const bfd *abfd)
{
/* ABFD can sometimes legitimately be NULL, e.g. when called from one
@ -563,7 +563,7 @@ get_view (const void *handle, const void **viewp)
buffer = mmap (NULL, size, PROT_READ, MAP_PRIVATE, input->fd, offset);
if (buffer != MAP_FAILED)
{
input->use_mmap = TRUE;
input->use_mmap = true;
# if HAVE_GETPAGESIZE
buffer += bias;
# endif
@ -573,7 +573,7 @@ get_view (const void *handle, const void **viewp)
{
char *p;
input->use_mmap = FALSE;
input->use_mmap = false;
if (lseek (input->fd, offset, SEEK_SET) < 0)
return LDPS_ERR;
@ -621,12 +621,12 @@ release_input_file (const void *handle)
/* Return TRUE if a defined symbol might be reachable from outside the
universe of claimed objects. */
static inline bfd_boolean
static inline bool
is_visible_from_outside (struct ld_plugin_symbol *lsym,
struct bfd_link_hash_entry *blhe)
{
if (bfd_link_relocatable (&link_info))
return TRUE;
return true;
if (blhe->non_ir_ref_dynamic
|| link_info.export_dynamic
|| bfd_link_dll (&link_info))
@ -634,7 +634,7 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym,
/* Check if symbol is hidden by version script. */
if (bfd_hide_sym_by_version (link_info.version_info,
blhe->root.string))
return FALSE;
return false;
/* Only ELF symbols really have visibility. */
if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour)
{
@ -656,7 +656,7 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym,
|| lsym->visibility == LDPV_PROTECTED);
}
return FALSE;
return false;
}
/* Return LTO kind string name that corresponds to IDX enum value. */
@ -743,7 +743,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
int res;
struct bfd_link_hash_entry *h
= bfd_link_hash_lookup (link_info.hash, syms[n].name,
FALSE, FALSE, TRUE);
false, false, true);
enum { wrap_none, wrapper, wrapped } wrap_status = wrap_none;
if (syms[n].def != LDPK_UNDEF && syms[n].def != LDPK_WEAKUNDEF)
@ -762,7 +762,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
{
blhe = bfd_wrapped_link_hash_lookup (link_info.output_bfd,
&link_info, syms[n].name,
FALSE, FALSE, TRUE);
false, false, true);
/* Check if a symbol is a wrapped symbol. */
if (blhe && blhe != h)
wrap_status = wrapped;
@ -922,7 +922,7 @@ static enum ld_plugin_status
set_extra_library_path (const char *path)
{
ASSERT (called_plugin);
ldfile_add_library_path (xstrdup (path), FALSE);
ldfile_add_library_path (xstrdup (path), false);
return LDPS_OK;
}
@ -936,14 +936,14 @@ message (int level, const char *format, ...)
switch (level)
{
case LDPL_INFO:
vfinfo (stdout, format, args, FALSE);
vfinfo (stdout, format, args, false);
putchar ('\n');
break;
case LDPL_WARNING:
{
char *newfmt = concat (_("%P: warning: "), format, "\n",
(const char *) NULL);
vfinfo (stdout, newfmt, args, TRUE);
vfinfo (stdout, newfmt, args, true);
free (newfmt);
}
break;
@ -955,7 +955,7 @@ message (int level, const char *format, ...)
_("%P: error: "), format, "\n",
(const char *) NULL);
fflush (stdout);
vfinfo (stderr, newfmt, args, TRUE);
vfinfo (stderr, newfmt, args, true);
fflush (stderr);
free (newfmt);
}
@ -1115,8 +1115,8 @@ plugin_load_plugins (void)
orig_callbacks = link_info.callbacks;
plugin_callbacks = *orig_callbacks;
plugin_callbacks.notice = &plugin_notice;
link_info.notice_all = TRUE;
link_info.lto_plugin_active = TRUE;
link_info.notice_all = true;
link_info.lto_plugin_active = true;
link_info.callbacks = &plugin_callbacks;
register_ld_plugin_object_p (plugin_object_p);
@ -1131,7 +1131,7 @@ static int
plugin_call_claim_file (const struct ld_plugin_input_file *file, int *claimed)
{
plugin_t *curplug = plugins_list;
*claimed = FALSE;
*claimed = false;
while (curplug && !*claimed)
{
if (curplug->claim_file_handler)
@ -1215,7 +1215,7 @@ plugin_object_p (bfd *ibfd)
input->view_buffer.filesize = 0;
input->view_buffer.offset = 0;
input->fd = file.fd;
input->use_mmap = FALSE;
input->use_mmap = false;
input->offset = file.offset;
input->filesize = file.filesize;
input->name = plugin_strdup (abfd, bfd_get_filename (ibfd));
@ -1301,7 +1301,7 @@ plugin_call_all_symbols_read (void)
plugin_t *curplug = plugins_list;
/* Disable any further file-claiming. */
no_more_claiming = TRUE;
no_more_claiming = true;
while (curplug)
{
@ -1329,7 +1329,7 @@ plugin_call_cleanup (void)
if (curplug->cleanup_handler && !curplug->cleanup_done)
{
enum ld_plugin_status rv;
curplug->cleanup_done = TRUE;
curplug->cleanup_done = true;
called_plugin = curplug;
rv = (*curplug->cleanup_handler) ();
called_plugin = NULL;
@ -1349,7 +1349,7 @@ plugin_call_cleanup (void)
non_ir_ref_dynamic as appropriate. We have to notice_all symbols,
because we won't necessarily know until later which ones will be
contributed by IR files. */
static bfd_boolean
static bool
plugin_notice (struct bfd_link_info *info,
struct bfd_link_hash_entry *h,
struct bfd_link_hash_entry *inh,
@ -1363,7 +1363,7 @@ plugin_notice (struct bfd_link_info *info,
if (h != NULL)
{
bfd *sym_bfd;
bfd_boolean ref = FALSE;
bool ref = false;
if (h->type == bfd_link_hash_warning)
h = h->u.i.link;
@ -1383,13 +1383,13 @@ plugin_notice (struct bfd_link_info *info,
|| inh->type == bfd_link_hash_new)
{
if ((abfd->flags & DYNAMIC) == 0)
inh->non_ir_ref_regular = TRUE;
inh->non_ir_ref_regular = true;
else
inh->non_ir_ref_dynamic = TRUE;
inh->non_ir_ref_dynamic = true;
}
if (h->type != bfd_link_hash_new)
ref = TRUE;
ref = true;
}
/* Nothing to do here for warning symbols. */
@ -1409,7 +1409,7 @@ plugin_notice (struct bfd_link_info *info,
&& (h->u.undef.abfd == NULL
|| (h->u.undef.abfd->flags & BFD_PLUGIN) != 0))
h->u.undef.abfd = abfd;
ref = TRUE;
ref = true;
}
@ -1425,7 +1425,7 @@ plugin_notice (struct bfd_link_info *info,
h->type = bfd_link_hash_undefweak;
h->u.undef.abfd = sym_bfd;
}
ref = TRUE;
ref = true;
}
/* Otherwise, it must be a new def.
@ -1453,9 +1453,9 @@ plugin_notice (struct bfd_link_info *info,
if (ref)
{
if ((abfd->flags & DYNAMIC) == 0)
h->non_ir_ref_regular = TRUE;
h->non_ir_ref_regular = true;
else
h->non_ir_ref_dynamic = TRUE;
h->non_ir_ref_dynamic = true;
}
}
@ -1464,9 +1464,9 @@ plugin_notice (struct bfd_link_info *info,
|| orig_notice_all
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, orig_h->root.string,
FALSE, FALSE) != NULL))
false, false) != NULL))
return (*orig_callbacks->notice) (info, orig_h, inh,
abfd, section, value, flags);
return TRUE;
return true;
}
#endif /* BFD_SUPPORTS_PLUGINS */

View File

@ -22,11 +22,11 @@
#define GLD_PLUGIN_H
/* Report plugin symbols. */
extern bfd_boolean report_plugin_symbols;
extern bool report_plugin_symbols;
/* Set at all symbols read time, to avoid recursively offering the plugin
its own newly-added input files and libs to claim. */
extern bfd_boolean no_more_claiming;
extern bool no_more_claiming;
/* This is the only forward declaration we need to avoid having
to include the plugin-api.h header in order to use this file. */

View File

@ -123,4 +123,6 @@ extern char *getenv ();
extern char **environ;
#endif
#define POISON_BFD_BOOLEAN 1
#endif /* ! defined (LD_SYSDEP_H) */

View File

@ -41,7 +41,7 @@ typedef struct claim_file
{
struct claim_file *next;
struct ld_plugin_input_file file;
bfd_boolean claimed;
bool claimed;
struct ld_plugin_symbol *symbols;
int n_syms_allocated;
int n_syms_used;
@ -122,10 +122,10 @@ static enum ld_plugin_status onload_ret = LDPS_OK;
static enum ld_plugin_status claim_file_ret = LDPS_OK;
static enum ld_plugin_status all_symbols_read_ret = LDPS_OK;
static enum ld_plugin_status cleanup_ret = LDPS_OK;
static bfd_boolean register_claimfile_hook = FALSE;
static bfd_boolean register_allsymbolsread_hook = FALSE;
static bfd_boolean register_cleanup_hook = FALSE;
static bfd_boolean dumpresolutions = FALSE;
static bool register_claimfile_hook = false;
static bool register_allsymbolsread_hook = false;
static bool register_cleanup_hook = false;
static bool dumpresolutions = false;
/* The master list of all claimable/claimed files. */
static claim_file_t *claimfiles_list = NULL;
@ -324,7 +324,7 @@ set_ret_val (const char *whichval, enum ld_plugin_status retval)
/* Records hooks which should be registered. */
static enum ld_plugin_status
set_register_hook (const char *whichhook, bfd_boolean yesno)
set_register_hook (const char *whichhook, bool yesno)
{
if (!strcmp ("claimfile", whichhook))
register_claimfile_hook = yesno;
@ -346,9 +346,9 @@ parse_option (const char *opt)
else if (!strncmp ("pass", opt, 4))
return set_ret_val (opt + 4, LDPS_OK);
else if (!strncmp ("register", opt, 8))
return set_register_hook (opt + 8, TRUE);
return set_register_hook (opt + 8, true);
else if (!strncmp ("noregister", opt, 10))
return set_register_hook (opt + 10, FALSE);
return set_register_hook (opt + 10, false);
else if (!strncmp ("claim:", opt, 6))
return record_claim_file (opt + 6);
else if (!strncmp ("read:", opt, 5))
@ -362,7 +362,7 @@ parse_option (const char *opt)
else if (!strncmp ("dir:", opt, 4))
return record_add_file (opt + 4, ADD_DIR);
else if (!strcmp ("dumpresolutions", opt))
dumpresolutions = TRUE;
dumpresolutions = true;
else
return LDPS_ERR;
return LDPS_OK;
@ -589,7 +589,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
*claimed = (claimfile != 0);
if (claimfile)
{
claimfile->claimed = TRUE;
claimfile->claimed = true;
claimfile->file = *file;
if (claimfile->n_syms_used && !tv_add_symbols)
return LDPS_ERR;

View File

@ -41,7 +41,7 @@ typedef struct claim_file
{
struct claim_file *next;
struct ld_plugin_input_file file;
bfd_boolean claimed;
bool claimed;
struct ld_plugin_symbol *symbols;
int n_syms_allocated;
int n_syms_used;
@ -122,11 +122,11 @@ static enum ld_plugin_status onload_ret = LDPS_OK;
static enum ld_plugin_status claim_file_ret = LDPS_OK;
static enum ld_plugin_status all_symbols_read_ret = LDPS_OK;
static enum ld_plugin_status cleanup_ret = LDPS_OK;
static bfd_boolean register_claimfile_hook = TRUE;
static bfd_boolean register_allsymbolsread_hook = FALSE;
static bfd_boolean register_cleanup_hook = FALSE;
static bfd_boolean dumpresolutions = FALSE;
static bfd_boolean allsymbolsread_silent = FALSE;
static bool register_claimfile_hook = true;
static bool register_allsymbolsread_hook = false;
static bool register_cleanup_hook = false;
static bool dumpresolutions = false;
static bool allsymbolsread_silent = false;
/* The master list of all claimable/claimed files. */
static claim_file_t *claimfiles_list = NULL;
@ -306,7 +306,7 @@ set_ret_val (const char *whichval, enum ld_plugin_status retval)
/* Records hooks which should be registered. */
static enum ld_plugin_status
set_register_hook (const char *whichhook, bfd_boolean yesno)
set_register_hook (const char *whichhook, bool yesno)
{
if (!strcmp ("claimfile", whichhook))
register_claimfile_hook = yesno;
@ -315,7 +315,7 @@ set_register_hook (const char *whichhook, bfd_boolean yesno)
else if (!strcmp ("allsymbolsreadsilent", whichhook))
{
register_allsymbolsread_hook = yesno;
allsymbolsread_silent = TRUE;
allsymbolsread_silent = true;
}
else if (!strcmp ("cleanup", whichhook))
register_cleanup_hook = yesno;
@ -348,9 +348,9 @@ parse_option (const char *opt)
else if (!strncmp ("pass", opt, 4))
return set_ret_val (opt + 4, LDPS_OK);
else if (!strncmp ("register", opt, 8))
return set_register_hook (opt + 8, TRUE);
return set_register_hook (opt + 8, true);
else if (!strncmp ("noregister", opt, 10))
return set_register_hook (opt + 10, FALSE);
return set_register_hook (opt + 10, false);
else if (!strncmp ("claim:", opt, 6))
return record_claim_file (opt + 6, 0);
else if (!strncmp ("sym:", opt, 4))
@ -362,7 +362,7 @@ parse_option (const char *opt)
else if (!strncmp ("dir:", opt, 4))
return record_add_file (opt + 4, ADD_DIR);
else if (!strcmp ("dumpresolutions", opt))
dumpresolutions = TRUE;
dumpresolutions = true;
else
return LDPS_ERR;
return LDPS_OK;
@ -518,7 +518,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
size_t len = strlen (file->name);
char *name = xstrdup (file->name);
char *p = name + len;
bfd_boolean islib;
bool islib;
/* Only match the file name without the directory part. */
islib = *p == 'a' && *(p - 1) == '.';
@ -547,7 +547,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
*claimed = (claimfile != 0);
if (claimfile)
{
claimfile->claimed = TRUE;
claimfile->claimed = true;
claimfile->file = *file;
if (claimfile->n_syms_used && !tv_add_symbols)
return LDPS_ERR;

View File

@ -41,7 +41,7 @@ typedef struct claim_file
{
struct claim_file *next;
struct ld_plugin_input_file file;
bfd_boolean claimed;
bool claimed;
struct ld_plugin_symbol *symbols;
int n_syms_allocated;
int n_syms_used;
@ -122,10 +122,10 @@ static enum ld_plugin_status onload_ret = LDPS_OK;
static enum ld_plugin_status claim_file_ret = LDPS_OK;
static enum ld_plugin_status all_symbols_read_ret = LDPS_OK;
static enum ld_plugin_status cleanup_ret = LDPS_OK;
static bfd_boolean register_claimfile_hook = TRUE;
static bfd_boolean register_allsymbolsread_hook = FALSE;
static bfd_boolean register_cleanup_hook = FALSE;
static bfd_boolean dumpresolutions = FALSE;
static bool register_claimfile_hook = true;
static bool register_allsymbolsread_hook = false;
static bool register_cleanup_hook = false;
static bool dumpresolutions = false;
/* The master list of all claimable/claimed files. */
static claim_file_t *claimfiles_list = NULL;
@ -305,7 +305,7 @@ set_ret_val (const char *whichval, enum ld_plugin_status retval)
/* Records hooks which should be registered. */
static enum ld_plugin_status
set_register_hook (const char *whichhook, bfd_boolean yesno)
set_register_hook (const char *whichhook, bool yesno)
{
if (!strcmp ("claimfile", whichhook))
register_claimfile_hook = yesno;
@ -327,9 +327,9 @@ parse_option (const char *opt)
else if (!strncmp ("pass", opt, 4))
return set_ret_val (opt + 4, LDPS_OK);
else if (!strncmp ("register", opt, 8))
return set_register_hook (opt + 8, TRUE);
return set_register_hook (opt + 8, true);
else if (!strncmp ("noregister", opt, 10))
return set_register_hook (opt + 10, FALSE);
return set_register_hook (opt + 10, false);
else if (!strncmp ("claim:", opt, 6))
return record_claim_file (opt + 6, 0);
else if (!strncmp ("sym:", opt, 4))
@ -341,7 +341,7 @@ parse_option (const char *opt)
else if (!strncmp ("dir:", opt, 4))
return record_add_file (opt + 4, ADD_DIR);
else if (!strcmp ("dumpresolutions", opt))
dumpresolutions = TRUE;
dumpresolutions = true;
else
return LDPS_ERR;
return LDPS_OK;
@ -497,7 +497,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
size_t len = strlen (file->name);
char *name = xstrdup (file->name);
char *p = name + len;
bfd_boolean islib;
bool islib;
/* Only match the file name without the directory part. */
islib = *p == 'a' && *(p - 1) == '.';
@ -532,7 +532,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
TV_MESSAGE (LDPL_INFO, "Claimed: %s [@%ld/%ld]", file->name,
(long)file->offset, (long)file->filesize);
claimfile->claimed = TRUE;
claimfile->claimed = true;
claimfile->file = *file;
if (claimfile->n_syms_used && !tv_add_symbols)
claim_file_ret = LDPS_ERR;

View File

@ -41,7 +41,7 @@ typedef struct claim_file
{
struct claim_file *next;
struct ld_plugin_input_file file;
bfd_boolean claimed;
bool claimed;
struct ld_plugin_symbol *symbols;
int n_syms_allocated;
int n_syms_used;
@ -122,11 +122,11 @@ static enum ld_plugin_status onload_ret = LDPS_OK;
static enum ld_plugin_status claim_file_ret = LDPS_OK;
static enum ld_plugin_status all_symbols_read_ret = LDPS_OK;
static enum ld_plugin_status cleanup_ret = LDPS_OK;
static bfd_boolean register_claimfile_hook = TRUE;
static bfd_boolean register_allsymbolsread_hook = FALSE;
static bfd_boolean register_cleanup_hook = FALSE;
static bfd_boolean dumpresolutions = FALSE;
static bfd_boolean allsymbolsread_silent = FALSE;
static bool register_claimfile_hook = true;
static bool register_allsymbolsread_hook = false;
static bool register_cleanup_hook = false;
static bool dumpresolutions = false;
static bool allsymbolsread_silent = false;
/* The master list of all claimable/claimed files. */
static claim_file_t *claimfiles_list = NULL;
@ -306,7 +306,7 @@ set_ret_val (const char *whichval, enum ld_plugin_status retval)
/* Records hooks which should be registered. */
static enum ld_plugin_status
set_register_hook (const char *whichhook, bfd_boolean yesno)
set_register_hook (const char *whichhook, bool yesno)
{
if (!strcmp ("claimfile", whichhook))
register_claimfile_hook = yesno;
@ -315,7 +315,7 @@ set_register_hook (const char *whichhook, bfd_boolean yesno)
else if (!strcmp ("allsymbolsreadsilent", whichhook))
{
register_allsymbolsread_hook = yesno;
allsymbolsread_silent = TRUE;
allsymbolsread_silent = true;
}
else if (!strcmp ("cleanup", whichhook))
register_cleanup_hook = yesno;
@ -348,9 +348,9 @@ parse_option (const char *opt)
else if (!strncmp ("pass", opt, 4))
return set_ret_val (opt + 4, LDPS_OK);
else if (!strncmp ("register", opt, 8))
return set_register_hook (opt + 8, TRUE);
return set_register_hook (opt + 8, true);
else if (!strncmp ("noregister", opt, 10))
return set_register_hook (opt + 10, FALSE);
return set_register_hook (opt + 10, false);
else if (!strncmp ("claim:", opt, 6))
return record_claim_file (opt + 6, 0);
else if (!strncmp ("sym:", opt, 4))
@ -362,7 +362,7 @@ parse_option (const char *opt)
else if (!strncmp ("dir:", opt, 4))
return record_add_file (opt + 4, ADD_DIR);
else if (!strcmp ("dumpresolutions", opt))
dumpresolutions = TRUE;
dumpresolutions = true;
else
return LDPS_ERR;
return LDPS_OK;
@ -524,7 +524,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
size_t len = strlen (file->name);
char *name = xstrdup (file->name);
char *p = name + len;
bfd_boolean islib;
bool islib;
/* Only match the file name without the directory part. */
islib = *p == 'a' && *(p - 1) == '.';
@ -553,7 +553,7 @@ onclaim_file (const struct ld_plugin_input_file *file, int *claimed)
*claimed = (claimfile != 0);
if (claimfile)
{
claimfile->claimed = TRUE;
claimfile->claimed = true;
claimfile->file = *file;
if (claimfile->n_syms_used && !tv_add_symbols)
return LDPS_ERR;