]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/testsuite/gas/elf/elf.exp
RISC-V: Support ELF attribute for gas and readelf.
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / elf / elf.exp
index efd24f8b18ea0890291dda4d40ffc5acca6387ec..d616d5de7662e9d88e47bf94f7858b5fdd6c9f34 100644 (file)
@@ -76,6 +76,9 @@ if { [is_elf_format] } then {
     if {[istarget "rx-*-*"]} then {
        set target_machine -rx
     }
+    if {[istarget "riscv*-*-*"]} then {
+       set target_machine -riscv
+    }
     if {[istarget "v850*-*-*"]} then {
        set target_machine -v850
     }
@@ -170,10 +173,16 @@ if { [is_elf_format] } then {
     if {! [istarget "h8300-*-*"]} then {
        # The h8300 port issues a warning message for
        # new sections created without atrributes.
-       if  { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
-           run_elf_list_test "section2" "$target_machine" "-al -mx86-used-note=no" "-s" ""
-       } {
-           run_elf_list_test "section2" "$target_machine" "-al" "-s" ""
+       case $target_triplet in {
+           { i*86-*-* x86_64-*-* } {
+               run_elf_list_test "section2" "$target_machine" "-al -mx86-used-note=no" "-s" ""
+           }
+           { riscv*-*-* } {
+               run_elf_list_test "section2" "$target_machine" "-al -march-attr" "-s" ""
+           }
+           default {
+               run_elf_list_test "section2" "$target_machine" "-al" "-s" ""
+           }
        }
     }
     run_dump_test "section3"