* 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. * 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.
This commit is contained in:
parent
1ed8d8006b
commit
4046d87a36
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -1021,9 +1020,11 @@ static bfd_boolean
|
||||
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))
|
||||
{
|
||||
@ -1031,6 +1032,23 @@ rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * 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;
|
||||
}
|
||||
@ -1049,6 +1067,9 @@ rl78_elf_print_private_bfd_data (bfd * abfd, void * ptr)
|
||||
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;
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
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>
|
||||
|
@ -2779,6 +2779,11 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
|
||||
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");
|
||||
|
@ -1,3 +1,13 @@
|
||||
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
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -45,6 +44,9 @@ const char line_separator_chars[] = "@";
|
||||
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;
|
||||
@ -260,6 +262,7 @@ rl78_field (int val, int pos, int sz)
|
||||
enum options
|
||||
{
|
||||
OPTION_RELAX = OPTION_MD_BASE,
|
||||
OPTION_G10,
|
||||
};
|
||||
|
||||
#define RL78_SHORTOPTS ""
|
||||
@ -269,6 +272,7 @@ const char * md_shortopts = 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);
|
||||
@ -282,6 +286,9 @@ md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
|
||||
linkrelax = 1;
|
||||
return 1;
|
||||
|
||||
case OPTION_G10:
|
||||
elf_flags |= E_FLAG_RL78_G10;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -326,6 +333,13 @@ rl78_md_end (void)
|
||||
{
|
||||
}
|
||||
|
||||
/* 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)
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -77,3 +76,6 @@ extern void rl78_cons_fix_new (fragS *, int, int, expressionS *);
|
||||
#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);
|
||||
|
@ -1,5 +1,4 @@
|
||||
@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
|
||||
@ -25,8 +24,15 @@
|
||||
@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
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -104,8 +104,9 @@ END_RELOC_NUMBERS (R_RL78_max)
|
||||
#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). */
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1595,6 +1595,7 @@ proc check_shared_lib_support { } {
|
||||
&& ![istarget openrisc-*-*]
|
||||
&& ![istarget or32-*-*]
|
||||
&& ![istarget pj-*-*]
|
||||
&& ![istarget rl78-*-*]
|
||||
&& ![istarget rx-*-*]
|
||||
&& ![istarget spu-*-*]
|
||||
&& ![istarget v850*-*-*]
|
||||
|
Loading…
Reference in New Issue
Block a user