aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-31 10:39:51 +1030
committerAlan Modra <amodra@gmail.com>2021-03-31 10:49:23 +1030
commitf38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc (patch)
tree38d5b486b39b163f1581abf67889d191a8e5cc9f /ld/ldmisc.c
parent015dc7e1f8a971692a910e6cfc64faf9216e75c3 (diff)
downloadfsf-binutils-gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.zip
fsf-binutils-gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.tar.gz
fsf-binutils-gdb-f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc.tar.bz2
Use bool in ld
* sysdep.h (POISON_BFD_BOOLEAN): Define. * configure.ac (elf_list_options, elf_shlib_list_options=false), (elf_plt_unwind_list_options=false): Replace FALSE with false, and TRUE with true. * emulparams/call_nop.sh, * emulparams/cet.sh, * emulparams/dynamic_undefined_weak.sh, * emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh, * emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh, * emulparams/reloc_overflow.sh, * emulparams/static.sh, * emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/alphaelf.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em, * emultempl/cr16elf.em, * emultempl/crxelf.em, * emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em, * emultempl/hppaelf.em, * emultempl/linux.em, * emultempl/m68hc1xelf.em, * emultempl/metagelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc32elf.em, * emultempl/ppc64elf.em, * emultempl/rxelf.em, * emultempl/rxlinux.em, * emultempl/scoreelf.em, * emultempl/solaris2.em, * emultempl/spuelf.em, * emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em, * emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h, * ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h, * ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c, * ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h, * ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h, * ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c, * pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h, * testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true. * configure: Regenerate.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 8e77f6b..28b9448 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -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);
}