aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2021-05-26 10:34:13 +0800
committerNelson Chu <nelson.chu@sifive.com>2021-05-26 11:02:29 +0800
commitfe1f847d9a73c090527d2620eb9883185351aea0 (patch)
tree7e08c1ee26e1a041aceed72797f36b0272f51407 /gas
parent9495896335a297b6810f9a9b03dfe06cc8d82607 (diff)
downloadgdb-fe1f847d9a73c090527d2620eb9883185351aea0.zip
gdb-fe1f847d9a73c090527d2620eb9883185351aea0.tar.gz
gdb-fe1f847d9a73c090527d2620eb9883185351aea0.tar.bz2
RISC-V: Allow to link the objects with unknown prefixed extensions.
Since the policies of GNU and llvm toolchain are different for now, current binutils mainline cannot accept any draft extensions, including rvv, zfh, .... The Clang/LLVM allows these draft stuff on mainline, but the GNU ld might be used with them, so this causes the link time problems. The patch allows ld to link the objects with unknown prefixed extensions, which are probably generated by LLVM or customized toolchains. bfd/ * elfxx-riscv.h (check_unknown_prefixed_ext): New bool. * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the prefixed extension name if check_unknown_prefixed_ext is false. * elfnn-riscv.c (riscv_merge_arch_attr_info): Set check_unknown_prefixed_ext to false for linker. gas/ * config/tc-riscv.c (riscv_set_arch): Set check_unknown_prefixed_ext to true for assembler.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-riscv.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 45cce1b..eac946f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2021-05-26 Nelson Chu <nelson.chu@sifive.com>
+
+ * config/tc-riscv.c (riscv_set_arch): Set
+ check_unknown_prefixed_ext to true for assembler.
+
2021-05-25 Tamar Christina <tamar.christina@arm.com>
PR gas/25235
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index a76e53d..42e5752 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -410,6 +410,7 @@ riscv_set_arch (const char *s)
rps.error_handler = as_bad;
rps.xlen = &xlen;
rps.get_default_version = riscv_get_default_ext_version;
+ rps.check_unknown_prefixed_ext = true;
if (s == NULL)
return;