aboutsummaryrefslogtreecommitdiff
path: root/include/elf
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-03-19 15:37:43 +0000
committerNick Clifton <nickc@redhat.com>2015-03-19 15:37:43 +0000
commit1740ba0cec44bdfe9cba586892a5953a4c602228 (patch)
tree26294748df3121fa55f1be80dce4027b1aff3f18 /include/elf
parent8bf3b159e55b42bb084f9da1af400a285025618f (diff)
downloadgdb-1740ba0cec44bdfe9cba586892a5953a4c602228.zip
gdb-1740ba0cec44bdfe9cba586892a5953a4c602228.tar.gz
gdb-1740ba0cec44bdfe9cba586892a5953a4c602228.tar.bz2
Add support for G13 and G14 flag bits in RL78 ELF binaries.
inc * rl78.h (E_FLAG_RL78_G10): Redefine. (E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13 E_FLAG_RL78_G14): New flags. bin * readelf.c (get_machine_flags): Decode RL78's G13 and G14 flags. gas * config/tc-rl78.c (enum options): Add G13 and G14. (md_longopts): Add -mg13 and -mg14. (md_parse_option): Handle -mg13 and -mg14. (md_show_usage): List -mg13 and -mg14. * doc/c-rl78.texi: Add description of -mg13 and -mg14 options. bfd * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of the RL78 core based upon the flags. (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14 flags. (rl78_elf_print_private_bfd_data): Use rl78_cpu_name. (elf32_rl78_machine): Always return bfd_mach_rl78.
Diffstat (limited to 'include/elf')
-rw-r--r--include/elf/ChangeLog6
-rw-r--r--include/elf/rl78.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 056aaf5..41de600 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-19 Nick Clifton <nickc@redhat.com>
+
+ * rl78.h (E_FLAG_RL78_G10): Redefine.
+ (E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13
+ E_FLAG_RL78_G14): New flags.
+
2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
* aarch64.h (R_AARCH64_P32_TLSGD_ADR_PREL21): Add.
diff --git a/include/elf/rl78.h b/include/elf/rl78.h
index e7df0d7..b5236d9 100644
--- a/include/elf/rl78.h
+++ b/include/elf/rl78.h
@@ -106,7 +106,11 @@ END_RELOC_NUMBERS (R_RL78_max)
/* Values for the e_flags field in the ELF header. */
#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. */
+#define E_FLAG_RL78_CPU_MASK 0x0c
+#define E_FLAG_RL78_ANY_CPU 0x00 /* CPU not specified. Assume no CPU specific code usage. */
+#define E_FLAG_RL78_G10 0x04 /* CPU is missing register banks 1-3, so uses different ABI. */
+#define E_FLAG_RL78_G13 0x08 /* CPU uses a peripheral for multiply/divide. */
+#define E_FLAG_RL78_G14 0x0c /* CPU has multiply/divide instructions. */
/* These define the addend field of R_RL78_RH_RELAX relocations. */
#define RL78_RELAXA_MASK 0x000000f0 /* Mask for relax types */