aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-08-09 10:40:04 +0000
committerNick Clifton <nickc@redhat.com>2013-08-09 10:40:04 +0000
commit4046d87a365240eed765f315f37b9bb64f208892 (patch)
treef33935fdd15080e3104e7614a7aefd403794c325 /gas
parent1ed8d8006b916d7cda234df9660252545051c6fe (diff)
downloadgdb-4046d87a365240eed765f315f37b9bb64f208892.zip
gdb-4046d87a365240eed765f315f37b9bb64f208892.tar.gz
gdb-4046d87a365240eed765f315f37b9bb64f208892.tar.bz2
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-rl78.c18
-rw-r--r--gas/config/tc-rl78.h6
-rw-r--r--gas/doc/c-rl78.texi14
4 files changed, 40 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d51874f..329d742 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c
index 77a19bb..651f3f6 100644
--- a/gas/config/tc-rl78.c
+++ b/gas/config/tc-rl78.c
@@ -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)
diff --git a/gas/config/tc-rl78.h b/gas/config/tc-rl78.h
index b3ac383..67f12c9 100644
--- a/gas/config/tc-rl78.h
+++ b/gas/config/tc-rl78.h
@@ -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);
diff --git a/gas/doc/c-rl78.texi b/gas/doc/c-rl78.texi
index 44ede47..0964ac4 100644
--- a/gas/doc/c-rl78.texi
+++ b/gas/doc/c-rl78.texi
@@ -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