RISC-V puts a global variable in .sdata by default, which causes the
add-symbol-file commands with -s .data to fail as there is no .data section.
This fixes 3 testsuite failures.
gdb/testsuite/
* gdb.base/code_elim.exp: For riscv, set additional_flags
to include -msmall-data-limit=0.
+2018-11-06 Jim Wilson <jimw@sifive.com>
+
+ * gdb.base/code_elim.exp: For riscv, set additional_flags
+ to include -msmall-data-limit=0.
+
2018-11-01 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/watch_minus_l: New testcase.
lappend opts "additional_flags=-Wl,-gc-sections"
lappend opts "additional_flags=-Wl,-e,main"
+# Place variables in .data instead of .sdata.
+if {[istarget "riscv*-*-*"]} {
+ lappend opts "additional_flags=-msmall-data-limit=0"
+}
+
remote_exec build "rm -f ${binfile1}"
remote_exec build "rm -f ${binfile2}"