aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/lib/utils-lib.exp
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/testsuite/lib/utils-lib.exp')
-rw-r--r--binutils/testsuite/lib/utils-lib.exp38
1 files changed, 38 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 54c59de..11860f7 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -111,3 +111,41 @@ proc default_binutils_assemble { source object } {
return 0
}
}
+
+#
+# is_elf_format
+# true if the object format is known to be ELF
+#
+proc is_elf_format {} {
+ if { ![istarget *-*-sysv4*] \
+ && ![istarget *-*-unixware*] \
+ && ![istarget *-*-elf*] \
+ && ![istarget *-*-eabi*] \
+ && ![istarget hppa*64*-*-hpux*] \
+ && ![istarget ia64-*-hpux*] \
+ && ![istarget *-*-linux*] \
+ && ![istarget *-*-irix5*] \
+ && ![istarget *-*-irix6*] \
+ && ![istarget *-*-netbsd*] \
+ && ![istarget *-*-solaris2*] } {
+ return 0
+ }
+
+ if { [istarget *-*-linux*aout*] \
+ || [istarget *-*-linux*oldld*] } {
+ return 0
+ }
+
+ if { ![istarget *-*-netbsdelf*] \
+ && ([istarget *-*-netbsd*aout*] \
+ || [istarget *-*-netbsdpe*] \
+ || [istarget arm*-*-netbsd*] \
+ || [istarget sparc-*-netbsd*] \
+ || [istarget i*86-*-netbsd*] \
+ || [istarget m68*-*-netbsd*] \
+ || [istarget vax-*-netbsd*] \
+ || [istarget ns32k-*-netbsd*]) } {
+ return 0
+ }
+ return 1
+}