mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user