Release 2.33.1
[external/binutils.git] / ld / pe-dll.c
index efb75f2..577b911 100644 (file)
@@ -1,5 +1,5 @@
 /* Routines to help build PEI-format DLLs (Win32 etc)
-   Copyright (C) 1998-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2019 Free Software Foundation, Inc.
    Written by DJ Delorie <dj@cygnus.com>
 
    This file is part of the GNU Binutils.
@@ -243,8 +243,7 @@ static const autofilter_entry_type autofilter_symbollist_i386[] =
 #define PE_ARCH_sh      2
 #define PE_ARCH_mips    3
 #define PE_ARCH_arm     4
-#define PE_ARCH_arm_epoc 5
-#define PE_ARCH_arm_wince 6
+#define PE_ARCH_arm_wince 5
 
 /* Don't make it constant as underscore mode gets possibly overriden
    by target or -(no-)leading-underscore option.  */
@@ -308,15 +307,6 @@ static pe_details_type pe_detail_list[] =
     autofilter_symbollist_generic
   },
   {
-    "epoc-pei-arm-little",
-    "epoc-pe-arm-little",
-    11 /* ARM_RVA32 */,
-    PE_ARCH_arm_epoc,
-    bfd_arch_arm,
-    FALSE,
-    autofilter_symbollist_generic
-  },
-  {
     "pei-arm-wince-little",
     "pe-arm-wince-little",
     2,  /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c.  */
@@ -1455,6 +1445,11 @@ pe_find_data_imports (const char *symhead,
            undef->u.def.value = sym->u.def.value;
            undef->u.def.section = sym->u.def.section;
 
+           /* We replace the original name with the __imp_ prefixed one, this
+              1) may trash memory 2) leads to duplicate symbols.  But this is
+              better than having a misleading name that can confuse GDB.  */
+           undef->root.string = sym->root.string;
+
            if (link_info.pei386_auto_import == -1)
              {
                static bfd_boolean warned = FALSE;
@@ -2283,7 +2278,6 @@ make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
          jmp_byte_count = sizeof (jmp_mips_bytes);
          break;
        case PE_ARCH_arm:
-       case PE_ARCH_arm_epoc:
        case PE_ARCH_arm_wince:
          jmp_bytes = jmp_arm_bytes;
          jmp_byte_count = sizeof (jmp_arm_bytes);
@@ -2371,7 +2365,6 @@ make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
          quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
          break;
        case PE_ARCH_arm:
-       case PE_ARCH_arm_epoc:
        case PE_ARCH_arm_wince:
          quick_reloc (abfd, 8, BFD_RELOC_32, 2);
          break;