/* SuperH SH64-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* This COFF-only function (only compiled with COFF support, making
ELF-only chains problematic) returns TRUE early for SH4, so let's just
define it TRUE here. */
-#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) TRUE
+#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) \
+ ((void) f, (void) h, (void) i, TRUE)
#define GOT_BIAS (-((long)-32768))
#define INCLUDE_SHMEDIA
== elf_elfheader (ibfd)->e_flags));
elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- return TRUE;
+
+ return _bfd_elf_copy_private_bfd_data (ibfd, obfd);
}
static bfd_boolean
right, and tweak the name when it's output. Otherwise, we make
an indirect symbol of it. */
flagword flags
- = info->relocatable || info->emitrelocations
+ = bfd_link_relocatable (info) || info->emitrelocations
? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
char *dl_name
free (dl_name);
if (h->type != STT_DATALABEL
- || ((info->relocatable || info->emitrelocations)
+ || ((bfd_link_relocatable (info) || info->emitrelocations)
&& h->root.type != bfd_link_hash_undefined)
- || (! info->relocatable && !info->emitrelocations
+ || (! bfd_link_relocatable (info) && !info->emitrelocations
&& h->root.type != bfd_link_hash_indirect))
{
/* Make sure we don't get confused on invalid input. */
{
char *name = (char *) cname;
- if (info->relocatable || info->emitrelocations)
+ if (bfd_link_relocatable (info) || info->emitrelocations)
{
if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
&& ((*relocation + rel->r_addend) & 1) == 0)
msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
- if (msg != NULL
- && ! ((*info->callbacks->reloc_dangerous)
- (info, msg, abfd, input_section,
- rel->r_offset)))
- return FALSE;
+ if (msg != NULL)
+ (*info->callbacks->reloc_dangerous)
+ (info, msg, abfd, input_section, rel->r_offset);
}
else
{
};
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_sh64_vec
+#define TARGET_BIG_SYM sh64_elf32_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf32-sh64"
#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_sh64l_vec
+#define TARGET_LITTLE_SYM sh64_elf32_le_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-sh64l"
/* NetBSD support. */
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_sh64nbsd_vec
+#define TARGET_BIG_SYM sh64_elf32_nbsd_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf32-sh64-nbsd"
#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_sh64lnbsd_vec
+#define TARGET_LITTLE_SYM sh64_elf32_nbsd_le_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
#undef ELF_MAXPAGESIZE
/* Linux support. */
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_sh64blin_vec
+#define TARGET_BIG_SYM sh64_elf32_linux_be_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf32-sh64big-linux"
#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_sh64lin_vec
+#define TARGET_LITTLE_SYM sh64_elf32_linux_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-sh64-linux"
#undef elf32_bed