mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-09 19:12:24 +08:00
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
This commit is contained in:
130
bfd/elf-m10200.c
130
bfd/elf-m10200.c
@ -27,23 +27,23 @@ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
|
||||
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
|
||||
static void mn10200_info_to_howto
|
||||
PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
|
||||
static boolean mn10200_elf_relax_delete_bytes
|
||||
static bfd_boolean mn10200_elf_relax_delete_bytes
|
||||
PARAMS ((bfd *, asection *, bfd_vma, int));
|
||||
static boolean mn10200_elf_symbol_address_p
|
||||
static bfd_boolean mn10200_elf_symbol_address_p
|
||||
PARAMS ((bfd *, asection *, Elf_Internal_Sym *, bfd_vma));
|
||||
static bfd_reloc_status_type mn10200_elf_final_link_relocate
|
||||
PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *,
|
||||
bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
|
||||
struct bfd_link_info *, asection *, int));
|
||||
static boolean mn10200_elf_relocate_section
|
||||
PARAMS (( bfd *, struct bfd_link_info *, bfd *, asection *,
|
||||
bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *,
|
||||
asection **));
|
||||
static boolean mn10200_elf_relax_section
|
||||
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
|
||||
static bfd_boolean mn10200_elf_relocate_section
|
||||
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
|
||||
bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *,
|
||||
asection **));
|
||||
static bfd_boolean mn10200_elf_relax_section
|
||||
PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
|
||||
static bfd_byte * mn10200_elf_get_relocated_section_contents
|
||||
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
||||
bfd_byte *, boolean, asymbol **));
|
||||
bfd_byte *, bfd_boolean, asymbol **));
|
||||
|
||||
enum reloc_type {
|
||||
R_MN10200_NONE = 0,
|
||||
@ -63,114 +63,114 @@ static reloc_howto_type elf_mn10200_howto_table[] = {
|
||||
0,
|
||||
2,
|
||||
16,
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_NONE",
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
false),
|
||||
FALSE),
|
||||
/* Standard 32 bit reloc. */
|
||||
HOWTO (R_MN10200_32,
|
||||
0,
|
||||
2,
|
||||
32,
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_32",
|
||||
false,
|
||||
FALSE,
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
false),
|
||||
FALSE),
|
||||
/* Standard 16 bit reloc. */
|
||||
HOWTO (R_MN10200_16,
|
||||
0,
|
||||
1,
|
||||
16,
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_16",
|
||||
false,
|
||||
FALSE,
|
||||
0xffff,
|
||||
0xffff,
|
||||
false),
|
||||
FALSE),
|
||||
/* Standard 8 bit reloc. */
|
||||
HOWTO (R_MN10200_8,
|
||||
0,
|
||||
0,
|
||||
8,
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_8",
|
||||
false,
|
||||
FALSE,
|
||||
0xff,
|
||||
0xff,
|
||||
false),
|
||||
FALSE),
|
||||
/* Standard 24 bit reloc. */
|
||||
HOWTO (R_MN10200_24,
|
||||
0,
|
||||
2,
|
||||
24,
|
||||
false,
|
||||
FALSE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_24",
|
||||
false,
|
||||
FALSE,
|
||||
0xffffff,
|
||||
0xffffff,
|
||||
false),
|
||||
FALSE),
|
||||
/* Simple 8 pc-relative reloc. */
|
||||
HOWTO (R_MN10200_PCREL8,
|
||||
0,
|
||||
0,
|
||||
8,
|
||||
true,
|
||||
TRUE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_PCREL8",
|
||||
false,
|
||||
FALSE,
|
||||
0xff,
|
||||
0xff,
|
||||
true),
|
||||
TRUE),
|
||||
/* Simple 16 pc-relative reloc. */
|
||||
HOWTO (R_MN10200_PCREL16,
|
||||
0,
|
||||
1,
|
||||
16,
|
||||
true,
|
||||
TRUE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_PCREL16",
|
||||
false,
|
||||
FALSE,
|
||||
0xffff,
|
||||
0xffff,
|
||||
true),
|
||||
TRUE),
|
||||
/* Simple 32bit pc-relative reloc with a 1 byte adjustment
|
||||
to get the pc-relative offset correct. */
|
||||
HOWTO (R_MN10200_PCREL24,
|
||||
0,
|
||||
2,
|
||||
24,
|
||||
true,
|
||||
TRUE,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc,
|
||||
"R_MN10200_PCREL24",
|
||||
false,
|
||||
FALSE,
|
||||
0xffffff,
|
||||
0xffffff,
|
||||
true),
|
||||
TRUE),
|
||||
};
|
||||
|
||||
struct mn10200_reloc_map {
|
||||
@ -327,7 +327,7 @@ mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd,
|
||||
}
|
||||
|
||||
/* Relocate an MN10200 ELF section. */
|
||||
static boolean
|
||||
static bfd_boolean
|
||||
mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
contents, relocs, local_syms, local_sections)
|
||||
bfd *output_bfd;
|
||||
@ -344,7 +344,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
Elf_Internal_Rela *rel, *relend;
|
||||
|
||||
if (info->relocateable)
|
||||
return true;
|
||||
return TRUE;
|
||||
|
||||
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
|
||||
sym_hashes = elf_sym_hashes (input_bfd);
|
||||
@ -395,8 +395,8 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, rel->r_offset, true)))
|
||||
return false;
|
||||
input_section, rel->r_offset, TRUE)))
|
||||
return FALSE;
|
||||
relocation = 0;
|
||||
}
|
||||
}
|
||||
@ -428,14 +428,14 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
if (! ((*info->callbacks->reloc_overflow)
|
||||
(info, name, howto->name, (bfd_vma) 0,
|
||||
input_bfd, input_section, rel->r_offset)))
|
||||
return false;
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case bfd_reloc_undefined:
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, name, input_bfd, input_section,
|
||||
rel->r_offset, true)))
|
||||
return false;
|
||||
rel->r_offset, TRUE)))
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case bfd_reloc_outofrange:
|
||||
@ -458,13 +458,13 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
if (!((*info->callbacks->warning)
|
||||
(info, msg, name, input_bfd, input_section,
|
||||
rel->r_offset)))
|
||||
return false;
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* This function handles relaxing for the mn10200.
|
||||
@ -496,12 +496,12 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
We don't handle imm16->imm8 or d16->d8 as they're very rare
|
||||
and somewhat more difficult to support. */
|
||||
|
||||
static boolean
|
||||
static bfd_boolean
|
||||
mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
bfd *abfd;
|
||||
asection *sec;
|
||||
struct bfd_link_info *link_info;
|
||||
boolean *again;
|
||||
bfd_boolean *again;
|
||||
{
|
||||
Elf_Internal_Shdr *symtab_hdr;
|
||||
Elf_Internal_Rela *internal_relocs;
|
||||
@ -510,7 +510,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
Elf_Internal_Sym *isymbuf = NULL;
|
||||
|
||||
/* Assume nothing changes. */
|
||||
*again = false;
|
||||
*again = FALSE;
|
||||
|
||||
/* We don't have to do anything for a relocateable link, if
|
||||
this section does not have relocs, or if this is not a
|
||||
@ -519,7 +519,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|| (sec->flags & SEC_RELOC) == 0
|
||||
|| sec->reloc_count == 0
|
||||
|| (sec->flags & SEC_CODE) == 0)
|
||||
return true;
|
||||
return TRUE;
|
||||
|
||||
/* If this is the first time we have been called for this section,
|
||||
initialize the cooked size. */
|
||||
@ -679,7 +679,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -879,7 +879,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
}
|
||||
|
||||
/* Try to turn a 24bit immediate, displacement or absolute address
|
||||
@ -942,7 +942,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
break;
|
||||
|
||||
/* mov imm24,an -> mov imm16,an
|
||||
@ -993,7 +993,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
break;
|
||||
|
||||
/* cmp imm24,dn -> cmp imm16,dn
|
||||
@ -1094,7 +1094,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
break;
|
||||
|
||||
/* movb (abs24),dn ->movbu (abs16),dn extxb bn */
|
||||
@ -1125,7 +1125,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
|
||||
/* That will change things, so, we should relax again.
|
||||
Note that this is not required, and it may be slow. */
|
||||
*again = true;
|
||||
*again = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1160,7 +1160,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
&& elf_section_data (sec)->relocs != internal_relocs)
|
||||
free (internal_relocs);
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
|
||||
error_return:
|
||||
if (isymbuf != NULL
|
||||
@ -1173,12 +1173,12 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|
||||
&& elf_section_data (sec)->relocs != internal_relocs)
|
||||
free (internal_relocs);
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Delete some bytes from a section while relaxing. */
|
||||
|
||||
static boolean
|
||||
static bfd_boolean
|
||||
mn10200_elf_relax_delete_bytes (abfd, sec, addr, count)
|
||||
bfd *abfd;
|
||||
asection *sec;
|
||||
@ -1253,12 +1253,12 @@ mn10200_elf_relax_delete_bytes (abfd, sec, addr, count)
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Return true if a symbol exists at the given address, else return
|
||||
false. */
|
||||
static boolean
|
||||
/* Return TRUE if a symbol exists at the given address, else return
|
||||
FALSE. */
|
||||
static bfd_boolean
|
||||
mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
|
||||
bfd *abfd;
|
||||
asection *sec;
|
||||
@ -1280,7 +1280,7 @@ mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
|
||||
{
|
||||
if (isym->st_shndx == sec_shndx
|
||||
&& isym->st_value == addr)
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
|
||||
@ -1294,10 +1294,10 @@ mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
|
||||
|| sym_hash->root.type == bfd_link_hash_defweak)
|
||||
&& sym_hash->root.u.def.section == sec
|
||||
&& sym_hash->root.u.def.value == addr)
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* This is a version of bfd_generic_get_relocated_section_contents
|
||||
@ -1310,7 +1310,7 @@ mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
|
||||
struct bfd_link_info *link_info;
|
||||
struct bfd_link_order *link_order;
|
||||
bfd_byte *data;
|
||||
boolean relocateable;
|
||||
bfd_boolean relocateable;
|
||||
asymbol **symbols;
|
||||
{
|
||||
Elf_Internal_Shdr *symtab_hdr;
|
||||
@ -1344,7 +1344,7 @@ mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
|
||||
|
||||
internal_relocs = (_bfd_elf32_link_read_relocs
|
||||
(input_bfd, input_section, (PTR) NULL,
|
||||
(Elf_Internal_Rela *) NULL, false));
|
||||
(Elf_Internal_Rela *) NULL, FALSE));
|
||||
if (internal_relocs == NULL)
|
||||
goto error_return;
|
||||
|
||||
|
Reference in New Issue
Block a user