summaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r--bfd/elf32-cris.c414
1 files changed, 207 insertions, 207 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 8db111504da..6b6c90681a7 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -33,13 +33,13 @@ static reloc_howto_type * cris_reloc_type_lookup
static void cris_info_to_howto_rela
PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static boolean cris_elf_grok_prstatus
+static bfd_boolean cris_elf_grok_prstatus
PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static boolean cris_elf_grok_psinfo
+static bfd_boolean cris_elf_grok_psinfo
PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static boolean cris_elf_relocate_section
+static bfd_boolean cris_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -47,7 +47,7 @@ static bfd_reloc_status_type cris_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
-static boolean cris_elf_gc_sweep_hook
+static bfd_boolean cris_elf_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -55,42 +55,42 @@ static asection * cris_elf_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static boolean cris_elf_object_p PARAMS ((bfd *));
+static bfd_boolean cris_elf_object_p PARAMS ((bfd *));
-static void cris_elf_final_write_processing PARAMS ((bfd *, boolean));
+static void cris_elf_final_write_processing PARAMS ((bfd *, bfd_boolean));
-static boolean cris_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
+static bfd_boolean cris_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
-static boolean cris_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+static bfd_boolean cris_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
struct elf_cris_link_hash_entry;
-static boolean elf_cris_discard_excess_dso_dynamics
+static bfd_boolean elf_cris_discard_excess_dso_dynamics
PARAMS ((struct elf_cris_link_hash_entry *, PTR));
-static boolean elf_cris_discard_excess_program_dynamics
+static bfd_boolean elf_cris_discard_excess_program_dynamics
PARAMS ((struct elf_cris_link_hash_entry *, PTR));
-static boolean elf_cris_adjust_gotplt_to_got
+static bfd_boolean elf_cris_adjust_gotplt_to_got
PARAMS ((struct elf_cris_link_hash_entry *, PTR));
-static boolean elf_cris_try_fold_plt_to_got
+static bfd_boolean elf_cris_try_fold_plt_to_got
PARAMS ((struct elf_cris_link_hash_entry *, PTR));
static struct bfd_hash_entry *elf_cris_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static struct bfd_link_hash_table *elf_cris_link_hash_table_create
PARAMS ((bfd *));
-static boolean elf_cris_adjust_dynamic_symbol
+static bfd_boolean elf_cris_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static boolean cris_elf_check_relocs
+static bfd_boolean cris_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
-static boolean elf_cris_size_dynamic_sections
+static bfd_boolean elf_cris_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static boolean elf_cris_finish_dynamic_symbol
+static bfd_boolean elf_cris_finish_dynamic_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
Elf_Internal_Sym *));
-static boolean elf_cris_finish_dynamic_sections
+static bfd_boolean elf_cris_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static void elf_cris_hide_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
static enum elf_reloc_type_class elf_cris_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
@@ -101,135 +101,135 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_NONE", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* An 8 bit absolute relocation. */
HOWTO (R_CRIS_8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_8", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x00ff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* A 16 bit absolute relocation. */
HOWTO (R_CRIS_16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_16", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0x0000ffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* A 32 bit absolute relocation. */
HOWTO (R_CRIS_32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* An 8 bit PC-relative relocation. */
HOWTO (R_CRIS_8_PCREL, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- true, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_8_PCREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x00ff, /* dst_mask */
- true), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
/* A 16 bit PC-relative relocation. */
HOWTO (R_CRIS_16_PCREL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- true, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_16_PCREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0x0000ffff, /* dst_mask */
- true), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
/* A 32 bit PC-relative relocation. */
HOWTO (R_CRIS_32_PCREL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- true, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_PCREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0xffffffff, /* dst_mask */
- true), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_CRIS_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"R_CRIS_GNU_VTINHERIT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* GNU extension to record C++ vtable member usage. */
HOWTO (R_CRIS_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_elf_rel_vtable_reloc_fn, /* special_function */
"R_CRIS_GNU_VTENTRY", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* This is used only by the dynamic linker. The symbol should exist
both in the object being run and in some shared library. The
@@ -240,45 +240,45 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_COPY", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* Like R_CRIS_32, but used when setting global offset table entries. */
HOWTO (R_CRIS_GLOB_DAT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_GLOB_DAT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* Marks a procedure linkage table entry for a symbol. */
HOWTO (R_CRIS_JUMP_SLOT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_JUMP_SLOT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* Used only by the dynamic linker. When the object is run, this
longword is set to the load address of the object, plus the
@@ -287,44 +287,44 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_RELATIVE", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* Like R_CRIS_32, but referring to the GOT table entry for the symbol. */
HOWTO (R_CRIS_16_GOT, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_16_GOT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
HOWTO (R_CRIS_32_GOT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_GOT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* Like R_CRIS_32_GOT, but referring to (and requesting a) PLT part of
the GOT table for the symbol. */
@@ -332,29 +332,29 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_16_GOTPLT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
HOWTO (R_CRIS_32_GOTPLT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_GOTPLT", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* A 32-bit offset from GOT to (local const) symbol: no GOT entry should
be necessary. */
@@ -362,15 +362,15 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_GOTREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* A 32-bit offset from GOT to entry for this symbol in PLT and request
to create PLT entry for symbol. */
@@ -378,15 +378,15 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_PLT_GOTREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
/* A 32-bit offset from PC (location after the relocation) + addend to
entry for this symbol in PLT and request to create PLT entry for
@@ -395,15 +395,15 @@ static reloc_howto_type cris_elf_howto_table [] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- true, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_CRIS_32_PLT_PCREL", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- true) /* pcrel_offset */
+ TRUE) /* pcrel_offset */
};
/* Map BFD reloc types to CRIS ELF reloc types. */
@@ -469,7 +469,7 @@ cris_info_to_howto_rela (abfd, cache_ptr, dst)
/* Support for core dump NOTE sections. */
-static boolean
+static bfd_boolean
cris_elf_grok_prstatus (abfd, note)
bfd *abfd;
Elf_Internal_Note *note;
@@ -480,7 +480,7 @@ cris_elf_grok_prstatus (abfd, note)
switch (note->descsz)
{
default:
- return false;
+ return FALSE;
case 214: /* Linux/CRIS */
/* pr_cursig */
@@ -501,7 +501,7 @@ cris_elf_grok_prstatus (abfd, note)
raw_size, note->descpos + offset);
}
-static boolean
+static bfd_boolean
cris_elf_grok_psinfo (abfd, note)
bfd *abfd;
Elf_Internal_Note *note;
@@ -509,7 +509,7 @@ cris_elf_grok_psinfo (abfd, note)
switch (note->descsz)
{
default:
- return false;
+ return FALSE;
case 124: /* Linux/CRIS elf_prpsinfo */
elf_tdata (abfd)->core_program
@@ -530,7 +530,7 @@ cris_elf_grok_psinfo (abfd, note)
command[n - 1] = '\0';
}
- return true;
+ return TRUE;
}
/* The name of the dynamic interpreter. This is put in the .interp
@@ -659,7 +659,7 @@ struct elf_cris_link_hash_table
#define elf_cris_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
(info)))
/* Get the CRIS ELF linker hash table from a link_info structure. */
@@ -777,30 +777,30 @@ cris_final_link_relocate (howto, input_bfd, input_section, contents, rel,
/* Relocate an CRIS ELF section. See elf32-fr30.c, from where this was
copied, for further comments. */
-static boolean
+static bfd_boolean
cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, local_syms, local_sections)
- bfd * output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info * info;
- bfd * input_bfd;
- asection * input_section;
- bfd_byte * contents;
- Elf_Internal_Rela * relocs;
- Elf_Internal_Sym * local_syms;
- asection ** local_sections;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
{
bfd *dynobj;
- Elf_Internal_Shdr * symtab_hdr;
- struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
bfd_vma *local_got_offsets;
asection *sgot;
asection *splt;
asection *sreloc;
- Elf_Internal_Rela * rel;
- Elf_Internal_Rela * relend;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
if (info->relocateable)
- return true;
+ return TRUE;
dynobj = elf_hash_table (info)->dynobj;
local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -820,15 +820,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
for (rel = relocs; rel < relend; rel ++)
{
- reloc_howto_type * howto;
- unsigned long r_symndx;
- Elf_Internal_Sym * sym;
- asection * sec;
- struct elf_link_hash_entry * h;
- bfd_vma relocation;
- bfd_reloc_status_type r;
- const char * symname = NULL;
- int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char *symname = NULL;
+ int r_type;
r_type = ELF32_R_TYPE (rel->r_info);
@@ -859,7 +859,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* It seems this can happen with erroneous or unsupported input
(mixing a.out and elf in an archive, for example.) */
if (sym_hashes == NULL)
- return false;
+ return FALSE;
h = sym_hashes [r_symndx - symtab_hdr->sh_info];
@@ -934,7 +934,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
symname,
bfd_get_section_name (input_bfd, input_section));
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
}
else if (h->root.type == bfd_link_hash_undefweak)
@@ -951,7 +951,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_section, rel->r_offset,
(!info->shared || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
- return false;
+ return FALSE;
relocation = 0;
}
}
@@ -1001,7 +1001,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
do; this is probably an internal error. But it is true
that we didn't like that particular input. */
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
/* Fall through. */
@@ -1124,7 +1124,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_get_section_name (input_bfd, input_section));
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
}
break;
@@ -1140,7 +1140,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
symname,
bfd_get_section_name (input_bfd, input_section));
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
/* This can happen if we get a link error with the input ELF
@@ -1154,7 +1154,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
cris_elf_howto_table[r_type].name,
bfd_get_section_name (input_bfd, input_section));
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
/* This relocation is like a PC-relative one, except the
@@ -1237,7 +1237,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
- boolean skip, relocate;
+ bfd_boolean skip, relocate;
/* When generating a shared object, these relocations
are copied into the output file to be resolved at run
@@ -1252,7 +1252,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
elf_elfheader (input_bfd)->e_shstrndx,
elf_section_data (input_section)->rel_hdr.sh_name));
if (name == NULL)
- return false;
+ return FALSE;
BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
@@ -1273,20 +1273,20 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
name);
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
}
- skip = false;
- relocate = false;
+ skip = FALSE;
+ relocate = FALSE;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
- skip = true;
+ skip = TRUE;
else if (outrel.r_offset == (bfd_vma) -2)
- skip = true, relocate = true;
+ skip = TRUE, relocate = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -1307,7 +1307,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (r_type == R_CRIS_32)
{
- relocate = true;
+ relocate = TRUE;
outrel.r_info = ELF32_R_INFO (0, R_CRIS_RELATIVE);
outrel.r_addend = relocation + rel->r_addend;
}
@@ -1329,7 +1329,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else if (sec == NULL || sec->owner == NULL)
{
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
else
{
@@ -1377,7 +1377,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case bfd_reloc_undefined:
r = info->callbacks->undefined_symbol
(info, symname, input_bfd, input_section, rel->r_offset,
- true);
+ TRUE);
break;
case bfd_reloc_outofrange:
@@ -1402,17 +1402,17 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(info, msg, symname, input_bfd, input_section, rel->r_offset);
if (! r)
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
-static boolean
+static bfd_boolean
elf_cris_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -1436,7 +1436,7 @@ elf_cris_finish_dynamic_symbol (output_bfd, info, h, sym)
= ((struct elf_cris_link_hash_entry *) h)->gotplt_offset;
Elf_Internal_Rela rela;
bfd_byte *loc;
- boolean has_gotplt = gotplt_offset != 0;
+ bfd_boolean has_gotplt = gotplt_offset != 0;
/* Get the index in the procedure linkage table which
corresponds to this symbol. This is the index of this symbol
@@ -1621,12 +1621,12 @@ elf_cris_finish_dynamic_symbol (output_bfd, info, h, sym)
|| strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
sym->st_shndx = SHN_ABS;
- return true;
+ return TRUE;
}
/* Finish up the dynamic sections. */
-static boolean
+static bfd_boolean
elf_cris_finish_dynamic_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -1746,7 +1746,7 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
- return true;
+ return TRUE;
}
/* Return the section that should be marked against GC for a given
@@ -1754,11 +1754,11 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
static asection *
cris_elf_gc_mark_hook (sec, info, rel, h, sym)
- asection * sec;
- struct bfd_link_info * info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela * rel;
- struct elf_link_hash_entry * h;
- Elf_Internal_Sym * sym;
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
{
@@ -1791,12 +1791,12 @@ cris_elf_gc_mark_hook (sec, info, rel, h, sym)
/* Update the got entry reference counts for the section being removed. */
-static boolean
+static bfd_boolean
cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
- bfd * abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info * info ATTRIBUTE_UNUSED;
- asection * sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1814,7 +1814,7 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
dynobj = elf_hash_table (info)->dynobj;
if (dynobj == NULL)
- return true;
+ return TRUE;
sgot = bfd_get_section_by_name (dynobj, ".got");
srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
@@ -1892,7 +1892,7 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
}
}
- return true;
+ return TRUE;
}
/* Make sure we emit a GOT entry if the symbol was supposed to have a PLT
@@ -1902,7 +1902,7 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
or elf_cris_size_dynamic_sections if no dynamic sections will be
created (we're only linking static objects). */
-static boolean
+static bfd_boolean
elf_cris_adjust_gotplt_to_got (h, p)
struct elf_cris_link_hash_entry *h;
PTR p;
@@ -1917,7 +1917,7 @@ elf_cris_adjust_gotplt_to_got (h, p)
/* If nobody wanted a GOTPLT with this symbol, we're done. */
if (h->gotplt_refcount <= 0)
- return true;
+ return TRUE;
if (h->root.got.refcount > 0)
{
@@ -1950,7 +1950,7 @@ elf_cris_adjust_gotplt_to_got (h, p)
srelgot->_raw_size += sizeof (Elf32_External_Rela);
}
- return true;
+ return TRUE;
}
/* Try to fold PLT entries with GOT entries. There are two cases when we
@@ -1971,7 +1971,7 @@ elf_cris_adjust_gotplt_to_got (h, p)
version scripts. The differing cases are handled by
elf_cris_hide_symbol. */
-static boolean
+static bfd_boolean
elf_cris_try_fold_plt_to_got (h, p)
struct elf_cris_link_hash_entry *h;
PTR p;
@@ -1982,7 +1982,7 @@ elf_cris_try_fold_plt_to_got (h, p)
other reference so there's nothing to do. Likewise if there are no
PLT references; GOTPLT references included. */
if (h->root.got.refcount <= 0 || h->root.plt.refcount <= 0)
- return true;
+ return TRUE;
/* GOTPLT relocs are supposed to be included into the PLT refcount. */
BFD_ASSERT (h->gotplt_refcount <= h->root.plt.refcount);
@@ -1992,13 +1992,13 @@ elf_cris_try_fold_plt_to_got (h, p)
/* The only PLT references are GOTPLT references, and there are GOT
references. Convert PLT to GOT references. */
if (! elf_cris_adjust_gotplt_to_got (h, info))
- return false;
+ return FALSE;
/* Clear the PLT references, so no PLT will be created. */
h->root.plt.offset = (bfd_vma) -1;
}
- return true;
+ return TRUE;
}
/* Our own version of hide_symbol, so that we can adjust a GOTPLT reloc
@@ -2009,7 +2009,7 @@ static void
elf_cris_hide_symbol (info, h, force_local)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
- boolean force_local;
+ bfd_boolean force_local;
{
elf_cris_adjust_gotplt_to_got ((struct elf_cris_link_hash_entry *) h, info);
@@ -2022,7 +2022,7 @@ elf_cris_hide_symbol (info, h, force_local)
change the definition to something the rest of the link can
understand. */
-static boolean
+static bfd_boolean
elf_cris_adjust_dynamic_symbol (info, h)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
@@ -2077,21 +2077,21 @@ elf_cris_adjust_dynamic_symbol (info, h)
PLT entry, get rid of the PLT. */
if (! elf_cris_try_fold_plt_to_got ((struct elf_cris_link_hash_entry *)
h, info))
- return false;
+ return FALSE;
/* GC or folding may have rendered this entry unused. */
if (h->plt.refcount <= 0)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->plt.offset = (bfd_vma) -1;
- return true;
+ return TRUE;
}
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
{
if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- return false;
+ return FALSE;
}
s = bfd_get_section_by_name (dynobj, ".plt");
@@ -2135,7 +2135,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
- return true;
+ return TRUE;
}
/* No GOT reference for this symbol; prepare for an ordinary PLT. */
@@ -2160,7 +2160,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
BFD_ASSERT (s != NULL);
s->_raw_size += sizeof (Elf32_External_Rela);
- return true;
+ return TRUE;
}
/* Reinitialize the plt offset now that it is not used as a reference
@@ -2176,7 +2176,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
- return true;
+ return TRUE;
}
/* This is a reference to a symbol defined by a dynamic object which
@@ -2187,12 +2187,12 @@ elf_cris_adjust_dynamic_symbol (info, h)
For such cases we need not do anything here; the relocations will
be handled correctly by relocate_section. */
if (info->shared)
- return true;
+ return TRUE;
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
- return true;
+ return TRUE;
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
@@ -2236,7 +2236,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (!bfd_set_section_alignment (dynobj, s, power_of_two))
- return false;
+ return FALSE;
}
/* Define the symbol as being at this point in the section. */
@@ -2246,12 +2246,12 @@ elf_cris_adjust_dynamic_symbol (info, h)
/* Increment the section size to make room for the symbol. */
s->_raw_size += h->size;
- return true;
+ return TRUE;
}
/* Look through the relocs for a section during the first phase. */
-static boolean
+static bfd_boolean
cris_elf_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
struct bfd_link_info *info;
@@ -2269,7 +2269,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
asection *sreloc;
if (info->relocateable)
- return true;
+ return TRUE;
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2317,7 +2317,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
/* Create the .got section, so we can assume it's always
present whenever there's a dynobj. */
if (!_bfd_elf_create_got_section (dynobj, info))
- return false;
+ return FALSE;
}
break;
@@ -2356,7 +2356,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| !bfd_set_section_alignment (dynobj, srelgot, 2))
- return false;
+ return FALSE;
}
}
/* Fall through. */
@@ -2377,7 +2377,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
amt *= sizeof (bfd_signed_vma);
local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, amt));
if (local_got_refcounts == NULL)
- return false;
+ return FALSE;
local_got_refcounts++;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -2415,7 +2415,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
if (h->dynindx == -1)
{
if (!bfd_elf32_link_record_dynamic_symbol (info, h))
- return false;
+ return FALSE;
}
/* Allocate space in the .got section. */
@@ -2566,7 +2566,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
elf_elfheader (abfd)->e_shstrndx,
elf_section_data (sec)->rel_hdr.sh_name));
if (name == NULL)
- return false;
+ return FALSE;
BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
@@ -2585,7 +2585,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| !bfd_set_section_alignment (dynobj, sreloc, 2))
- return false;
+ return FALSE;
}
if (sec->flags & SEC_READONLY)
info->flags |= DF_TEXTREL;
@@ -2617,7 +2617,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
p = ((struct elf_cris_pcrel_relocs_copied *)
bfd_alloc (dynobj, (bfd_size_type) sizeof *p));
if (p == NULL)
- return false;
+ return FALSE;
p->next = eh->pcrel_relocs_copied;
eh->pcrel_relocs_copied = p;
p->section = sreloc;
@@ -2632,37 +2632,37 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
Reconstruct it for later use during GC. */
case R_CRIS_GNU_VTINHERIT:
if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return false;
+ return FALSE;
break;
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_CRIS_GNU_VTENTRY:
if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- return false;
+ return FALSE;
break;
default:
/* Other relocs do not appear here. */
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Set the sizes of the dynamic sections. */
-static boolean
+static bfd_boolean
elf_cris_size_dynamic_sections (output_bfd, info)
bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
bfd *dynobj;
asection *s;
- boolean plt;
- boolean relocs;
+ bfd_boolean plt;
+ bfd_boolean relocs;
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -2714,12 +2714,12 @@ elf_cris_size_dynamic_sections (output_bfd, info)
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
- plt = false;
- relocs = false;
+ plt = FALSE;
+ relocs = FALSE;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- boolean strip;
+ bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -2728,7 +2728,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = false;
+ strip = FALSE;
if (strcmp (name, ".plt") == 0)
{
@@ -2736,12 +2736,12 @@ elf_cris_size_dynamic_sections (output_bfd, info)
{
/* Strip this section if we don't need it; see the
comment below. */
- strip = true;
+ strip = TRUE;
}
else
{
/* Remember whether there is a PLT. */
- plt = true;
+ plt = TRUE;
}
}
else if (strncmp (name, ".rela", 5) == 0)
@@ -2757,14 +2757,14 @@ elf_cris_size_dynamic_sections (output_bfd, info)
adjust_dynamic_symbol is called, and it is that
function which decides whether anything needs to go
into these sections. */
- strip = true;
+ strip = TRUE;
}
else
{
/* Remember whether there are any reloc sections other
than .rela.plt. */
if (strcmp (name, ".rela.plt") != 0)
- relocs = true;
+ relocs = TRUE;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -2790,7 +2790,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
this will make entries have the type R_CRIS_NONE. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
- return false;
+ return FALSE;
}
if (elf_hash_table (info)->dynamic_sections_created)
@@ -2806,7 +2806,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
if (!info->shared)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
- return false;
+ return FALSE;
}
if (plt)
@@ -2815,7 +2815,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
|| !add_dynamic_entry (DT_JMPREL, 0))
- return false;
+ return FALSE;
}
if (relocs)
@@ -2823,19 +2823,19 @@ elf_cris_size_dynamic_sections (output_bfd, info)
if (!add_dynamic_entry (DT_RELA, 0)
|| !add_dynamic_entry (DT_RELASZ, 0)
|| !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
- return false;
+ return FALSE;
}
if ((info->flags & DF_TEXTREL) != 0)
{
if (!add_dynamic_entry (DT_TEXTREL, 0))
- return false;
+ return FALSE;
info->flags |= DF_TEXTREL;
}
}
#undef add_dynamic_entry
- return true;
+ return TRUE;
}
/* This function is called via elf_cris_link_hash_traverse if we are
@@ -2847,7 +2847,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
check_relocs routine, but we won't fill them in in the
relocate_section routine. */
-static boolean
+static bfd_boolean
elf_cris_discard_excess_dso_dynamics (h, inf)
struct elf_cris_link_hash_entry *h;
PTR inf;
@@ -2869,14 +2869,14 @@ elf_cris_discard_excess_dso_dynamics (h, inf)
s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
}
- return true;
+ return TRUE;
}
/* This function is called via elf_cris_link_hash_traverse if we are *not*
creating a shared object. We discard space for relocs for symbols put
in the .got, but which we found we do not have to resolve at run-time. */
-static boolean
+static bfd_boolean
elf_cris_discard_excess_program_dynamics (h, inf)
struct elf_cris_link_hash_entry *h;
PTR inf;
@@ -2924,13 +2924,13 @@ elf_cris_discard_excess_program_dynamics (h, inf)
}
}
- return true;
+ return TRUE;
}
/* Reject a file depending on presence and expectation of prefixed
underscores on symbols. */
-static boolean
+static bfd_boolean
cris_elf_object_p (abfd)
bfd *abfd;
{
@@ -2945,7 +2945,7 @@ cris_elf_object_p (abfd)
static void
cris_elf_final_write_processing (abfd, linker)
bfd *abfd;
- boolean linker ATTRIBUTE_UNUSED;
+ bfd_boolean linker ATTRIBUTE_UNUSED;
{
if (bfd_get_symbol_leading_char (abfd) == '_')
elf_elfheader (abfd)->e_flags |= EF_CRIS_UNDERSCORE;
@@ -2955,7 +2955,7 @@ cris_elf_final_write_processing (abfd, linker)
/* Display the flags field. */
-static boolean
+static bfd_boolean
cris_elf_print_private_bfd_data (abfd, ptr)
bfd *abfd;
PTR ptr;
@@ -2972,12 +2972,12 @@ cris_elf_print_private_bfd_data (abfd, ptr)
fprintf (file, _(" [symbols have a _ prefix]"));
fputc ('\n', file);
- return true;
+ return TRUE;
}
/* Don't mix files with and without a leading underscore. */
-static boolean
+static bfd_boolean
cris_elf_merge_private_bfd_data (ibfd, obfd)
bfd *ibfd;
bfd *obfd;
@@ -2985,19 +2985,19 @@ cris_elf_merge_private_bfd_data (ibfd, obfd)
flagword old_flags, new_flags;
if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- return false;
+ return FALSE;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
+ return TRUE;
if (! elf_flags_init (obfd))
{
/* This happens when ld starts out with a 'blank' output file. */
- elf_flags_init (obfd) = true;
+ elf_flags_init (obfd) = TRUE;
/* Set flags according to current bfd_target. */
- cris_elf_final_write_processing (obfd, false);
+ cris_elf_final_write_processing (obfd, FALSE);
}
old_flags = elf_elfheader (obfd)->e_flags;
@@ -3012,10 +3012,10 @@ cris_elf_merge_private_bfd_data (ibfd, obfd)
: _("%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}