#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. */
TRUE,
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",
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);
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;
bfd_vma rdata_end = 0;
bfd_vma bss_start = 1;
bfd_vma bss_end = 0;
+ int from;
/* No, I can't use bfd here. kernel32.dll puts its export table in
the middle of the .rdata section. */
return TRUE;
}
+ /* This is an optimized version of the insertion loop, which avoids lots of
+ calls to realloc and memmove from def_file_add_import. */
+ if ((from = def_file_add_import_from (pe_def_file, nexp,
+ erva + pe_as32 (erva + name_rvas),
+ dllname, 0, NULL, NULL)) >= 0)
+ {
+ for (i = 0; i < nexp; i++)
+ {
+ /* Pointer to the names vector. */
+ bfd_vma name_rva = pe_as32 (erva + name_rvas + i * 4);
+ def_file_import *imp;
+ /* Pointer to the function address vector. */
+ bfd_vma func_rva = pe_as32 (erva + exp_funcbase + i * 4);
+ /* is_data is true if the address is in the data, rdata or bss
+ segment. */
+ const int is_data =
+ (func_rva >= data_start && func_rva < data_end)
+ || (func_rva >= rdata_start && func_rva < rdata_end)
+ || (func_rva >= bss_start && func_rva < bss_end);
+
+ imp = def_file_add_import_at (pe_def_file, from + i, erva + name_rva,
+ dllname, i, NULL, NULL);
+ /* Mark symbol type. */
+ imp->data = is_data;
+
+ if (pe_dll_extra_pe_debug)
+ printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
+ __FUNCTION__, dllname, erva + name_rva,
+ (unsigned long) func_rva, is_data ? "(data)" : "");
+ }
+
+ return TRUE;
+ }
+
/* Iterate through the list of symbols. */
for (i = 0; i < nexp; i++)
{