summaryrefslogtreecommitdiff
path: root/bfd/elf32-rl78.c
diff options
context:
space:
mode:
authorKaushik Phata <Kaushik.Phatak@kpit.com>2014-05-16 14:57:10 +0100
committerNick Clifton <nickc@redhat.com>2014-05-16 14:57:10 +0100
commit856ea05ccf051d4d86f422552f5cdfa83659dd6b (patch)
tree7fb8784ab04e753ddf24d2fc239b5986a4432a38 /bfd/elf32-rl78.c
parent73eb770959c8d8d927dbeafbf6038a651e0cb1ae (diff)
This adds support for marking RL78 binaries as either supporting 32-bit
or 64-bit doubles. It also makes the linker complain if the user attempts to link together binaries with different sized doubles. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if 64-bit doubles objects mix with 32-bit doubles objects. (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag. * readelf.c (get_machine_flags): Handle RL78 64-bit doubles flag. * config/tc-rl78.c (enum options): Add OPTION_32BIT_DOUBLES and OPTION_64BIT_DOUBLES. (md_longopts): Add -m32bit-doubles and -m64bit-doubles. (md_parse_option): Parse -m32bit-doubles and -m64bit-doubles. (md_show_usage): Show all of the RL78 options. (rl78_float_cons): New static functions. (md_pseudo_table): Update handler for "double".
Diffstat (limited to 'bfd/elf32-rl78.c')
-rw-r--r--bfd/elf32-rl78.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 7b66971e96..5e62edd302 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -1049,6 +1049,19 @@ rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
(*_bfd_error_handler) (_("- %s is G10, %s is not"),
bfd_get_filename (ibfd), bfd_get_filename (obfd));
}
+
+ if (changed_flags & E_FLAG_RL78_64BIT_DOUBLES)
+ {
+ (*_bfd_error_handler)
+ (_("RL78 merge conflict: cannot link 32-bit and 64-bit objects together"));
+
+ if (old_flags & E_FLAG_RL78_64BIT_DOUBLES)
+ (*_bfd_error_handler) (_("- %s is 64-bit, %s is not"),
+ bfd_get_filename (obfd), bfd_get_filename (ibfd));
+ else
+ (*_bfd_error_handler) (_("- %s is 64-bit, %s is not"),
+ bfd_get_filename (ibfd), bfd_get_filename (obfd));
+ }
}
return !error;
@@ -1071,6 +1084,9 @@ rl78_elf_print_private_bfd_data (bfd * abfd, void * ptr)
if (flags & E_FLAG_RL78_G10)
fprintf (file, _(" [G10]"));
+ if (flags & E_FLAG_RL78_64BIT_DOUBLES)
+ fprintf (file, _(" [64-bit doubles]"));
+
fputc ('\n', file);
return TRUE;
}