aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfnn-riscv.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b24aba1afc8..cc8773cb144 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-18 Kito Cheng <kito.cheng@gmail.com>
+
+ * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
+ EF_RISCV_RVE.
+
2018-05-18 Jim Wilson <jimw@sifive.com>
* elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index b17c0e10007..b82e655b7be 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -2625,6 +2625,14 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
goto fail;
}
+ /* Disallow linking RVE and non-RVE. */
+ if ((old_flags ^ new_flags) & EF_RISCV_RVE)
+ {
+ (*_bfd_error_handler)
+ (_("%pB: can't link RVE with other target"), ibfd);
+ goto fail;
+ }
+
/* Allow linking RVC and non-RVC, and keep the RVC flag. */
elf_elfheader (obfd)->e_flags |= new_flags & EF_RISCV_RVC;