# Expect script for ld-or1k tests
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2020 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
"offsets1"}
}
+set or1kplttests {
+ {"PLTA -fpic -shared" "-fpic -shared" ""
+ "" {plta1.s}
+ {{objdump -dr plta1.dd}}
+ "libplta1.so"}
+ {"PLT -fpic -shared" "-fpic -shared" ""
+ "" {plt1.s}
+ {{objdump -dr plt1.dd}}
+ "libplt1.so"}
+ {"Helper shared library" "-fpic -shared" ""
+ "" {pltlib.s} {} "libpltlib.so"}
+ {"PLT -fno-pic exec -relax" "-relax tmpdir/libpltlib.so" ""
+ "" {plt1.s}
+ {{objdump -dr plt1.x.dd}}
+ "plt1.x"}
+}
+
# Not implemented yet
# {"TLS -fpic -shared" "-shared -melf64alpha" ""
# "" {align.s tlspic1.s tlspic2.s}
# "" {tlsg.s}
# {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"}
+# Shared objects not supported on newlib
run_ld_link_tests $or1ktests
+if { ![istarget "or1k*-*-elf*"] } {
+ run_ld_link_tests $or1kplttests
+ return
+}