static reloc_howto_type *elf32_h8_reloc_type_lookup
(bfd *abfd, bfd_reloc_code_real_type code);
static reloc_howto_type *elf32_h8_reloc_type_lookup
(bfd *abfd, bfd_reloc_code_real_type code);
(bfd *, arelent *, Elf_Internal_Rela *);
static unsigned long elf32_h8_mach (flagword);
(bfd *, arelent *, Elf_Internal_Rela *);
static unsigned long elf32_h8_mach (flagword);
-static void elf32_h8_final_write_processing (bfd *, bfd_boolean);
-static bfd_boolean elf32_h8_object_p (bfd *);
-static bfd_boolean elf32_h8_merge_private_bfd_data
+static bool elf32_h8_object_p (bfd *);
+static bool elf32_h8_merge_private_bfd_data
-static bfd_boolean elf32_h8_relax_section
- (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
-static bfd_boolean elf32_h8_relax_delete_bytes
+static bool elf32_h8_relax_section
+ (bfd *, asection *, struct bfd_link_info *, bool *);
+static bool elf32_h8_relax_delete_bytes
(bfd *, asection *, bfd_vma, int);
(bfd *, asection *, bfd_vma, int);
static bfd_byte *elf32_h8_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
static bfd_byte *elf32_h8_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
static bfd_reloc_status_type elf32_h8_final_link_relocate
(unsigned long, bfd *, bfd *, asection *,
bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
struct bfd_link_info *, asection *, int);
static bfd_reloc_status_type elf32_h8_final_link_relocate
(unsigned long, bfd *, bfd *, asection *,
bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
struct bfd_link_info *, asection *, int);
(bfd *, struct bfd_link_info *, bfd *, asection *,
bfd_byte *, Elf_Internal_Rela *,
Elf_Internal_Sym *, asection **);
(bfd *, struct bfd_link_info *, bfd *, asection *,
bfd_byte *, Elf_Internal_Rela *,
Elf_Internal_Sym *, asection **);
0, /* rightshift */
3, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
0, /* rightshift */
3, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_NONE", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_NONE", /* name */
#define R_H8_DIR32_X (R_H8_NONE_X + 1)
HOWTO (R_H8_DIR32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
#define R_H8_DIR32_X (R_H8_NONE_X + 1)
HOWTO (R_H8_DIR32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR32", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR32", /* name */
#define R_H8_DIR16_X (R_H8_DIR32_X + 1)
HOWTO (R_H8_DIR16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
#define R_H8_DIR16_X (R_H8_DIR32_X + 1)
HOWTO (R_H8_DIR16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16", /* name */
#define R_H8_DIR8_X (R_H8_DIR16_X + 1)
HOWTO (R_H8_DIR8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
#define R_H8_DIR8_X (R_H8_DIR16_X + 1)
HOWTO (R_H8_DIR8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR8", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR8", /* name */
#define R_H8_DIR16A8_X (R_H8_DIR8_X + 1)
HOWTO (R_H8_DIR16A8, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
#define R_H8_DIR16A8_X (R_H8_DIR8_X + 1)
HOWTO (R_H8_DIR16A8, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16A8", /* name */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16A8", /* name */
#define R_H8_DIR16R8_X (R_H8_DIR16A8_X + 1)
HOWTO (R_H8_DIR16R8, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
#define R_H8_DIR16R8_X (R_H8_DIR16A8_X + 1)
HOWTO (R_H8_DIR16R8, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16R8", /* name */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR16R8", /* name */
#define R_H8_DIR24A8_X (R_H8_DIR16R8_X + 1)
HOWTO (R_H8_DIR24A8, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
#define R_H8_DIR24A8_X (R_H8_DIR16R8_X + 1)
HOWTO (R_H8_DIR24A8, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR24A8", /* name */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR24A8", /* name */
0xff000000, /* src_mask */
0x00ffffff, /* dst_mask */
0xff000000, /* src_mask */
0x00ffffff, /* dst_mask */
#define R_H8_DIR24R8_X (R_H8_DIR24A8_X + 1)
HOWTO (R_H8_DIR24R8, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
#define R_H8_DIR24R8_X (R_H8_DIR24A8_X + 1)
HOWTO (R_H8_DIR24R8, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR24R8", /* name */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
special, /* special_function */
"R_H8_DIR24R8", /* name */
0xff000000, /* src_mask */
0x00ffffff, /* dst_mask */
0xff000000, /* src_mask */
0x00ffffff, /* dst_mask */
#define R_H8_DIR32A16_X (R_H8_DIR24R8_X + 1)
HOWTO (R_H8_DIR32A16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
#define R_H8_DIR32A16_X (R_H8_DIR24R8_X + 1)
HOWTO (R_H8_DIR32A16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR32A16", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DIR32A16", /* name */
#define R_H8_DISP32A16_X (R_H8_DIR32A16_X + 1)
HOWTO (R_H8_DISP32A16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
#define R_H8_DISP32A16_X (R_H8_DIR32A16_X + 1)
HOWTO (R_H8_DISP32A16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DISP32A16", /* name */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
special, /* special_function */
"R_H8_DISP32A16", /* name */
#define R_H8_PCREL16_X (R_H8_DISP32A16_X + 1)
HOWTO (R_H8_PCREL16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
#define R_H8_PCREL16_X (R_H8_DISP32A16_X + 1)
HOWTO (R_H8_PCREL16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
special, /* special_function */
"R_H8_PCREL16", /* name */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
special, /* special_function */
"R_H8_PCREL16", /* name */
#define R_H8_PCREL8_X (R_H8_PCREL16_X + 1)
HOWTO (R_H8_PCREL8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
#define R_H8_PCREL8_X (R_H8_PCREL16_X + 1)
HOWTO (R_H8_PCREL8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
special, /* special_function */
"R_H8_PCREL8", /* name */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
special, /* special_function */
"R_H8_PCREL8", /* name */
elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
{
elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
{
-static void
-elf32_h8_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+static bool
+elf32_h8_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc ATTRIBUTE_UNUSED,
elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd *input_bfd, asection *input_section,
bfd_byte *contents, Elf_Internal_Rela *relocs,
elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd *input_bfd, asection *input_section,
bfd_byte *contents, Elf_Internal_Rela *relocs,
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
- (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ (info, name, input_bfd, input_section, rel->r_offset, true);
file. We use this opportunity to encode the BFD machine type
into the flags field in the object file. */
file. We use this opportunity to encode the BFD machine type
into the flags field in the object file. */
}
/* Return nonzero if ABFD represents a valid H8 ELF object file; also
record the encoded machine type found in the ELF flags. */
}
/* Return nonzero if ABFD represents a valid H8 ELF object file; also
record the encoded machine type found in the ELF flags. */
elf32_h8_object_p (bfd *abfd)
{
bfd_default_set_arch_mach (abfd, bfd_arch_h8300,
elf32_h8_mach (elf_elfheader (abfd)->e_flags));
elf32_h8_object_p (bfd *abfd)
{
bfd_default_set_arch_mach (abfd, bfd_arch_h8300,
elf32_h8_mach (elf_elfheader (abfd)->e_flags));
}
/* Merge backend specific data from an object file to the output
object file when linking. The only data we need to copy at this
time is the architecture/machine information. */
}
/* Merge backend specific data from an object file to the output
object file when linking. The only data we need to copy at this
time is the architecture/machine information. */
elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
&& bfd_get_mach (obfd) < bfd_get_mach (ibfd))
{
if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
&& bfd_get_mach (obfd) < bfd_get_mach (ibfd))
{
if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
/* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
/* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
}
/* Keep track of the previous reloc so that we can delete
some long jumps created by the compiler. */
}
/* Keep track of the previous reloc so that we can delete
some long jumps created by the compiler. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
{
Elf_Internal_Shdr *symtab_hdr;
elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
{
Elf_Internal_Shdr *symtab_hdr;
elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr)
{
Elf_Internal_Shdr *symtab_hdr;
elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr)
{
Elf_Internal_Shdr *symtab_hdr;
|| sym_hash->root.type == bfd_link_hash_defweak)
&& sym_hash->root.u.def.section == sec
&& sym_hash->root.u.def.value == addr)
|| sym_hash->root.type == bfd_link_hash_defweak)
&& sym_hash->root.u.def.section == sec
&& sym_hash->root.u.def.value == addr)
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
internal_relocs = (_bfd_elf_link_read_relocs
(input_bfd, input_section, NULL,
internal_relocs = (_bfd_elf_link_read_relocs
(input_bfd, input_section, NULL,