aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf.em
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/emultempl/elf.em
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/emultempl/elf.em')
-rw-r--r--ld/emultempl/elf.em78
1 files changed, 39 insertions, 39 deletions
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
index 986b77e..bfaf813 100644
--- a/ld/emultempl/elf.em
+++ b/ld/emultempl/elf.em
@@ -78,10 +78,10 @@ static void
gld${EMULATION_NAME}_before_parse (void)
{
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
- config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
- config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
- link_info.check_relocs_after_open_input = TRUE;
+ input_flags.dynamic = ${DYNAMIC_LINK-true};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
+ config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`;
+ link_info.check_relocs_after_open_input = true;
EOF
if test -n "$COMMONPAGESIZE"; then
fragment <<EOF
@@ -106,21 +106,21 @@ EOF
if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
- IS_LINUX_TARGET=FALSE
- IS_FREEBSD_TARGET=FALSE
+ IS_LINUX_TARGET=false
+ IS_FREEBSD_TARGET=false
case ${target} in
*-*-linux-* | *-*-k*bsd*-* | *-*-gnu*)
- IS_LINUX_TARGET=TRUE ;;
+ IS_LINUX_TARGET=true ;;
*-*-freebsd* | *-*-dragonfly*)
- IS_FREEBSD_TARGET=TRUE ;;
+ IS_FREEBSD_TARGET=true ;;
esac
- IS_LIBPATH=FALSE
+ IS_LIBPATH=false
if test "x${USE_LIBPATH}" = xyes; then
- IS_LIBPATH=TRUE
+ IS_LIBPATH=true
fi
- IS_NATIVE=FALSE
+ IS_NATIVE=false
if test "x${NATIVE}" = xyes; then
- IS_NATIVE=TRUE
+ IS_NATIVE=true
fi
fragment <<EOF
@@ -617,13 +617,13 @@ fragment <<EOF
#define DEFAULT_BUILD_ID_STYLE "sha1"
-static bfd_boolean
+static bool
gld${EMULATION_NAME}_handle_option (int optc)
{
switch (optc)
{
default:
- return FALSE;
+ return false;
case OPTION_BUILD_ID:
free ((char *) ldelf_emit_note_gnu_build_id);
@@ -660,11 +660,11 @@ fragment <<EOF
break;
case OPTION_DISABLE_NEW_DTAGS:
- link_info.new_dtags = FALSE;
+ link_info.new_dtags = false;
break;
case OPTION_ENABLE_NEW_DTAGS:
- link_info.new_dtags = TRUE;
+ link_info.new_dtags = true;
break;
case OPTION_EH_FRAME_HDR:
@@ -687,16 +687,16 @@ fragment <<EOF
break;
case OPTION_HASH_STYLE:
- link_info.emit_hash = FALSE;
- link_info.emit_gnu_hash = FALSE;
+ link_info.emit_hash = false;
+ link_info.emit_gnu_hash = false;
if (strcmp (optarg, "sysv") == 0)
- link_info.emit_hash = TRUE;
+ link_info.emit_hash = true;
else if (strcmp (optarg, "gnu") == 0)
- link_info.emit_gnu_hash = TRUE;
+ link_info.emit_gnu_hash = true;
else if (strcmp (optarg, "both") == 0)
{
- link_info.emit_hash = TRUE;
- link_info.emit_gnu_hash = TRUE;
+ link_info.emit_hash = true;
+ link_info.emit_gnu_hash = true;
}
else
einfo (_("%F%P: invalid hash style \`%s'\n"), optarg);
@@ -711,7 +711,7 @@ fragment <<EOF
else if (strcmp (optarg, "undefs") == 0)
link_info.unresolved_syms_in_objects = RM_IGNORE;
else if (strcmp (optarg, "muldefs") == 0)
- link_info.allow_multiple_definition = TRUE;
+ link_info.allow_multiple_definition = true;
else if (startswith (optarg, "max-page-size="))
{
char *end;
@@ -744,26 +744,26 @@ fragment <<EOF
}
else if (strcmp (optarg, "execstack") == 0)
{
- link_info.execstack = TRUE;
- link_info.noexecstack = FALSE;
+ link_info.execstack = true;
+ link_info.noexecstack = false;
}
else if (strcmp (optarg, "noexecstack") == 0)
{
- link_info.noexecstack = TRUE;
- link_info.execstack = FALSE;
+ link_info.noexecstack = true;
+ link_info.execstack = false;
}
else if (strcmp (optarg, "unique-symbol") == 0)
- link_info.unique_symbol = TRUE;
+ link_info.unique_symbol = true;
else if (strcmp (optarg, "nounique-symbol") == 0)
- link_info.unique_symbol = FALSE;
+ link_info.unique_symbol = false;
else if (strcmp (optarg, "globalaudit") == 0)
{
link_info.flags_1 |= DF_1_GLOBAUDIT;
}
else if (startswith (optarg, "start-stop-gc"))
- link_info.start_stop_gc = TRUE;
+ link_info.start_stop_gc = true;
else if (startswith (optarg, "nostart-stop-gc"))
- link_info.start_stop_gc = FALSE;
+ link_info.start_stop_gc = false;
else if (startswith (optarg, "start-stop-visibility="))
{
if (strcmp (optarg, "start-stop-visibility=default") == 0)
@@ -819,25 +819,25 @@ fragment <<EOF
else if (strcmp (optarg, "nounique") == 0)
link_info.gnu_flags_1 &= ~(bfd_vma) DF_GNU_1_UNIQUE;
else if (strcmp (optarg, "combreloc") == 0)
- link_info.combreloc = TRUE;
+ link_info.combreloc = true;
else if (strcmp (optarg, "nocombreloc") == 0)
- link_info.combreloc = FALSE;
+ link_info.combreloc = false;
else if (strcmp (optarg, "nocopyreloc") == 0)
- link_info.nocopyreloc = TRUE;
+ link_info.nocopyreloc = true;
EOF
if test -n "$COMMONPAGESIZE"; then
fragment <<EOF
else if (strcmp (optarg, "relro") == 0)
- link_info.relro = TRUE;
+ link_info.relro = true;
else if (strcmp (optarg, "norelro") == 0)
- link_info.relro = FALSE;
+ link_info.relro = false;
EOF
fi
fragment <<EOF
else if (strcmp (optarg, "separate-code") == 0)
- link_info.separate_code = TRUE;
+ link_info.separate_code = true;
else if (strcmp (optarg, "noseparate-code") == 0)
- link_info.separate_code = FALSE;
+ link_info.separate_code = false;
else if (strcmp (optarg, "common") == 0)
link_info.elf_stt_common = elf_stt_common;
else if (strcmp (optarg, "nocommon") == 0)
@@ -872,7 +872,7 @@ fi
fragment <<EOF
}
- return TRUE;
+ return true;
}
EOF