flag bits do not match.
(rl78_elf_print_private_bfd_data): Describe G10 flag.
* readelf.c (get_machine_flags): Handle RL78 G10 flag.
* config/tc-rl78.c (elf_flags): New variable.
(enum options): Add OPTION_G10.
(md_longopts): Add mg10.
(md_parse_option): Parse -mg10.
(rl78_elf_final_processing): New function.
* config/tc-rl78.c (tc_final_processing): Define.
* doc/c-rl78.texi: Document -mg10 option.
* rl78.c (E_FLAG_RL78_G10): Define.
* lib/ld-lib.exp (check_shared_lib_support): Note that the RL78
does not support shared library generation.
+2013-08-09 Nick Clifton <nickc@redhat.com>
+
+ * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10
+ flag bits do not match.
+ (rl78_elf_print_private_bfd_data): Describe G10 flag.
+
2013-08-05 John Tytgat <john@bass-software.com>
* po/BLD-POTFILES.in: Regenerate.
/* Renesas RL78 specific support for 32-bit ELF.
- Copyright (C) 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
{
flagword new_flags;
+ flagword old_flags;
bfd_boolean error = FALSE;
new_flags = elf_elfheader (ibfd)->e_flags;
+ old_flags = elf_elfheader (obfd)->e_flags;
if (!elf_flags_init (obfd))
{
elf_flags_init (obfd) = TRUE;
elf_elfheader (obfd)->e_flags = new_flags;
}
+ else if (old_flags != new_flags)
+ {
+ flagword changed_flags = old_flags ^ new_flags;
+
+ if (changed_flags & E_FLAG_RL78_G10)
+ {
+ (*_bfd_error_handler)
+ (_("RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"));
+
+ if (old_flags & E_FLAG_RL78_G10)
+ (*_bfd_error_handler) (_("- %s is G10, %s is not"),
+ bfd_get_filename (obfd), bfd_get_filename (ibfd));
+ else
+ (*_bfd_error_handler) (_("- %s is G10, %s is not"),
+ bfd_get_filename (ibfd), bfd_get_filename (obfd));
+ }
+ }
return !error;
}
flags = elf_elfheader (abfd)->e_flags;
fprintf (file, _("private flags = 0x%lx:"), (long) flags);
+ if (flags & E_FLAG_RL78_G10)
+ fprintf (file, _(" [G10]"));
+
fputc ('\n', file);
return TRUE;
}
+2013-08-09 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_machine_flags): Handle RL78 G10 flag.
+
2013-07-26 Sergey Guriev <sergey.s.guriev@intel.com>
Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
strcat (buf, ", G-Float");
break;
+ case EM_RL78:
+ if (e_flags & E_FLAG_RL78_G10)
+ strcat (buf, ", G10");
+ break;
+
case EM_RX:
if (e_flags & E_FLAG_RX_64BIT_DOUBLES)
strcat (buf, ", 64-bit doubles");
+2013-08-09 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-rl78.c (elf_flags): New variable.
+ (enum options): Add OPTION_G10.
+ (md_longopts): Add mg10.
+ (md_parse_option): Parse -mg10.
+ (rl78_elf_final_processing): New function.
+ * config/tc-rl78.c (tc_final_processing): Define.
+ * doc/c-rl78.texi: Document -mg10 option.
+
2013-08-06 Jürgen Urban <JuergenUrban@gmx.de>
* config/tc-mips.c (match_vu0_suffix_operand): Allow single-channel
/* tc-rl78.c -- Assembler for the Renesas RL78
- Copyright 2011
- Free Software Foundation, Inc.
+ Copyright 2011-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
+/* ELF flags to set in the output file header. */
+static int elf_flags = 0;
+
/*------------------------------------------------------------------*/
char * rl78_lex_start;
enum options
{
OPTION_RELAX = OPTION_MD_BASE,
+ OPTION_G10,
};
#define RL78_SHORTOPTS ""
struct option md_longopts[] =
{
{"relax", no_argument, NULL, OPTION_RELAX},
+ {"mg10", no_argument, NULL, OPTION_G10},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
linkrelax = 1;
return 1;
+ case OPTION_G10:
+ elf_flags |= E_FLAG_RL78_G10;
+ return 1;
}
return 0;
}
{
}
+/* Set the ELF specific flags. */
+void
+rl78_elf_final_processing (void)
+{
+ elf_elfheader (stdoutput)->e_flags |= elf_flags;
+}
+
/* Write a value out to the object file, using the appropriate endianness. */
void
md_number_to_chars (char * buf, valueT val, int n)
/* tc-rl78.h - header file for Renesas RL78
- Copyright 2011
- Free Software Foundation, Inc.
+ Copyright 2011-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define MAX_MEM_FOR_RS_ALIGN_CODE 8
#define HANDLE_ALIGN(FRAG) rl78_handle_align (FRAG)
extern void rl78_handle_align (fragS *);
+
+#define elf_tc_final_processing rl78_elf_final_processing
+extern void rl78_elf_final_processing (void);
-@c Copyright 2011
-@c Free Software Foundation, Inc.
+@c Copyright 2011-2013 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@cindex options, RL78
@cindex RL78 options
-The Renesas RL78 port of @code{@value{AS}} has no target-specific
-options.
+@table @code
+@item relax
+Enable support for link-time relaxation.
+
+@item mg10
+Mark the generated binary as targeting the G10 variant of the RL78
+architecture.
+
+@end table
@node RL78-Modifiers
@section Symbolic Operand Modifiers
+2013-08-09 Nick Clifton <nickc@redhat.com>
+
+ * rl78.c (E_FLAG_RL78_G10): Define.
+
2013-07-15 Maciej W. Rozycki <macro@codesourcery.com>
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment.
/* RL78 ELF support for BFD.
- Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#define EF_RL78_ALL_FLAGS (EF_RL78_CPU_MASK)
/* Values for the e_flags field in the ELF header. */
-#define E_FLAG_RL78_64BIT_DOUBLES (1 << 0)
+#define E_FLAG_RL78_64BIT_DOUBLES (1 << 0)
#define E_FLAG_RL78_DSP (1 << 1) /* Defined in the RL78 CPU Object file specification, but not explained. */
+#define E_FLAG_RL78_G10 (1 << 2) /* CPU is missing register banks 1-3, so uses different ABI. */
/* These define the addend field of R_RL78_RH_RELAX relocations. */
#define RL78_RELAXA_BRA 0x00000010 /* Any type of branch (must be decoded). */
+2013-08-09 Nick Clifton <nickc@redhat.com>
+
+ * lib/ld-lib.exp (check_shared_lib_support): Note that the RL78
+ does not support shared library generation.
+
2013-07-31 John Tytgat <john@bass-software.com>
PR ld/15787
&& ![istarget openrisc-*-*]
&& ![istarget or32-*-*]
&& ![istarget pj-*-*]
+ && ![istarget rl78-*-*]
&& ![istarget rx-*-*]
&& ![istarget spu-*-*]
&& ![istarget v850*-*-*]