@@ -377,6 +377,7 @@ pub fn create_wrapper_file(
377377 SectionFlags :: Elf { sh_flags : elf:: SHF_EXCLUDE as u64 } ;
378378 }
379379 BinaryFormat :: Xcoff => {
380+ // AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
380381 file. add_section ( Vec :: new ( ) , b".text" . to_vec ( ) , SectionKind :: Text ) ;
381382 file. section_mut ( section) . flags =
382383 SectionFlags :: Xcoff { s_flags : xcoff:: STYP_INFO as u32 } ;
@@ -389,7 +390,7 @@ pub fn create_wrapper_file(
389390 value : offset + 4 ,
390391 size : 0 ,
391392 kind : SymbolKind :: Unknown ,
392- scope : SymbolScope :: Dynamic ,
393+ scope : SymbolScope :: Compilation ,
393394 weak : false ,
394395 section : SymbolSection :: Section ( section) ,
395396 flags : SymbolFlags :: Xcoff {
@@ -488,6 +489,7 @@ pub fn create_compressed_metadata_file_for_xcoff(
488489 symbol_name : & str ,
489490) -> Vec < u8 > {
490491 assert ! ( file. format( ) == BinaryFormat :: Xcoff ) ;
492+ // AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
491493 file. add_section ( Vec :: new ( ) , b".text" . to_vec ( ) , SectionKind :: Text ) ;
492494 let data_section = file. add_section ( Vec :: new ( ) , b".data" . to_vec ( ) , SectionKind :: Data ) ;
493495 let section = file. add_section ( Vec :: new ( ) , b".info" . to_vec ( ) , SectionKind :: Debug ) ;
0 commit comments