]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld/PE: adjust pe_detail_list[]
authorJan Beulich <jbeulich@suse.com>
Fri, 10 Oct 2025 13:59:44 +0000 (15:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Oct 2025 13:59:44 +0000 (15:59 +0200)
M*Core uses pe-dll.c, but has no entry in the table. Add both big and
little endian ones. Many of the entries aren't relevant when targeting
PE+; move the #endif accordingly. The MIPS entry is actually
questionable altogether: No mips*-*-* target uses pe-dll.c or pep-dll.c.

As I lack sufficient knowledge of the target, introduction of
jmp_mcore_bytes[] will need to be handled by someone else.

ld/pe-dll.c

index 2ce8ac5c81722624d8a702fada9d7614fdd9fd94..6fb45f0d6aa8c1fdeea0c935069ad11203d44877 100644 (file)
@@ -251,6 +251,7 @@ static const autofilter_entry_type autofilter_symbollist_i386[] =
 #define PE_ARCH_arm     4
 #define PE_ARCH_arm_wince 5
 #define PE_ARCH_aarch64  6
+#define PE_ARCH_mcore   7
 
 /* Don't make it constant as underscore mode gets possibly overriden
    by target or -(no-)leading-underscore option.  */
@@ -305,7 +306,6 @@ static pe_details_type pe_detail_list[] =
     true,
     autofilter_symbollist_i386
   },
-#endif
   {
     "pei-shl",
     "pe-shl",
@@ -316,6 +316,26 @@ static pe_details_type pe_detail_list[] =
     true,
     autofilter_symbollist_generic
   },
+  {
+    "pei-mcore-little",
+    "pe-mcore-little",
+    7 /* IMAGE_REL_MCORE_RVA */,
+    ~0, 0, ~0, /* none */
+    PE_ARCH_mcore,
+    bfd_arch_mcore,
+    false,
+    autofilter_symbollist_generic
+  },
+  {
+    "pei-mcore-big",
+    "pe-mcore-big",
+    7 /* IMAGE_REL_MCORE_RVA */,
+    ~0, 0, ~0, /* none */
+    PE_ARCH_mcore,
+    bfd_arch_mcore,
+    false,
+    autofilter_symbollist_generic
+  },
   {
     "pei-mips",
     "pe-mips",
@@ -347,6 +367,7 @@ static pe_details_type pe_detail_list[] =
     false,
     autofilter_symbollist_generic
   },
+#endif
   {
     "pei-aarch64-little",
     "pe-aarch64-little",