@@ -40,17 +40,18 @@ pub struct ImportLibraryItem {
4040 pub is_data : bool ,
4141}
4242
43- impl From < ImportLibraryItem > for COFFShortExport {
44- fn from ( item : ImportLibraryItem ) -> Self {
43+ impl ImportLibraryItem {
44+ fn into_coff_short_export ( self , sess : & Session ) -> COFFShortExport {
45+ let import_name = ( sess. target . arch == "arm64ec" ) . then ( || self . name . clone ( ) ) ;
4546 COFFShortExport {
46- name : item . name ,
47+ name : self . name ,
4748 ext_name : None ,
48- symbol_name : item . symbol_name ,
49- import_name : None ,
49+ symbol_name : self . symbol_name ,
50+ import_name,
5051 export_as : None ,
51- ordinal : item . ordinal . unwrap_or ( 0 ) ,
52- noname : item . ordinal . is_some ( ) ,
53- data : item . is_data ,
52+ ordinal : self . ordinal . unwrap_or ( 0 ) ,
53+ noname : self . ordinal . is_some ( ) ,
54+ data : self . is_data ,
5455 private : false ,
5556 constant : false ,
5657 }
@@ -114,7 +115,8 @@ pub trait ArchiveBuilderBuilder {
114115 . emit_fatal ( ErrorCreatingImportLibrary { lib_name, error : error. to_string ( ) } ) ,
115116 } ;
116117
117- let exports = items. into_iter ( ) . map ( Into :: into) . collect :: < Vec < _ > > ( ) ;
118+ let exports =
119+ items. into_iter ( ) . map ( |item| item. into_coff_short_export ( sess) ) . collect :: < Vec < _ > > ( ) ;
118120 let machine = match & * sess. target . arch {
119121 "x86_64" => MachineTypes :: AMD64 ,
120122 "x86" => MachineTypes :: I386 ,
0 commit comments