diff options
author | Palmer Dabbelt <palmer@rivosinc.com> | 2022-02-07 12:14:30 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-02-08 08:23:28 -0800 |
commit | 87fdd7ac09b1c3cfd7443a3ffc5abb9bb178bc6e (patch) | |
tree | c03e2f879052249179318dde222bb0a6bdaf40ed /ld/testsuite | |
parent | 481153777e278b71e694fd2db6b897f7a9e3dcb8 (diff) | |
download | gdb-87fdd7ac09b1c3cfd7443a3ffc5abb9bb178bc6e.zip gdb-87fdd7ac09b1c3cfd7443a3ffc5abb9bb178bc6e.tar.gz gdb-87fdd7ac09b1c3cfd7443a3ffc5abb9bb178bc6e.tar.bz2 |
RISC-V: Stop reporting warnings for mismatched extension versions
The extension version checking logic is really just too complicated to
encode into the linker, trying to do so causes more harm than good.
This removes the checks and the associated tests, leaving the logic to
keep the largest version of each extension linked into the target.
bfd/
* elfnn-riscv.c (riscv_version_mismatch): Rename to
riscv_update_subset_version, and stop reporting warnings on
version mismatches.
(riscv_merge_std_ext): Adjust calls to riscv_version_mismatch.
(riscv_merge_multi_letter_ext): Likewise.
ld/
* testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Remove
* testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s: Likewise
* testsuite/ld-riscv-elf/attr-merge-user-ext-01.d: New test.
* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p0.s:
Likewise.
* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p1.s:
Likewise.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Remove obselete
attr-merge-arch-failed-{01,02}, replace with
attr-merge-user-ext-01.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'ld/testsuite')
12 files changed, 12 insertions, 46 deletions
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d deleted file mode 100644 index 669a139..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d +++ /dev/null @@ -1,11 +0,0 @@ -#source: attr-merge-arch-failed-01a.s -#source: attr-merge-arch-failed-01b.s -#as: -march-attr -#ld: -r -m[riscv_choose_ilp32_emul] -#warning: .*mis-matched ISA version 3.0 for 'a' extension, the output version is 2.0 -#readelf: -A - -Attribute Section: riscv -File Attributes - Tag_RISCV_arch: ".*a3p0.*" -#.. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s deleted file mode 100644 index 365901d..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i2p0_m2p0_a2p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s deleted file mode 100644 index 49263bf..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i2p0_m2p0_a3p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d deleted file mode 100644 index 2f2638a..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d +++ /dev/null @@ -1,27 +0,0 @@ -#source: attr-merge-arch-failed-02a.s -#source: attr-merge-arch-failed-02b.s -#source: attr-merge-arch-failed-02c.s -#source: attr-merge-arch-failed-02d.s -#as: -march-attr -#ld: -r -m[riscv_choose_ilp32_emul] -#warning: .*mis-matched ISA version 3.0 for 'i' extension, the output version is 2.0 -#warning: .*mis-matched ISA version 3.0 for 'm' extension, the output version is 2.0 -#warning: .*mis-matched ISA version 3.0 for 'a' extension, the output version is 2.0 -#warning: .*mis-matched ISA version 3.0 for 'zicsr' extension, the output version is 2.0 -#warning: .*mis-matched ISA version 3.0 for 'xunknown' extension, the output version is 2.0 -#warning: .*mis-matched ISA version 2.1 for 'i' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 2.2 for 'm' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 2.3 for 'a' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 2.4 for 'zicsr' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 2.5 for 'xunknown' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 4.6 for 'i' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 4.7 for 'm' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 4.8 for 'a' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 4.9 for 'zicsr' extension, the output version is 3.0 -#warning: .*mis-matched ISA version 4.0 for 'xunknown' extension, the output version is 3.0 -#readelf: -A - -Attribute Section: riscv -File Attributes - Tag_RISCV_arch: "rv32i4p6_m4p7_a4p8_zicsr4p9_zifencei2p0_xunknown4p0" -#.. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s deleted file mode 100644 index 3dbf8a2..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i2p0_m2p0_a2p0_zicsr2p0_xunknown2p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s deleted file mode 100644 index 7bbc39f..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i3p0_m3p0_a3p0_zicsr3p0_xunknown3p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s deleted file mode 100644 index 2a921e6..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i2p1_m2p2_a2p3_zicsr2p4_xunknown2p5" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s deleted file mode 100644 index 6ef5ee5..0000000 --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s +++ /dev/null @@ -1 +0,0 @@ - .attribute arch, "rv32i4p6_m4p7_a4p8_zicsr4p9_xunknown4p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-01.d b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-01.d new file mode 100644 index 0000000..d15bcdc --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-01.d @@ -0,0 +1,9 @@ +#source: attr-merge-user-ext-rv32i2p1_m2p0.s +#source: attr-merge-user-ext-rv32i2p1_m2p1.s +#as: +#ld: -r -m[riscv_choose_ilp32_emul] +#readelf: -A + +Attribute Section: riscv +File Attributes + Tag_RISCV_arch: "rv32i2p1_m2p1" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p0.s b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p0.s new file mode 100644 index 0000000..a7e0547 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p0.s @@ -0,0 +1 @@ +.attribute arch, "rv32i2p1_m2p0" diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p1.s b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p1.s new file mode 100644 index 0000000..a1b61e3 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_m2p1.s @@ -0,0 +1 @@ +.attribute arch, "rv32i2p1_m2p1" diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp index 3d89502..272424b 100644 --- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp +++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp @@ -160,8 +160,7 @@ if [istarget "riscv*-*-*"] { run_dump_test "attr-merge-priv-spec-01" run_dump_test "attr-merge-priv-spec-02" run_dump_test "attr-merge-priv-spec-03" - run_dump_test "attr-merge-arch-failed-01" - run_dump_test "attr-merge-arch-failed-02" + run_dump_test "attr-merge-user-ext-01" run_dump_test "attr-merge-stack-align-failed" run_dump_test "attr-merge-priv-spec-failed-01" run_dump_test "attr-merge-priv-spec-failed-02" |