]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move uses_elf_em to ld-lib.exp
authorAlan Modra <amodra@gmail.com>
Fri, 27 Sep 2024 00:22:07 +0000 (09:52 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 28 Sep 2024 06:15:50 +0000 (15:45 +0930)
and add a missing entry from uses_genelf.

binutils/
* testsuite/lib/binutils-common.exp (uses_elf_em): Delete.
ld/
* testsuite/lib/ld-lib.exp (uses_genelf): Add moxie-*-moxiebox.
(uses_elf_em): New.

binutils/testsuite/lib/binutils-common.exp
ld/testsuite/lib/ld-lib.exp

index 8d2840710876b09289b807df1141461415d52ab5..403103da3664b7a192aa44a432abc26ff177b12c 100644 (file)
@@ -275,27 +275,6 @@ proc is_generic { } {
     return 0
 }
 
-# Return true if target uses elf.em.
-proc uses_elf_em { } {
-    if { ![is_elf_format] || [is_generic] } {
-       return 0
-    }
-
-    # These targets don't use elf.em.
-    if { [istarget "fr30-*-*"]
-        || [istarget "frv-*-elf"]
-        || [istarget "ft32-*-*"]
-        || [istarget "iq2000-*-*"]
-        || [istarget "mn10200-*-*"]
-        || [istarget "moxie-*-moxiebox*"]
-        || [istarget "msp430-*-*"]
-        || [istarget "mt-*-*"] } {
-       return 0
-    }
-
-    return 1
-}
-
 # True if the object format is ELF with unused section symbols.
 proc is_elf_unused_section_symbols {} {
     global AS ASFLAGS READELF
index c540940670d1549a70a5a019a125c0363b19c246..4c43425772570708293e9d58f5a1e84298fa174d 100644 (file)
@@ -1141,6 +1141,7 @@ proc uses_genelf { } {
         || [istarget "ft32-*-*"]
         || [istarget "iq2000-*-*"]
         || [istarget "mn10200-*-*"]
+        || [istarget "moxie-*-moxiebox*"]
         || [istarget "msp430-*-*"]
         || [istarget "mt-*-*"]
         || [istarget "pj*-*-*"]
@@ -1151,6 +1152,14 @@ proc uses_genelf { } {
     return 0
 }
 
+# Return true if target uses elf.em.
+proc uses_elf_em { } {
+    if { [is_elf_format] && ![uses_genelf] } {
+       return 1;
+    }
+    return 0;
+}
+
 proc is_underscore_target { } {
     global is_underscore_target_saved
     global target_triplet