summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd/elf32-lm32.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/bfd/elf32-lm32.c')
-rw-r--r--binutils-2.25/bfd/elf32-lm32.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/binutils-2.25/bfd/elf32-lm32.c b/binutils-2.25/bfd/elf32-lm32.c
index df6f3464..e694055a 100644
--- a/binutils-2.25/bfd/elf32-lm32.c
+++ b/binutils-2.25/bfd/elf32-lm32.c
@@ -1,5 +1,5 @@
/* Lattice Mico32-specific support for 32-bit ELF
- Copyright 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2014 Free Software Foundation, Inc.
Contributed by Jon Beniston <jon@beniston.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -43,9 +43,9 @@
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
-extern const bfd_target bfd_elf32_lm32fdpic_vec;
+extern const bfd_target lm32_elf32_fdpic_vec;
-#define IS_FDPIC(bfd) ((bfd)->xvec == &bfd_elf32_lm32fdpic_vec)
+#define IS_FDPIC(bfd) ((bfd)->xvec == &lm32_elf32_fdpic_vec)
static bfd_reloc_status_type lm32_elf_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@@ -875,12 +875,12 @@ lm32_elf_relocate_section (bfd *output_bfd,
{
/* It's a global symbol. */
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
@@ -2146,7 +2146,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
/* Set up .got offsets for local syms, and space for local dynamic
relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
{
bfd_signed_vma *local_got;
bfd_signed_vma *end_local_got;
@@ -2324,7 +2324,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
int r32_count = 0;
int rgot_count = 0;
/* Look for deleted sections. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
{
for (s = ibfd->sections; s != NULL; s = s->next)
{
@@ -2627,26 +2627,6 @@ lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
}
static bfd_boolean
-lm32_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = TRUE;
-
- /* Copy object attributes. */
- _bfd_elf_copy_obj_attributes (ibfd, obfd);
-
- return TRUE;
-}
-
-
-static bfd_boolean
lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
unsigned i;
@@ -2655,7 +2635,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
- if (! lm32_elf_copy_private_bfd_data (ibfd, obfd))
+ if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd))
return FALSE;
if (! elf_tdata (ibfd) || ! elf_tdata (ibfd)->phdr
@@ -2694,7 +2674,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define ELF_MACHINE_CODE EM_LATTICEMICO32
#define ELF_MAXPAGESIZE 0x1000
-#define TARGET_BIG_SYM bfd_elf32_lm32_vec
+#define TARGET_BIG_SYM lm32_elf32_vec
#define TARGET_BIG_NAME "elf32-lm32"
#define bfd_elf32_bfd_reloc_type_lookup lm32_reloc_type_lookup
@@ -2732,7 +2712,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_lm32fdpic_vec
+#define TARGET_BIG_SYM lm32_elf32_fdpic_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf32-lm32fdpic"
#undef elf32_bed