summaryrefslogtreecommitdiff
path: root/bfd/elf32-d10v.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2000-12-03 20:44:04 +0000
committerKazu Hirata <kazu@codesourcery.com>2000-12-03 20:44:04 +0000
commitb4fdc31601bd43aaae8d9f3c9c3f381b3b0eb51d (patch)
treeb484d9c50bce09fe42eacb2c11055621aefadcef /bfd/elf32-d10v.c
parentd1aef4bb5a7715b021115b4d9943dc03a443a857 (diff)
downloadgdb-b4fdc31601bd43aaae8d9f3c9c3f381b3b0eb51d.tar.gz
2000-12-03 Kazu Hirata <kazu@hxi.com>
* elf32-arm.h: Fix formatting. * elf32-avr.c: Likewise. * elf32-cris.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf-hppa.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise.
Diffstat (limited to 'bfd/elf32-d10v.c')
-rw-r--r--bfd/elf32-d10v.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 04b9d2b072d..a4075a5a757 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -29,7 +29,6 @@ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
static void d10v_info_to_howto_rel
PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
-
/* Use REL instead of RELA to save space */
#define USE_REL
@@ -171,7 +170,7 @@ static reloc_howto_type elf_d10v_howto_table[] =
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
-
+
};
/* Map BFD reloc types to D10V ELF reloc types. */
@@ -286,7 +285,7 @@ elf32_d10v_gc_sweep_hook (abfd, info, sec, relocs)
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
-
+
static boolean
elf32_d10v_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
@@ -298,28 +297,28 @@ elf32_d10v_check_relocs (abfd, info, sec, relocs)
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
-
+
if (info->relocateable)
return true;
-
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
+ sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
if (!elf_bad_symtab (abfd))
sym_hashes_end -= symtab_hdr->sh_info;
-
+
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
-
+
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
+
switch (ELF32_R_TYPE (rel->r_info))
{
/* This relocation describes the C++ object vtable hierarchy.
@@ -328,7 +327,7 @@ elf32_d10v_check_relocs (abfd, info, sec, relocs)
if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return false;
break;
-
+
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_D10V_GNU_VTENTRY:
@@ -337,7 +336,7 @@ elf32_d10v_check_relocs (abfd, info, sec, relocs)
break;
}
}
-
+
return true;
}
@@ -450,7 +449,7 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
if (name == NULL || *name == '\0')
name = bfd_section_name (input_bfd, sec);
}
-
+
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);