RISC-V: Report warning when linking the objects with different priv specs.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index d9b66b55d347e37b940c5b869e77cec1f4a73dc8..6ac3c0fb67efc423a25dd12cad0daceccdc9b7ad 100644 (file)
@@ -1,3 +1,25 @@
+2020-06-22  Nelson Chu  <nelson.chu@sifive.com>
+
+       * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
+       opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
+       (riscv_get_priv_spec_class): Likewise.
+       (riscv_get_priv_spec_name): Likewise.
+       (riscv_get_priv_spec_class_from_numbers): New function, convert
+       the version numbers into string, then call riscv_get_priv_spec_class
+       to get the priv spec class.
+       * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
+       from include/opcode/riscv.h to bfd/elfxx-riscv.h.
+       (riscv_get_priv_spec_name): Likewise.
+       (riscv_get_priv_spec_class_from_numbers): New forward declaration.
+       (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
+       * elfnn-riscv.c (riscv_merge_attributes):  Get the priv spec classes
+       of input and output objects form their priv spec attributes by
+       riscv_get_priv_spec_class_from_numbers.  Report warning rather than
+       errors when linking objects with differnet priv spec versions.  We do
+       know v1.9.1 may have conflicts to other versions, so report the
+       warning, too.  After that, update the output priv spec version to the
+       newest one so far.
+
 2020-06-22  Nelson Chu  <nelson.chu@sifive.com>
 
        * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
This page took 0.024769 seconds and 4 git commands to generate.